@@ -24,39 +24,10 @@ if [ "$FILES" != "" ]; then
2424 echo " Running PHP CS Fixer..."
2525
2626 # Run on whole codebase to skip on unnecessary filtering
27- # Run first on app, admin, public
28- if [ -d /proc/cygdrive ]; then
29- ./utils/vendor/bin/php-cs-fixer fix --verbose --dry-run --diff --config=.php-cs-fixer.no-header.php
30- else
31- php ./utils/vendor/bin/php-cs-fixer fix --verbose --dry-run --diff --config=.php-cs-fixer.no-header.php
32- fi
33-
34- if [ $? != 0 ]; then
35- echo " Files in app, admin, or public are not following the coding standards. Please fix them before commit."
36- exit 1
37- fi
38-
39- # Next, run on system, tests, utils, and root PHP files
40- if [ -d /proc/cygdrive ]; then
41- ./utils/vendor/bin/php-cs-fixer fix --verbose --dry-run --diff
42- else
43- php ./utils/vendor/bin/php-cs-fixer fix --verbose --dry-run --diff
44- fi
45-
46- if [ $? != 0 ]; then
47- echo " Files in system, tests, utils, or root are not following the coding standards. Please fix them before commit."
48- exit 1
49- fi
50-
51- # Next, run on user_guide_src/source PHP files
52- if [ -d /proc/cygdrive ]; then
53- ./utils/vendor/bin/php-cs-fixer fix --verbose --dry-run --diff --config=.php-cs-fixer.user-guide.php
54- else
55- php ./utils/vendor/bin/php-cs-fixer fix --verbose --dry-run --diff --config=.php-cs-fixer.user-guide.php
56- fi
27+ composer cs
5728
5829 if [ $? != 0 ]; then
59- echo " Files in user_guide_src/source are not following the coding standards. Please fix them before commit."
30+ echo " There are PHP files which are not following the coding standards. Please fix them before commit."
6031 exit 1
6132 fi
6233fi
0 commit comments