Skip to content

Commit

Permalink
Fix the PHPCSFixer return result
Browse files Browse the repository at this point in the history
  • Loading branch information
kayw-geek committed Oct 12, 2022
1 parent d8d74fa commit 8716667
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Command/RunCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,10 @@ private function runPhpCsFixerFix(OutputInterface $output, string $change_files_
$output->writeln('<info> PHP Cs Fixer Fixing ... </info>');
$base_path = $this->getPath();
exec("$base_path/vendor/bin/php-cs-fixer fix --config $base_path/$this->phpCsFixerConfig $change_files_string", $execute_output, $result_code);

if (!$execute_output == []) {
if ($execute_output !== [] && $execute_output[0] !== '') {
return self::FAILURE;
}

return $result_code;
}

Expand Down

0 comments on commit 8716667

Please # to comment.