Refactor various code.

This commit is contained in:
James Cole
2023-11-04 17:26:38 +01:00
parent e41236495f
commit 1059da8a2a
50 changed files with 421 additions and 315 deletions

View File

@@ -45,7 +45,7 @@ PHP_CS_FIXER_IGNORE_ENV=true
./vendor/bin/php-cs-fixer fix \
--config $SCRIPT_DIR/php-cs-fixer/.php-cs-fixer.php \
--format=$OUTPUT_FORMAT \
--allow-risky=yes $EXTRA_PARAMS \
--allow-risky=yes $EXTRA_PARAMS
EXIT_CODE=$?

View File

@@ -31,16 +31,15 @@ SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
# Do static code analysis.
if [[ $GITHUB_ACTIONS = "" ]]
then
./vendor/bin/phpstan analyse -c .ci/phpstan.neon --no-progress --error-format=table > phpstan-report.txt
./vendor/bin/phpstan analyse -c .ci/phpstan.neon --error-format=table > phpstan-report.txt
EXIT_CODE=$?
echo 'The PHPstan report can be found in phpstan-report.txt'
fi
if [[ $GITHUB_ACTIONS = "true" ]]
then
./vendor/bin/phpstan analyse -c .ci/phpstan.neon --no-progress --error-format=github > phpstan-report.txt
./vendor/bin/phpstan analyse -c .ci/phpstan.neon --no-progress --error-format=github
EXIT_CODE=$?
cat phpstan-report.txt
fi
exit $EXIT_CODE