Skip to content

Commit 3740259

Browse files
committed
Removing PHP-CS-Fixer support
Too verbosity on the output, and there is no gain running other validations different from the PSR ones that are alreadt performed by CodeSniffer.
1 parent a732cb3 commit 3740259

File tree

2 files changed

+7
-18
lines changed

2 files changed

+7
-18
lines changed

config.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# path to binaries
22
PHPCS_BIN=/usr/local/bin/phpcs
3-
PHPCSFIXER_BIN=/Users/davimarcondes/.composer/vendor/bin/php-cs-fixer
43
PHPMD_BIN=/usr/local/bin/phpmd
54

65
# the coding standard, you can also specify a path to your own standard here

pre-commit

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#
66
# This hook performs the following validation:
77
# - PHP CodeSniffer
8-
# - PHP-CS Fixer (only in --dry-run mode)
98
# - PHP Mess Detector
109
#
1110
# Based on https://gist.github.com/codemis/8225337
@@ -15,7 +14,6 @@
1514
##########
1615

1716
PHPCS_BIN=/usr/bin/phpcs
18-
PHPCSFIXER_BIN=/usr/bin/php-cs-fixer
1917
PHPMD_BIN=/usr/bin/phpmd
2018
PHPCS_CODING_STANDARD=PEAR
2119
PHPCS_IGNORE=
@@ -121,18 +119,10 @@ PHPCS_RETVAL=$?
121119

122120
if [ $PHPCS_RETVAL -ne 0 ]; then
123121
echo "$PHPCS_OUTPUT" | less
124-
else
125-
echo " :: Inspection is OK! :: "
126-
fi
127122

128-
echo ""
129-
echo " :: PHP CS Fixer inspection :: "
130-
echo ""
131-
PHPCSFIXER_OUTPUT=$($PHPCSFIXER_BIN fix $STAGED_FILES --level=psr2 --dry-run --diff)
132-
PHPCSFIXER_RETVAL=$?
123+
rm -rf $TMP_STAGING
133124

134-
if [ $PHPCSFIXER_RETVAL -ne 0 ]; then
135-
echo "$PHPCSFIXER_OUTPUT" | less
125+
exit $PHPCS_RETVAL
136126
else
137127
echo " :: Inspection is OK! :: "
138128
fi
@@ -145,12 +135,12 @@ PHPMD_RETVAL=$?
145135

146136
if [ $PHPMD_RETVAL -ne 0 ]; then
147137
echo "$PHPMD_OUTPUT" | less
138+
139+
rm -rf $TMP_STAGING
140+
141+
exit $PHPMD_RETVAL
148142
else
149143
echo " :: Inspection is OK! :: "
150144
fi
151145

152-
153-
# delete temporary copy of staging area
154-
rm -rf $TMP_STAGING
155-
156-
exit $PHPCS_RETVAL
146+
exit 0;

0 commit comments

Comments
 (0)