mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-27 18:50:43 +00:00
13 lines
439 B
Bash
13 lines
439 B
Bash
# Check syntax in php files.
|
|
find . -type "f" -iname "*.php" | xargs -L "1" php -l
|
|
|
|
# Check for trailing whitespace in php files.
|
|
trailing_whitespace=$(find . -type "f" -iname "*.php" -exec egrep --line-number -H " +$" {} \;)
|
|
if [[ ! -z "${trailing_whitespace}" ]]; then
|
|
echo -e "${trailing_whitespace}" | perl -pe 's/^(.*)$/Trailing whitespace found in \1/'
|
|
exit 1
|
|
fi
|
|
|
|
# Run tests.
|
|
cd tests && phpunit --configuration phpunit.xml
|