From 264cb4384e97fdac4d34ba7b587611f5162240ca Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Fri, 7 Feb 2020 21:44:24 +0100 Subject: [PATCH] improve code inspection --- Config/phpstan.neon | 1 + Helper/testreport.sh | 2 ++ 2 files changed, 3 insertions(+) diff --git a/Config/phpstan.neon b/Config/phpstan.neon index 298c973..58f876a 100755 --- a/Config/phpstan.neon +++ b/Config/phpstan.neon @@ -5,6 +5,7 @@ parameters: fileExtensions: - php reportUnmatchedIgnoredErrors: false + inferPrivatePropertyTypeFromConstructor: true excludes_analyse: - *.tpl.php - */tests/* diff --git a/Helper/testreport.sh b/Helper/testreport.sh index 42d508c..ea105a7 100644 --- a/Helper/testreport.sh +++ b/Helper/testreport.sh @@ -1,8 +1,10 @@ #!/bin/bash php phpcs.phar ./ --standard="Build/Config/phpcs.xml" -s --report-junit=Build/test/junit_phpcs.xml +php phpcs.phar ./ --standard="Build/Config/phpcs.xml" php phpstan.phar analyse --autoload-file=phpOMS/Autoloader.php -l 7 -c Build/Config/phpstan.neon --error-format=prettyJson ./ > Build/test/phpstan.json +php phpstan.phar analyse --autoload-file=phpOMS/Autoloader.php -l 7 -c Build/Config/phpstan.neon ./ # Remove empty lines and lines with warnings which corrupt the json format sed -i '/^$/d' Build/test/phpstan.json