Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Commit

Permalink
Add wrapped phpcbf in order to run from node
Browse files Browse the repository at this point in the history
  • Loading branch information
Vicente Canales committed Aug 24, 2023
1 parent e976f68 commit 147d8db
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions bin/phpcbf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash
# Wrap phpcbf to turn 1 success exit code into 0 code.
# See https://github.com/squizlabs/PHP_CodeSniffer/issues/1818#issuecomment-354420927

root=$( dirname "$0" )/..

"$root/vendor/bin/phpcbf" $@
exit=$?

# Exit code 1 is used to indicate that all fixable errors were fixed correctly.
if [[ $exit == 1 ]]; then
exit=0
fi

exit $exit

0 comments on commit 147d8db

Please sign in to comment.