Skip to content

Commit

Permalink
Github Actions: Add Phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
sukhwinder33445 committed Jul 12, 2023
1 parent 32e37b3 commit 489e618
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ jobs:

- name: Setup dependencies
run: composer require -n --no-progress overtrue/phplint
&& git clone --single-branch -b master https://github.com/Icinga/icingaweb2.git vendor/icingaweb2
&& git clone --single-branch -b master https://github.com/Icinga/icingaweb2-module-director.git vendor/director
&& git clone --single-branch -b snapshot/nightly https://github.com/Icinga/icinga-php-library.git vendor/icinga-php-library
&& git clone --single-branch -b snapshot/nightly https://github.com/Icinga/icinga-php-thirdparty.git vendor/icinga-php-thirdparty

- name: PHP Lint
if: success() || matrix.allow_failure
Expand All @@ -40,3 +44,7 @@ jobs:
- name: PHP CodeSniffer
if: success() || matrix.allow_failure
run: phpcs

- name: PHPStan
uses: php-actions/phpstan@v3
if: success() || matrix.allow_failure
19 changes: 19 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
parameters:
level: 5

checkFunctionNameCase: true
checkMissingIterableValueType: true
checkInternalClassCaseSensitivity: true
checkDynamicProperties: true

paths:
- application
- library

scanDirectories:
- vendor

universalObjectCratesClasses:
- ipl\Orm\Model
- Icinga\Web\View
- Icinga\Data\ConfigObject

0 comments on commit 489e618

Please sign in to comment.