mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-09-16 21:36:33 +00:00
Require using identical comparison operators
This commit is contained in:
@@ -84,3 +84,10 @@ if [[ ! -z "${caps}" ]]; then
|
||||
echo -e "${caps}" | perl -pe 's/^(.*)$/All caps found in \1/'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Require identical comparison operators (===, not ==) in php files.
|
||||
equal=$(find . -type "f" -iname "*.php" ! -path "*/vendor/*" -exec egrep --color=always --line-number -H "[^!=]==[^=]" {} \;)
|
||||
if [[ ! -z "${equal}" ]]; then
|
||||
echo -e "${equal}" | perl -pe 's/^(.*)$/Non-identical comparison operator found in \1/'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user