We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent baf70c1 commit d1afd5fCopy full SHA for d1afd5f
.husky/pre-commit-phpcbf.sh
@@ -16,15 +16,13 @@ echo "Running PHPCBF on staged files..."
16
# First try to fix what we can with PHPCBF
17
echo "$STAGED_PHP_FILES" | xargs vendor/bin/phpcbf
18
19
-echo 'does this run?'
20
-
21
# Check the return code
22
PHPCBF_STATUS=$?
23
24
# If files were fixed, add them back to staging
25
if [ $PHPCBF_STATUS -ne 3 ]; then
26
echo "$STAGED_PHP_FILES" | xargs git add
27
+
28
if [ $PHPCBF_STATUS -eq 1 ] || [ $PHPCBF_STATUS -eq 2 ]; then
29
echo "\nShowing remaining errors after auto-fixing:"
30
echo "$STAGED_PHP_FILES" | xargs vendor/bin/phpcs
@@ -50,4 +48,4 @@ if [ $PHPCS_STATUS -ne 0 ]; then
50
48
fi
51
49
52
echo "✅ All coding standards checks passed!"
53
-exit 0
+exit 0
0 commit comments