diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 12d1283..6ec216c 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -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() diff --git a/phpstan.neon b/phpstan.neon index 11f1c2c..4f01829 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -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