Skip to content

Commit 9f9c2ea

Browse files
committed
Use PhpStan level 6
New baseline errors are array types that I prefer to leave alone, as well as one PhpStan bug: phpstan/phpstan#4526
1 parent f98341f commit 9f9c2ea

File tree

2 files changed

+121
-1
lines changed

2 files changed

+121
-1
lines changed

phpstan-baseline.neon

+120
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,100 @@
11
parameters:
22
ignoreErrors:
3+
-
4+
message: "#^Method PhpParser\\\\Builder\\\\ClassConst\\:\\:__construct\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#"
5+
count: 1
6+
path: lib/PhpParser/Builder/ClassConst.php
7+
8+
-
9+
message: "#^Method PhpParser\\\\Builder\\\\ClassConst\\:\\:addConst\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#"
10+
count: 1
11+
path: lib/PhpParser/Builder/ClassConst.php
12+
13+
-
14+
message: "#^Method PhpParser\\\\BuilderFactory\\:\\:args\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#"
15+
count: 1
16+
path: lib/PhpParser/BuilderFactory.php
17+
18+
-
19+
message: "#^Method PhpParser\\\\BuilderFactory\\:\\:attribute\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#"
20+
count: 1
21+
path: lib/PhpParser/BuilderFactory.php
22+
23+
-
24+
message: "#^Method PhpParser\\\\BuilderFactory\\:\\:classConst\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#"
25+
count: 1
26+
path: lib/PhpParser/BuilderFactory.php
27+
28+
-
29+
message: "#^Method PhpParser\\\\BuilderFactory\\:\\:funcCall\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#"
30+
count: 1
31+
path: lib/PhpParser/BuilderFactory.php
32+
33+
-
34+
message: "#^Method PhpParser\\\\BuilderFactory\\:\\:methodCall\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#"
35+
count: 1
36+
path: lib/PhpParser/BuilderFactory.php
37+
38+
-
39+
message: "#^Method PhpParser\\\\BuilderFactory\\:\\:new\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#"
40+
count: 1
41+
path: lib/PhpParser/BuilderFactory.php
42+
43+
-
44+
message: "#^Method PhpParser\\\\BuilderFactory\\:\\:staticCall\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#"
45+
count: 1
46+
path: lib/PhpParser/BuilderFactory.php
47+
48+
-
49+
message: "#^Method PhpParser\\\\BuilderFactory\\:\\:val\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#"
50+
count: 1
51+
path: lib/PhpParser/BuilderFactory.php
52+
53+
-
54+
message: "#^Method PhpParser\\\\BuilderHelpers\\:\\:normalizeValue\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#"
55+
count: 1
56+
path: lib/PhpParser/BuilderHelpers.php
57+
58+
-
59+
message: "#^Method PhpParser\\\\ConstExprEvaluator\\:\\:evaluateArray\\(\\) return type has no value type specified in iterable type array\\.$#"
60+
count: 1
61+
path: lib/PhpParser/ConstExprEvaluator.php
62+
363
-
464
message: "#^Unary operation \"~\" on mixed results in an error\\.$#"
565
count: 1
666
path: lib/PhpParser/ConstExprEvaluator.php
767

68+
-
69+
message: "#^Method PhpParser\\\\Internal\\\\TokenPolyfill\\:\\:fixupBadCharacters\\(\\) has parameter \\$origTokens with no value type specified in iterable type array\\.$#"
70+
count: 1
71+
path: lib/PhpParser/Internal/TokenPolyfill.php
72+
73+
-
74+
message: "#^Method PhpParser\\\\Internal\\\\TokenPolyfill\\:\\:fixupBadCharacters\\(\\) return type has no value type specified in iterable type array\\.$#"
75+
count: 1
76+
path: lib/PhpParser/Internal/TokenPolyfill.php
77+
78+
-
79+
message: "#^Method PhpParser\\\\JsonDecoder\\:\\:decodeArray\\(\\) has parameter \\$array with no value type specified in iterable type array\\.$#"
80+
count: 1
81+
path: lib/PhpParser/JsonDecoder.php
82+
83+
-
84+
message: "#^Method PhpParser\\\\JsonDecoder\\:\\:decodeArray\\(\\) return type has no value type specified in iterable type array\\.$#"
85+
count: 1
86+
path: lib/PhpParser/JsonDecoder.php
87+
88+
-
89+
message: "#^Method PhpParser\\\\JsonDecoder\\:\\:decodeComment\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#"
90+
count: 1
91+
path: lib/PhpParser/JsonDecoder.php
92+
93+
-
94+
message: "#^Method PhpParser\\\\JsonDecoder\\:\\:decodeNode\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#"
95+
count: 1
96+
path: lib/PhpParser/JsonDecoder.php
97+
898
-
999
message: "#^Call to function assert\\(\\) with false will always evaluate to false\\.$#"
10100
count: 1
@@ -15,6 +105,31 @@ parameters:
15105
count: 1
16106
path: lib/PhpParser/Lexer/TokenEmulator/NumericLiteralSeparatorEmulator.php
17107

108+
-
109+
message: "#^Method PhpParser\\\\NodeDumper\\:\\:__construct\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
110+
count: 1
111+
path: lib/PhpParser/NodeDumper.php
112+
113+
-
114+
message: "#^Method PhpParser\\\\NodeDumper\\:\\:dump\\(\\) has parameter \\$node with no value type specified in iterable type array\\.$#"
115+
count: 1
116+
path: lib/PhpParser/NodeDumper.php
117+
118+
-
119+
message: "#^Method PhpParser\\\\NodeDumper\\:\\:dumpRecursive\\(\\) has parameter \\$node with no value type specified in iterable type array\\.$#"
120+
count: 1
121+
path: lib/PhpParser/NodeDumper.php
122+
123+
-
124+
message: "#^Method PhpParser\\\\NodeTraverser\\:\\:traverseArray\\(\\) has parameter \\$nodes with no value type specified in iterable type array\\.$#"
125+
count: 1
126+
path: lib/PhpParser/NodeTraverser.php
127+
128+
-
129+
message: "#^Method PhpParser\\\\NodeTraverser\\:\\:traverseArray\\(\\) return type has no value type specified in iterable type array\\.$#"
130+
count: 1
131+
path: lib/PhpParser/NodeTraverser.php
132+
18133
-
19134
message: "#^Access to an undefined property PhpParser\\\\Node\\:\\:\\$attrGroups\\.$#"
20135
count: 1
@@ -130,6 +245,11 @@ parameters:
130245
count: 1
131246
path: lib/PhpParser/ParserAbstract.php
132247

248+
-
249+
message: "#^Property PhpParser\\\\ParserAbstract\\:\\:\\$createdArrays \\(SplObjectStorage\\<PhpParser\\\\Node\\\\Expr\\\\Array_, null\\>\\|null\\) does not accept SplObjectStorage\\<object, mixed\\>\\.$#"
250+
count: 1
251+
path: lib/PhpParser/ParserAbstract.php
252+
133253
-
134254
message: "#^Unary operation \"\\+\" on string results in an error\\.$#"
135255
count: 1

phpstan.neon.dist

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ includes:
22
- phpstan-baseline.neon
33

44
parameters:
5-
level: 5
5+
level: 6
66
paths:
77
- lib
88
treatPhpDocTypesAsCertain: false

0 commit comments

Comments
 (0)