Tobias Quathamer
aa8725eb58
https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/doc/usage.rst#using-php-cs-fixer-on-ci
12 lines
351 B
Bash
Executable file
12 lines
351 B
Bash
Executable file
#!/bin/bash
|
|
#
|
|
# Checks the PHP CS syntax
|
|
#
|
|
if ! echo "${CHANGED_FILES}" | grep -qE "^(\\.php-cs-fixer(\\.dist)?\\.php|composer\\.lock)$"; then
|
|
EXTRA_ARGS=$(printf -- '--path-mode=intersection\n--\n%s' "${CHANGED_FILES}");
|
|
else
|
|
EXTRA_ARGS='';
|
|
fi
|
|
|
|
./vendor/bin/php-cs-fixer fix -v --diff --dry-run --stop-on-violation --using-cache=no ${EXTRA_ARGS}
|