Skip to content

Commit

Permalink
php-cs-fixer 3
Browse files Browse the repository at this point in the history
  • Loading branch information
stancl authored May 24, 2021
1 parent 277b63a commit 31db877
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions check
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ offer_run() {
exit 1
}

if (php-cs-fixer fix --dry-run --config=.php_cs.php > /dev/null 2>/dev/null); then
if (php-cs-fixer fix --dry-run --config=.php-cs-fixer.php > /dev/null 2>/dev/null); then
echo '✅ php-cs-fixer OK'
else
read -p "⚠️ php-cs-fixer found issues. Fix (Y/n)? " fix
case ${fix:0:1} in
n|N )
echo '❌ php-cs-fixer FAIL'
offer_run 'php-cs-fixer fix --config=.php_cs.php'
offer_run 'php-cs-fixer fix --config=.php-cs-fixer.php'
;;
* )
if (php-cs-fixer fix --config=.php_cs.php > /dev/null 2>/dev/null); then
if (php-cs-fixer fix --config=.php-cs-fixer.php > /dev/null 2>/dev/null); then
echo '✅ php-cs-fixer OK'
else
echo '❌ php-cs-fixer FAIL'
offer_run 'php-cs-fixer fix --config=.php_cs.php'
offer_run 'php-cs-fixer fix --config=.php-cs-fixer.php'
fi
;;
esac
Expand Down

0 comments on commit 31db877

Please sign in to comment.