-
-
Save cirops/4250796 to your computer and use it in GitHub Desktop.
Quality Assurance PHP (checks if the programs exist in the system)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PROGRAMS=(phpmd php-cs-fixer phpcpd phploc) | |
for PROGRAM in ${PROGRAMS[*]}; | |
do | |
command -v $PROGRAM >/dev/null 2>&1 || { echo "I require $PROGRAM but it's not installed. Aborting." >&2; exit 1; } | |
done | |
echo "=======================================================================================" | |
echo "Fixing code standard" | |
echo "=======================================================================================" | |
php-cs-fixer fix $PWD/src/ | |
echo "Ok done ;)" | |
echo "" | |
echo "=======================================================================================" | |
echo "Lets see the mess in our code" | |
echo "=======================================================================================" | |
phpmd $PWD/src/ text codesize,unusedcode,naming,design,controversial | |
echo "" | |
echo "=======================================================================================" | |
echo "Lets see if you like ctrl + c and ctrl + v" | |
echo "=======================================================================================" | |
phpcpd $PWD/src/ | |
echo "" | |
echo "=======================================================================================" | |
echo "What about your code? code says about everything let's see..." | |
echo "=======================================================================================" | |
phploc $PWD/src/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment