Skip to content

Commit 29a7ff1

Browse files
committed
Add .phpstan.neon, ignore phpstan error for now
1 parent 46d40b8 commit 29a7ff1

File tree

4 files changed

+32
-3
lines changed

4 files changed

+32
-3
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/.docker export-ignore
22
/.gitattributes export-ignore
33
/.gitignore export-ignore
4-
/.travis.yml export-ignore
4+
/.phpstan.neon export-ignore
55
/docker-compose.yml export-ignore
66
/docs export-ignore
77
/phpunit.xml export-ignore

.github/workflows/phpstan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ jobs:
3333
uses: "ramsey/composer-install@v2"
3434

3535
- name: Run PHPStan
36-
run: vendor/bin/phpstan.phar analyze src --level 8
36+
run: composer run phpstan

.phpstan.neon

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
parameters:
2+
level: 8
3+
4+
paths:
5+
- src/
6+
7+
scanDirectories:
8+
- vendor
9+
10+
ignoreErrors:
11+
-
12+
message: "#^Class Art4\\\\JsonApiClient\\\\Helper\\\\AccessKey extends generic class SplStack but does not specify its types\\: TValue$#"
13+
count: 1
14+
path: src/Helper/AccessKey.php
15+
16+
-
17+
message: "#^Property Art4\\\\JsonApiClient\\\\V1\\\\ResourceNull\\:\\:\\$data is never read, only written\\.$#"
18+
count: 1
19+
path: src/V1/ResourceNull.php
20+
21+
-
22+
message: "#^Property Art4\\\\JsonApiClient\\\\V1\\\\ResourceNull\\:\\:\\$manager is never read, only written\\.$#"
23+
count: 1
24+
path: src/V1/ResourceNull.php
25+
26+
-
27+
message: "#^Property Art4\\\\JsonApiClient\\\\V1\\\\ResourceNull\\:\\:\\$parent is never read, only written\\.$#"
28+
count: 1
29+
path: src/V1/ResourceNull.php

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
}
3232
},
3333
"scripts": {
34-
"phpstan": "phpstan analyze src --memory-limit 512M --level 8",
34+
"phpstan": "phpstan analyze --memory-limit 512M --configuration .phpstan.neon",
3535
"phpunit": "phpunit"
3636
},
3737
"config": {

0 commit comments

Comments
 (0)