mirror of
https://github.com/archtechx/template.git
synced 2025-12-12 21:34:04 +00:00
php-cs-fixer 3
This commit is contained in:
parent
277b63ab32
commit
31db877574
1 changed files with 4 additions and 4 deletions
8
check
8
check
|
|
@ -16,21 +16,21 @@ offer_run() {
|
||||||
exit 1
|
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'
|
echo '✅ php-cs-fixer OK'
|
||||||
else
|
else
|
||||||
read -p "⚠️ php-cs-fixer found issues. Fix (Y/n)? " fix
|
read -p "⚠️ php-cs-fixer found issues. Fix (Y/n)? " fix
|
||||||
case ${fix:0:1} in
|
case ${fix:0:1} in
|
||||||
n|N )
|
n|N )
|
||||||
echo '❌ php-cs-fixer FAIL'
|
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'
|
echo '✅ php-cs-fixer OK'
|
||||||
else
|
else
|
||||||
echo '❌ php-cs-fixer FAIL'
|
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
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue