Github Actions: Add Phpstan

This commit is contained in:
Sukhwinder Dhillon 2023-06-19 14:49:28 +02:00
parent aaff1c3f58
commit 4f6c550ff3
2 changed files with 16 additions and 0 deletions

View file

@ -32,6 +32,9 @@ jobs:
- 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 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
- name: PHP Lint
if: success() || matrix.allow_failure
@ -40,3 +43,7 @@ jobs:
- name: PHP CodeSniffer
if: success() || matrix.allow_failure
run: phpcs -wps --colors
- name: PHPStan
uses: php-actions/phpstan@v3
if: success() || matrix.allow_failure

9
phpstan.neon Normal file
View file

@ -0,0 +1,9 @@
parameters:
level: 1
paths:
- application
- library
scanDirectories:
- vendor
ignoreErrors:
- '#Unsafe usage of new static\(\)#'