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 Aug 18, 2023
1 parent a601fae commit bf2849d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:

- name: Setup dependencies
run: composer require -n --no-progress overtrue/phplint
&& 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
Expand All @@ -41,6 +43,10 @@ jobs:
if: success() || matrix.allow_failure
run: phpcs -wps --colors

- name: PHPStan
uses: php-actions/phpstan@v3
if: success() || matrix.allow_failure

test:
name: Unit tests with php ${{ matrix.php }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand Down
11 changes: 11 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
parameters:
level: max

checkMissingIterableValueType: false
checkGenericClassInNonGenericObjectType: false

paths:
- src

scanDirectories:
- vendor
4 changes: 4 additions & 0 deletions src/X509CertValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ class X509CertValidator extends BaseValidator
{
use Translation;

/**
* @param String $value
* @return bool
*/
public function isValid($value)
{
// Multiple isValid() calls must not stack validation messages
Expand Down

0 comments on commit bf2849d

Please sign in to comment.