Skip to content

Commit

Permalink
Merge pull request #71 from PHPCSStandards/feature/phpstan-tweaks
Browse files Browse the repository at this point in the history
PHPStan setup: various tweaks
  • Loading branch information
jrfnl authored Nov 10, 2023
2 parents 9239861 + 38291f6 commit ca7fa68
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
push:
paths-ignore:
- '**.md'
- '**.xml'
pull_request:
# Allow manually triggering the workflow.
workflow_dispatch:
Expand All @@ -18,7 +19,7 @@ concurrency:

jobs:
phpstan:
name: "PHP: 7.4 | PHPStan"
name: "PHPStan"

runs-on: "ubuntu-latest"

Expand All @@ -43,4 +44,4 @@ jobs:
custom-cache-suffix: $(date -u "+%Y-%m")

- name: Run PHPStan
run: phpstan analyse --configuration=phpstan.neon
run: phpstan analyse
3 changes: 2 additions & 1 deletion phpstan.neon → phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
parameters:
phpVersion: 70100 # Should be 50400, but PHPStan only accepts 70100 or higher...
level: 0
paths:
- src
Expand All @@ -8,7 +9,7 @@ parameters:
-
count: 1
message: '~^Undefined variable: \$phpCodeSnifferConfig$~'
path: %currentWorkingDirectory%/src/Config.php
path: src/Config.php

dynamicConstantNames:
- PHP_CODESNIFFER_IN_TESTS
Expand Down

0 comments on commit ca7fa68

Please sign in to comment.