Skip to content

Commit 694791d

Browse files
wip
1 parent ccc83d4 commit 694791d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/CLI/Command/Check.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int
141141
->skipBaseline($skipBaseline)
142142
->format($format);
143143

144-
$this->requireAutoload($config->getAutoloadFilePath(), $output);
145-
$printer = $this->createPrinter($config->getFormat(), $output);
146-
$progress = $this->createProgress($verbose, $output);
147-
$baseline = $this->createBaseline($config->isSkipBaseline(), $config->getBaselineFilePath(), $output);
144+
$this->requireAutoload($output, $config->getAutoloadFilePath());
145+
$printer = $this->createPrinter($output, $config->getFormat());
146+
$progress = $this->createProgress($output, $verbose);
147+
$baseline = $this->createBaseline($output, $config->isSkipBaseline(), $config->getBaselineFilePath());
148148

149149
$output->writeln("Config file '$rulesFilename' found\n");
150150

@@ -189,7 +189,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
189189
/**
190190
* @psalm-suppress UnresolvableInclude
191191
*/
192-
protected function requireAutoload(?string $filePath, OutputInterface $output): void
192+
protected function requireAutoload(OutputInterface $output, ?string $filePath): void
193193
{
194194
if (null === $filePath) {
195195
return;
@@ -202,21 +202,21 @@ protected function requireAutoload(?string $filePath, OutputInterface $output):
202202
$output->writeln("Autoload file '$filePath' added");
203203
}
204204

205-
protected function createPrinter(string $format, OutputInterface $output): Printer
205+
protected function createPrinter(OutputInterface $output, string $format): Printer
206206
{
207207
$output->writeln("Output format: $format");
208208

209209
return PrinterFactory::create($format);
210210
}
211211

212-
protected function createProgress(bool $verbose, OutputInterface $output): Progress
212+
protected function createProgress(OutputInterface $output, bool $verbose): Progress
213213
{
214214
$output->writeln('Progress: '.($verbose ? 'debug' : 'bar'));
215215

216216
return $verbose ? new DebugProgress($output) : new ProgressBarProgress($output);
217217
}
218218

219-
protected function createBaseline(bool $skipBaseline, ?string $baselineFilePath, OutputInterface $output): Baseline
219+
protected function createBaseline(OutputInterface $output, bool $skipBaseline, ?string $baselineFilePath): Baseline
220220
{
221221
$baseline = Baseline::create($skipBaseline, $baselineFilePath);
222222

0 commit comments

Comments
 (0)