Skip to content

Commit 1ef006f

Browse files
committed
Prohibit screaming caps notation in php files
1 parent 4a78a38 commit 1ef006f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/script.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,10 @@ if [[ ! -z "${at_author}" ]]; then
7777
echo -e "${at_author}" | perl -pe 's/^(.*)$/\@author found in \1/'
7878
exit 1
7979
fi
80+
81+
# Prohibit screaming caps notation in php files.
82+
caps=$(find . -type "f" -iname "*.php" ! -path "*/vendor/*" -exec egrep --color=always --line-number -H -e "FALSE[^']" -e "NULL" -e "TRUE" {} \;)
83+
if [[ ! -z "${caps}" ]]; then
84+
echo -e "${caps}" | perl -pe 's/^(.*)$/All caps found in \1/'
85+
exit 1
86+
fi

0 commit comments

Comments
 (0)