Skip to content

Commit 5d6aa80

Browse files
committed
CI: add PHPStan to detect additional PHP issues
1 parent b5858e4 commit 5d6aa80

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed

.github/workflows/php.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,8 @@ jobs:
4343
run: ./vendor/bin/php-cs-fixer fix --dry-run --diff
4444
env:
4545
PHP_CS_FIXER_IGNORE_ENV: 1
46+
47+
- name: PHPStan
48+
run: ./vendor/bin/phpstan analyze src --no-progress
49+
env:
50+
PHP_CS_FIXER_IGNORE_ENV: 1

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@
2525
"php-http/mock-client": "^1.0",
2626
"guzzlehttp/psr7": "^1.2",
2727
"cache/array-adapter": "^1.1.0",
28-
"friendsofphp/php-cs-fixer": "^3.0"
28+
"friendsofphp/php-cs-fixer": "^3.0",
29+
"phpstan/phpstan": "^1.2"
2930
},
3031
"autoload": {
3132
"psr-4": { "PrivatePackagist\\ApiClient\\": "src/" }

phpstan.neon

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
parameters:
2+
level: 0
3+
paths:
4+
- src
5+
- tests

0 commit comments

Comments
 (0)