Use vendor phpcs when available

This commit is contained in:
Zach Borboa
2021-03-13 09:15:47 -05:00
parent 03eedeabd4
commit 1c0bbeaee4
+9 -2
View File
@@ -122,9 +122,16 @@ if [[ ! -z "${is_null}" ]]; then
((errors++))
fi
# Determine which phpcs to use.
if [[ -f "../vendor/bin/phpcs" ]]; then
phpcs_to_use="../vendor/bin/phpcs"
else
phpcs_to_use="phpcs"
fi
# Detect coding standard violations.
phpcs --version
phpcs \
"${phpcs_to_use}" --version
"${phpcs_to_use}" \
--extensions="php" \
--ignore="*/vendor/*" \
--standard="ruleset.xml" \