diff --git a/src/Command/AnalyseCommand.php b/src/Command/AnalyseCommand.php index 45d3393880..513a9b8697 100644 --- a/src/Command/AnalyseCommand.php +++ b/src/Command/AnalyseCommand.php @@ -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); }