This file contains 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 | |
stagedFiles=$(git diff-index --cached HEAD | grep ".php" | grep "^:" | cut -f2); | |
phpLintErrors=0 | |
echo "PHP will now lint all the php staged files..." | |
echo "" | |
for file in $stagedFiles | |
do | |
echo "PHP is linting $file..."; | |
echo "" | |
php -l $file |