Skip to content

Commit

Permalink
CommandHelper::begin() parameters made required
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Sep 14, 2024
1 parent 4b6ac9c commit f17cf9e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/Command/AnalyseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$level,
$allowXdebug,
$debugEnabled,
true,
);
} catch (InceptionNotSuccessfulException $e) {
return 1;
Expand Down
1 change: 1 addition & 0 deletions src/Command/ClearResultCacheCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
'0',
$allowXdebug,
$debugEnabled,
true,
);
} catch (InceptionNotSuccessfulException) {
return 1;
Expand Down
4 changes: 2 additions & 2 deletions src/Command/CommandHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ public static function begin(
?string $generateBaselineFile,
?string $level,
bool $allowXdebug,
bool $debugEnabled = false,
bool $cleanupContainerCache = true,
bool $debugEnabled,
bool $cleanupContainerCache,
): InceptionResult
{
$stdOutput = new SymfonyOutput($output, new SymfonyStyle(new ErrorsConsoleStyle($input, $output)));
Expand Down
2 changes: 2 additions & 0 deletions src/Command/DiagnoseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
null,
$level,
false,
false,
false,
);
} catch (InceptionNotSuccessfulException) {
return 1;
Expand Down
2 changes: 2 additions & 0 deletions src/Command/DumpParametersCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
null,
$level,
false,
false,
false,
);
} catch (InceptionNotSuccessfulException) {
return 1;
Expand Down
4 changes: 4 additions & 0 deletions tests/PHPStan/Command/CommandHelperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ public function testBegin(
null,
$level,
false,
false,
false,
);
if ($expectException) {
$this->fail();
Expand Down Expand Up @@ -307,6 +309,8 @@ public function testResolveParameters(
null,
'0',
false,
false,
false,
);
$parameters = $result->getContainer()->getParameters();
foreach ($expectedParameters as $name => $expectedValue) {
Expand Down

0 comments on commit f17cf9e

Please sign in to comment.