Add php cs fixer and some rule sets.

This commit is contained in:
James Cole
2022-10-30 12:21:41 +01:00
parent 914dc8596b
commit 8edfb1460c
6 changed files with 2093 additions and 0 deletions

View File

@@ -23,9 +23,17 @@
# Install composer packages
#composer install --no-scripts --no-ansi
SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
# enable test .env file.
# cp .ci/.env.ci .env
# clean up php code
cd $SCRIPT_DIR/php-cs-fixer
composer update
./vendor/bin/php-cs-fixer fix $SCRIPT_DIR/../app/Console --config $SCRIPT_DIR/php-cs-fixer/.php-cs-fixer.php --allow-risky=yes
cd $SCRIPT_DIR/..
# Do static code analysis.
# ./vendor/bin/phpstan analyse -c .ci/phpstan.neon --no-progress
./vendor/bin/phpstan analyse -c .ci/phpstan.neon