Skip to content

Commit e075785

Browse files
committed
Removed phpmd. Using phpcbf instead of phpcs.
1 parent c02dffc commit e075785

File tree

1 file changed

+21
-21
lines changed

1 file changed

+21
-21
lines changed

bin/pre-commit

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ done
4545
if [ "$FILES" != "" ]
4646
then
4747
echo "Running Code Sniffer..."
48-
${PROJECT}/vendor/bin/phpcs --standard=PSR2 --encoding=utf-8 -n -p $FILES
48+
${PROJECT}/vendor/bin/phpcbf --standard=PSR1,PSR2 --encoding=utf-8 -n -p $FILES
4949
if [ $? != 0 ]
5050
then
5151
if [ -n "$STATIC_ANALYSIS_IGNORE_ERRORS" ]
@@ -58,28 +58,28 @@ then
5858
fi
5959
fi
6060

61-
echo "Checking PHP Mess Detector..."
61+
#echo "Checking PHP Mess Detector..."
6262

63-
PHPMD_CONFIG=${PROJECT}/vendor/coding-pioneers/laravel-php-code-analysis-hook/phpmd/phpmd.xml
63+
#PHPMD_CONFIG=${PROJECT}/vendor/coding-pioneers/laravel-php-code-analysis-hook/phpmd/phpmd.xml
6464
# CHECK IF USER HAS CUSTOM PHPMD configuration
65-
if [ -c "${PROJECT}/phpmd.xml" ]
66-
then
67-
PHPMD_CONFIG = ${PROJECT}/phpmd.xml
68-
fi
65+
#if [ -c "${PROJECT}/phpmd.xml" ]
66+
#then
67+
# PHPMD_CONFIG = ${PROJECT}/phpmd.xml
68+
#fi
6969

70-
for FILE in $SFILES
71-
do
72-
${PROJECT}/vendor/bin/phpmd $PROJECT/$FILE text $PHPMD_CONFIG
73-
if [ $? != 0 ]
74-
then
75-
if [ -n "$STATIC_ANALYSIS_IGNORE_ERRORS" ]
76-
then
77-
echo "PHP Mess Detector found some errors."
78-
else
79-
echo "Fix the PHP Mess Detector errors before commit."
80-
exit 1
81-
fi
82-
fi
83-
done
70+
#for FILE in $SFILES
71+
#do
72+
# ${PROJECT}/vendor/bin/phpmd $PROJECT/$FILE text $PHPMD_CONFIG
73+
# if [ $? != 0 ]
74+
# then
75+
# if [ -n "$STATIC_ANALYSIS_IGNORE_ERRORS" ]
76+
# then
77+
# echo "PHP Mess Detector found some errors."
78+
# else
79+
# echo "Fix the PHP Mess Detector errors before commit."
80+
# exit 1
81+
# fi
82+
# fi
83+
#done
8484

8585
exit $?

0 commit comments

Comments
 (0)