diff --git a/src/Configuration/Configuration.php b/src/Configuration/Configuration.php index 45c28f13e07e..8ff61907309c 100644 --- a/src/Configuration/Configuration.php +++ b/src/Configuration/Configuration.php @@ -49,6 +49,11 @@ final class Configuration */ private $shouldClearCache = false; + /** + * @var string + */ + private $outputFormat; + /** * @var bool */ @@ -105,6 +110,8 @@ public function resolveFromInput(InputInterface $input): void $outputFileOption = $input->getOption(Option::OPTION_OUTPUT_FILE); $this->outputFile = $outputFileOption ? (string) $outputFileOption : null; + $this->outputFormat = (string) $input->getOption(Option::OPTION_OUTPUT_FORMAT); + $commandLinePaths = (array) $input->getArgument(Option::SOURCE); // manual command line value has priority if (count($commandLinePaths) > 0) { @@ -229,6 +236,11 @@ public function getPaths(): array return $this->paths; } + public function getOutputFormat(): string + { + return $this->outputFormat; + } + private function canShowProgressBar(InputInterface $input): bool { $noProgressBar = (bool) $input->getOption(Option::OPTION_NO_PROGRESS_BAR);