Add PHPSTAN config

phpcs-errors:226 phpunit-status:successful phpstan-errors:202
This commit is contained in:
Joshua Ramon Enslin 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

@ -1 +1 @@
Subproject commit 59223ad7783e23148858a1a2170ebc3571b9c3f8 Subproject commit bbaa799fa5fbc5104fb7024fffc983b14ec50e75

@ -1 +1 @@
Subproject commit b8d8be54b9a21945be4a9396b6065ac4cc940deb Subproject commit bac86627e2acda01a1917d48050af8313be7d60d

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 else
echo "phpunit-status:successful"; echo "phpunit-status:successful";
fi 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"