mirror of
https://github.com/archtechx/template.git
synced 2025-12-11 21:14:02 +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
|
||||
}
|
||||
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue