Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/Configuration/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ final class Configuration
*/
private $shouldClearCache = false;

/**
* @var string
*/
private $outputFormat;

/**
* @var bool
*/
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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);
Expand Down