fix static analysis

This commit is contained in:
Dennis Eichhorn 2023-04-09 06:03:39 +02:00
parent 60e9a40727
commit 3f70bd745b
3 changed files with 14 additions and 4 deletions

View File

@ -1,11 +1,12 @@
includes:
- phpstan-baseline.neon
parameters:
bootstrapFiles:
- phpstan_autoloader.php
fileExtensions:
- php
scanDirectories:
- ../../Resources/tcpdf
- ../../Resources/PhpOffice
universalObjectCratesClasses:
- Stripe\StripeObject
reportUnmatchedIgnoredErrors: false
inferPrivatePropertyTypeFromConstructor: true
checkMissingIterableValueType: false

View File

@ -0,0 +1,9 @@
<?php
require_once __DIR__ . '/../../phpOMS/Autoloader.php';
use phpOMS\Autoloader;
Autoloader::addPath(__DIR__ . '/../../Resources');
Autoloader::addPath(__DIR__ . '/../../Resources/tcpdf');
Autoloader::addPath(__DIR__ . '/../../Resources/Stripe');

View File

@ -16,7 +16,7 @@ printf "\nPHPCS checks\n\n"
./vendor/bin/phpcs --severity=1 ./ --standard="Build/Config/phpcs.xml"
printf "\nPHPStan checks\n\n"
./vendor/bin/phpstan analyse --autoload-file=phpOMS/Autoloader.php -l 9 -c Build/Config/phpstan.neon ./
./vendor/bin/phpstan analyse -l 9 -c Build/Config/phpstan.neon ./
printf "\nESlint checks\n\n"
npx eslint jsOMS/ -c Build/Config/.eslintrc.json