Add PHPSTAN config

phpcs-errors:226 phpunit-status:successful phpstan-errors:202
This commit is contained in:
2020-08-22 15:53:10 +02:00
committed by Stefan Rohde-Enslin
parent 34c475f3d6
commit b61b00c540
4 changed files with 24 additions and 2 deletions

16
phpstan.neon Normal file
View File

@ -0,0 +1,16 @@
parameters:
level: 8
paths:
- csv.php
- index.php
- index3.php
- index6.php
- upload.php
- zipit.php
- classes
- functions
- inc
- tests
ignoreErrors:
- '#Class MDDBConnectionImpossible not found.#'
- '#Class MDMysqliExpectedError not found.#'

View File

@ -38,3 +38,9 @@ if [ "$PHPUNIT_EC" = "1" ]; then
else
echo "phpunit-status:successful";
fi
PHPSTAN_TEST_BASE_DIR="/var/www/vhosts/museum-digital.de/sandkasten.museum-digital.de"
PHPSTAN_CONF_BASE_DIR="/var/www/vhosts/museum-digital.de/csvxml.imports.museum-digital.org"
PHPSTAN_ERRORS=$(php $PHPSTAN_TEST_BASE_DIR/vendor/bin/phpstan analyze --error-format raw -c $PHPSTAN_CONF_BASE_DIR/phpstan.neon -l 8 | wc -l)
echo "phpstan-errors:$PHPSTAN_ERRORS"