Skip to content
This repository has been archived by the owner on Dec 14, 2020. It is now read-only.

Commit

Permalink
Merge pull request #10 from karriereat/bugfix/handle-phpcbf-exit-codes
Browse files Browse the repository at this point in the history
Handle PHPCBF exit codes correctly
  • Loading branch information
jaylinski authored Nov 20, 2019
2 parents 029268d + 892dde2 commit 63df36a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/CodeStyleFixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,10 @@ public static function run(Event $event)

$composerIO->write($process->getOutput());

$exitCode = $process->getExitCode();

if ($exitCode !== ComposerScriptInterface::EXIT_CODE_OK) {
throw new ProcessFailedException($process);
}

return $exitCode;
// PHPCBF exit codes:
// 0 = Nothing was fixed by PHPCBF.
// 1 = PHPCBF fixed all fixable errors.
// 2 = PHPCBF fixed some fixable errors, but others failed to fix.
return $process->getExitCode();
}
}

0 comments on commit 63df36a

Please sign in to comment.