Raise phpstan level to max

This commit is contained in:
Yonas Habteab 2023-08-16 12:25:07 +02:00 committed by Sukhwinder Dhillon
parent 7ba1aa7a6b
commit 2dfc9c2a63
2 changed files with 23 additions and 8 deletions

View file

@ -31,20 +31,21 @@ jobs:
tools: phpcs
- name: Setup dependencies
run: composer require -n --no-progress overtrue/phplint
&& git clone --single-branch --branch master https://github.com/Icinga/icingaweb2.git vendor/icingaweb2
&& git clone --single-branch --branch master https://github.com/Icinga/icingadb-web.git vendor/icingadb-web
&& git clone --single-branch --branch snapshot/nightly https://github.com/Icinga/icinga-php-library.git vendor/icinga-php-library
&& git clone --single-branch --branch snapshot/nightly https://github.com/Icinga/icinga-php-thirdparty.git vendor/icinga-php-thirdparty
run: |
composer require -n --no-progress overtrue/phplint
git clone --depth 1 https://github.com/Icinga/icingaweb2.git vendor/icingaweb2
git clone --depth 1 https://github.com/Icinga/icingadb-web.git vendor/icingadb-web
git clone --depth 1 -b snapshot/nightly https://github.com/Icinga/icinga-php-library.git vendor/icinga-php-library
git clone --depth 1 -b snapshot/nightly https://github.com/Icinga/icinga-php-thirdparty.git vendor/icinga-php-thirdparty
- name: PHP Lint
if: success() || matrix.allow_failure
run: ./vendor/bin/phplint -n --exclude={^vendor/.*} -- .
- name: PHP CodeSniffer
if: success() || matrix.allow_failure
if: always()
run: phpcs -wps --colors
- name: PHPStan
uses: php-actions/phpstan@v3
if: success() || matrix.allow_failure
if: always()

View file

@ -1,7 +1,21 @@
parameters:
level: 1
level: max
checkFunctionNameCase: true
checkInternalClassCaseSensitivity: true
treatPhpDocTypesAsCertain: false
paths:
- application
- library
scanDirectories:
- vendor
ignoreErrors:
- '#. but return statement is missing#'
universalObjectCratesClasses: # to ignore magic property errors
- ipl\Orm\Model
- Icinga\Web\View
- Icinga\Data\ConfigObject