We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 416d508 commit 829b2e9Copy full SHA for 829b2e9
git-hooks/pre-commit
@@ -4,19 +4,14 @@
4
exec 1>&2
5
6
ROOT="$PWD"
7
-PHP_CS_FIXER="${ROOT}/vendor/bin/php-cs-fixer"
+PHP_CS_FIXER="${ROOT}/bin/php vendor/bin/php-cs-fixer"
8
PHP_CS_CONFIG="${ROOT}/.php_cs"
9
10
if [ ! -f "$PHP_CS_CONFIG" ]; then
11
echo "Please run 'git commit' from the root directory of the project"
12
exit 1
13
fi
14
15
-if [ ! -x "$PHP_CS_FIXER" ]; then
16
- echo "Please run 'composer install' first"
17
- exit 1
18
-fi
19
-
20
git status --porcelain | grep -e '^[AM]\(.*\).php$' | cut -c 3- | while read line; do
21
$PHP_CS_FIXER fix --config=$PHP_CS_CONFIG --verbose "$line";
22
git add "$line";
0 commit comments