From 4c2d5a981cd364a0e88d832a49a9817306c277cc Mon Sep 17 00:00:00 2001 From: Sukhwinder Dhillon Date: Mon, 19 Jun 2023 13:39:59 +0200 Subject: [PATCH] Github Actions: Add PhpStan --- .github/workflows/php.yml | 4 ++++ phpstan.neon | 15 +++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 phpstan.neon diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index e3b794fa..5496b394 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -41,6 +41,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 }} diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 00000000..c96f843e --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,15 @@ +parameters: + level: max + checkGenericClassInNonGenericObjectType: false + checkFunctionNameCase: true + checkMissingIterableValueType: false + checkInternalClassCaseSensitivity: true + + paths: + - src + + scanDirectories: + - vendor + + ignoreErrors: + - '#Unsafe usage of new static\(\)#' \ No newline at end of file