Skip to content

Commit

Permalink
Detect --generate-baseline combined with --pro
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jun 1, 2024
1 parent 1310ce9 commit dd028cb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Command/AnalyseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int
}

if ($fix) {
if ($generateBaselineFile !== null) {
$inceptionResult->getStdOutput()->getStyle()->error('You cannot pass the --generate-baseline option when running PHPStan Pro.');
return $inceptionResult->handleReturn(1, null);
}

return $this->runFixer($inceptionResult, $container, $onlyFiles, $input, $output, $files);
}

Expand Down

0 comments on commit dd028cb

Please sign in to comment.