From f70f4f78e23388283715e28c07ef10208c1632df Mon Sep 17 00:00:00 2001 From: Sebastian Meyer Date: Tue, 21 Nov 2023 17:19:58 +0100 Subject: [PATCH] Add PHPStan GitHub workflow --- .github/workflows/phpstan.yml | 26 ++++++++++++++++++++++++++ phpstan.dist.neon | 2 +- 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/phpstan.yml diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml new file mode 100644 index 0000000..d87c436 --- /dev/null +++ b/.github/workflows/phpstan.yml @@ -0,0 +1,26 @@ +name: PHPStan + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + phpstan: + runs-on: ubuntu-latest + steps: + - name: Checkout Source Code + uses: actions/checkout@v4 + + - name: Install Dependencies + uses: php-actions/composer@v6 + with: + command: update + php_version: "8.0" + + - name: PHPStan Static Analysis + uses: php-actions/phpstan@v3 + with: + path: src/ + configuration: phpstan.dist.neon diff --git a/phpstan.dist.neon b/phpstan.dist.neon index 7a9d50f..6aa50a4 100644 --- a/phpstan.dist.neon +++ b/phpstan.dist.neon @@ -11,4 +11,4 @@ parameters: strictRules: noVariableVariables: false paths: - - src + - src/