Skip to content

Commit

Permalink
Add .phpstan.neon, ignore phpstan error for now
Browse files Browse the repository at this point in the history
  • Loading branch information
Art4 committed Oct 12, 2023
1 parent 46d40b8 commit 29a7ff1
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/.docker export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/.phpstan.neon export-ignore
/docker-compose.yml export-ignore
/docs export-ignore
/phpunit.xml export-ignore
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ jobs:
uses: "ramsey/composer-install@v2"

- name: Run PHPStan
run: vendor/bin/phpstan.phar analyze src --level 8
run: composer run phpstan
29 changes: 29 additions & 0 deletions .phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
parameters:
level: 8

paths:
- src/

scanDirectories:
- vendor

ignoreErrors:
-
message: "#^Class Art4\\\\JsonApiClient\\\\Helper\\\\AccessKey extends generic class SplStack but does not specify its types\\: TValue$#"
count: 1
path: src/Helper/AccessKey.php

-
message: "#^Property Art4\\\\JsonApiClient\\\\V1\\\\ResourceNull\\:\\:\\$data is never read, only written\\.$#"
count: 1
path: src/V1/ResourceNull.php

-
message: "#^Property Art4\\\\JsonApiClient\\\\V1\\\\ResourceNull\\:\\:\\$manager is never read, only written\\.$#"
count: 1
path: src/V1/ResourceNull.php

-
message: "#^Property Art4\\\\JsonApiClient\\\\V1\\\\ResourceNull\\:\\:\\$parent is never read, only written\\.$#"
count: 1
path: src/V1/ResourceNull.php
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
}
},
"scripts": {
"phpstan": "phpstan analyze src --memory-limit 512M --level 8",
"phpstan": "phpstan analyze --memory-limit 512M --configuration .phpstan.neon",
"phpunit": "phpunit"
},
"config": {
Expand Down

0 comments on commit 29a7ff1

Please sign in to comment.