X-Git-Url: https://git.mxchange.org/?p=core.git;a=blobdiff_plain;f=contrib%2Ffind-bad-php.sh;h=45d6e7afd6e21594da63dd18b17c75d75e4446e5;hp=6febfcfc0d009f5c817dafe93bc27379372c6db4;hb=d36b71662543fa85c8919951a687d99cc504c244;hpb=6bf60b1accb36abe10787a06fc4d663f0c78efa9 diff --git a/contrib/find-bad-php.sh b/contrib/find-bad-php.sh index 6febfcfc..45d6e7af 100755 --- a/contrib/find-bad-php.sh +++ b/contrib/find-bad-php.sh @@ -5,18 +5,17 @@ PHP=$(find -type f -name "*.php" 2>&1 | grep -v "third_party" | grep -v "/vendor for SCRIPT in ${PHP}; do - HEADER=$(cat ${SCRIPT} | head -n 1 | grep -v "") - FOOTER=$(cat ${SCRIPT} | tail -n 1 | grep "?>") - - if [ -n "${HEADER}" ]; + if [ -n "${SHORT_OPEN_TAG}" ]; then - echo "$0: Script '${SCRIPT}' has non-typical header." + echo "$0: Script '${SCRIPT}' has short opening tag ()." fi LINT=$(php -l "${SCRIPT}" 2>&1 | grep -v "Constant FUSE_EDEADLK already defined in Unknown on line 0" | grep -v "No syntax errors detected in")