2021-05-13 20:36:44 +02:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
|
|
|
# Checks the PHP CS syntax
|
|
|
|
#
|
2024-01-15 15:07:45 +01:00
|
|
|
if ! echo "${CHANGED_FILES}" | grep -qE "^(\\.php-cs-fixer(\\.dist)?\\.php|composer\\.lock)$"; then
|
2021-05-13 20:36:44 +02:00
|
|
|
EXTRA_ARGS=$(printf -- '--path-mode=intersection\n--\n%s' "${CHANGED_FILES}");
|
|
|
|
else
|
|
|
|
EXTRA_ARGS='';
|
|
|
|
fi
|
|
|
|
|
2024-03-16 00:17:29 +01:00
|
|
|
./bin/dev/php-cs-fixer/vendor/bin/php-cs-fixer fix -v --diff --dry-run --stop-on-violation --using-cache=no ${EXTRA_ARGS}
|