Skip to content

Commit 7d3039c

Browse files
committed
Update to phpstan 2.0
1 parent 447a020 commit 7d3039c

File tree

2 files changed

+87
-69
lines changed

2 files changed

+87
-69
lines changed

phpstan-baseline.neon

+86-68
Original file line numberDiff line numberDiff line change
@@ -1,241 +1,259 @@
11
parameters:
22
ignoreErrors:
33
-
4-
message: "#^Method PhpParser\\\\Builder\\\\ClassConst\\:\\:__construct\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#"
4+
message: '#^Method PhpParser\\Builder\\ClassConst\:\:__construct\(\) has parameter \$value with no value type specified in iterable type array\.$#'
5+
identifier: missingType.iterableValue
56
count: 1
67
path: lib/PhpParser/Builder/ClassConst.php
78

89
-
9-
message: "#^Method PhpParser\\\\Builder\\\\ClassConst\\:\\:addConst\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#"
10+
message: '#^Method PhpParser\\Builder\\ClassConst\:\:addConst\(\) has parameter \$value with no value type specified in iterable type array\.$#'
11+
identifier: missingType.iterableValue
1012
count: 1
1113
path: lib/PhpParser/Builder/ClassConst.php
1214

1315
-
14-
message: "#^Method PhpParser\\\\BuilderFactory\\:\\:args\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#"
16+
message: '#^Method PhpParser\\BuilderFactory\:\:args\(\) has parameter \$args with no value type specified in iterable type array\.$#'
17+
identifier: missingType.iterableValue
1518
count: 1
1619
path: lib/PhpParser/BuilderFactory.php
1720

1821
-
19-
message: "#^Method PhpParser\\\\BuilderFactory\\:\\:attribute\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#"
22+
message: '#^Method PhpParser\\BuilderFactory\:\:attribute\(\) has parameter \$args with no value type specified in iterable type array\.$#'
23+
identifier: missingType.iterableValue
2024
count: 1
2125
path: lib/PhpParser/BuilderFactory.php
2226

2327
-
24-
message: "#^Method PhpParser\\\\BuilderFactory\\:\\:classConst\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#"
28+
message: '#^Method PhpParser\\BuilderFactory\:\:classConst\(\) has parameter \$value with no value type specified in iterable type array\.$#'
29+
identifier: missingType.iterableValue
2530
count: 1
2631
path: lib/PhpParser/BuilderFactory.php
2732

2833
-
29-
message: "#^Method PhpParser\\\\BuilderFactory\\:\\:funcCall\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#"
34+
message: '#^Method PhpParser\\BuilderFactory\:\:funcCall\(\) has parameter \$args with no value type specified in iterable type array\.$#'
35+
identifier: missingType.iterableValue
3036
count: 1
3137
path: lib/PhpParser/BuilderFactory.php
3238

3339
-
34-
message: "#^Method PhpParser\\\\BuilderFactory\\:\\:methodCall\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#"
40+
message: '#^Method PhpParser\\BuilderFactory\:\:methodCall\(\) has parameter \$args with no value type specified in iterable type array\.$#'
41+
identifier: missingType.iterableValue
3542
count: 1
3643
path: lib/PhpParser/BuilderFactory.php
3744

3845
-
39-
message: "#^Method PhpParser\\\\BuilderFactory\\:\\:new\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#"
46+
message: '#^Method PhpParser\\BuilderFactory\:\:new\(\) has parameter \$args with no value type specified in iterable type array\.$#'
47+
identifier: missingType.iterableValue
4048
count: 1
4149
path: lib/PhpParser/BuilderFactory.php
4250

4351
-
44-
message: "#^Method PhpParser\\\\BuilderFactory\\:\\:staticCall\\(\\) has parameter \\$args with no value type specified in iterable type array\\.$#"
52+
message: '#^Method PhpParser\\BuilderFactory\:\:staticCall\(\) has parameter \$args with no value type specified in iterable type array\.$#'
53+
identifier: missingType.iterableValue
4554
count: 1
4655
path: lib/PhpParser/BuilderFactory.php
4756

4857
-
49-
message: "#^Method PhpParser\\\\BuilderFactory\\:\\:val\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#"
58+
message: '#^Method PhpParser\\BuilderFactory\:\:val\(\) has parameter \$value with no value type specified in iterable type array\.$#'
59+
identifier: missingType.iterableValue
5060
count: 1
5161
path: lib/PhpParser/BuilderFactory.php
5262

5363
-
54-
message: "#^Method PhpParser\\\\BuilderHelpers\\:\\:normalizeValue\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#"
64+
message: '#^Method PhpParser\\BuilderHelpers\:\:normalizeValue\(\) has parameter \$value with no value type specified in iterable type array\.$#'
65+
identifier: missingType.iterableValue
5566
count: 1
5667
path: lib/PhpParser/BuilderHelpers.php
5768

5869
-
59-
message: "#^Method PhpParser\\\\ConstExprEvaluator\\:\\:evaluateArray\\(\\) return type has no value type specified in iterable type array\\.$#"
70+
message: '#^Method PhpParser\\ConstExprEvaluator\:\:evaluateArray\(\) return type has no value type specified in iterable type array\.$#'
71+
identifier: missingType.iterableValue
6072
count: 1
6173
path: lib/PhpParser/ConstExprEvaluator.php
6274

6375
-
64-
message: "#^Unary operation \"~\" on mixed results in an error\\.$#"
65-
count: 1
66-
path: lib/PhpParser/ConstExprEvaluator.php
67-
68-
-
69-
message: "#^Method PhpParser\\\\JsonDecoder\\:\\:decodeArray\\(\\) has parameter \\$array with no value type specified in iterable type array\\.$#"
76+
message: '#^Method PhpParser\\JsonDecoder\:\:decodeArray\(\) has parameter \$array with no value type specified in iterable type array\.$#'
77+
identifier: missingType.iterableValue
7078
count: 1
7179
path: lib/PhpParser/JsonDecoder.php
7280

7381
-
74-
message: "#^Method PhpParser\\\\JsonDecoder\\:\\:decodeArray\\(\\) return type has no value type specified in iterable type array\\.$#"
82+
message: '#^Method PhpParser\\JsonDecoder\:\:decodeArray\(\) return type has no value type specified in iterable type array\.$#'
83+
identifier: missingType.iterableValue
7584
count: 1
7685
path: lib/PhpParser/JsonDecoder.php
7786

7887
-
79-
message: "#^Method PhpParser\\\\JsonDecoder\\:\\:decodeComment\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#"
88+
message: '#^Method PhpParser\\JsonDecoder\:\:decodeComment\(\) has parameter \$value with no value type specified in iterable type array\.$#'
89+
identifier: missingType.iterableValue
8090
count: 1
8191
path: lib/PhpParser/JsonDecoder.php
8292

8393
-
84-
message: "#^Method PhpParser\\\\JsonDecoder\\:\\:decodeNode\\(\\) has parameter \\$value with no value type specified in iterable type array\\.$#"
94+
message: '#^Method PhpParser\\JsonDecoder\:\:decodeNode\(\) has parameter \$value with no value type specified in iterable type array\.$#'
95+
identifier: missingType.iterableValue
8596
count: 1
8697
path: lib/PhpParser/JsonDecoder.php
8798

8899
-
89-
message: "#^Call to function assert\\(\\) with false will always evaluate to false\\.$#"
100+
message: '#^Call to function assert\(\) with false will always evaluate to false\.$#'
101+
identifier: function.impossibleType
90102
count: 1
91103
path: lib/PhpParser/Lexer/Emulative.php
92104

93105
-
94-
message: "#^If condition is always false\\.$#"
106+
message: '#^If condition is always false\.$#'
107+
identifier: if.alwaysFalse
95108
count: 1
96109
path: lib/PhpParser/Node/Expr/ArrayItem.php
97110

98111
-
99-
message: "#^If condition is always false\\.$#"
112+
message: '#^If condition is always false\.$#'
113+
identifier: if.alwaysFalse
100114
count: 1
101115
path: lib/PhpParser/Node/Expr/ClosureUse.php
102116

103117
-
104-
message: "#^If condition is always false\\.$#"
118+
message: '#^If condition is always false\.$#'
119+
identifier: if.alwaysFalse
105120
count: 1
106121
path: lib/PhpParser/Node/Scalar/DNumber.php
107122

108123
-
109-
message: "#^If condition is always false\\.$#"
124+
message: '#^If condition is always false\.$#'
125+
identifier: if.alwaysFalse
110126
count: 1
111127
path: lib/PhpParser/Node/Scalar/Encapsed.php
112128

113129
-
114-
message: "#^If condition is always false\\.$#"
130+
message: '#^If condition is always false\.$#'
131+
identifier: if.alwaysFalse
115132
count: 1
116133
path: lib/PhpParser/Node/Scalar/EncapsedStringPart.php
117134

118135
-
119-
message: "#^If condition is always false\\.$#"
136+
message: '#^If condition is always false\.$#'
137+
identifier: if.alwaysFalse
120138
count: 1
121139
path: lib/PhpParser/Node/Scalar/LNumber.php
122140

123141
-
124-
message: "#^If condition is always false\\.$#"
142+
message: '#^If condition is always false\.$#'
143+
identifier: if.alwaysFalse
125144
count: 1
126145
path: lib/PhpParser/Node/Stmt/DeclareDeclare.php
127146

128147
-
129-
message: "#^If condition is always false\\.$#"
148+
message: '#^If condition is always false\.$#'
149+
identifier: if.alwaysFalse
130150
count: 1
131151
path: lib/PhpParser/Node/Stmt/PropertyProperty.php
132152

133153
-
134-
message: "#^If condition is always false\\.$#"
154+
message: '#^If condition is always false\.$#'
155+
identifier: if.alwaysFalse
135156
count: 1
136157
path: lib/PhpParser/Node/Stmt/StaticVar.php
137158

138159
-
139-
message: "#^If condition is always false\\.$#"
160+
message: '#^If condition is always false\.$#'
161+
identifier: if.alwaysFalse
140162
count: 1
141163
path: lib/PhpParser/Node/Stmt/UseUse.php
142164

143165
-
144-
message: "#^Constant T_PRIVATE_SET not found\\.$#"
145-
count: 2
146-
path: lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php
147-
148-
-
149-
message: "#^Constant T_PROTECTED_SET not found\\.$#"
150-
count: 2
151-
path: lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php
152-
153-
-
154-
message: "#^Constant T_PUBLIC_SET not found\\.$#"
155-
count: 2
156-
path: lib/PhpParser/Lexer/TokenEmulator/AsymmetricVisibilityTokenEmulator.php
157-
158-
-
159-
message: "#^Constant T_PROPERTY_C not found\\.$#"
160-
count: 1
161-
path: lib/PhpParser/Lexer/TokenEmulator/PropertyTokenEmulator.php
162-
163-
-
164-
message: "#^Method PhpParser\\\\NodeDumper\\:\\:__construct\\(\\) has parameter \\$options with no value type specified in iterable type array\\.$#"
166+
message: '#^Method PhpParser\\NodeDumper\:\:__construct\(\) has parameter \$options with no value type specified in iterable type array\.$#'
167+
identifier: missingType.iterableValue
165168
count: 1
166169
path: lib/PhpParser/NodeDumper.php
167170

168171
-
169-
message: "#^Method PhpParser\\\\NodeDumper\\:\\:dump\\(\\) has parameter \\$node with no value type specified in iterable type array\\.$#"
172+
message: '#^Method PhpParser\\NodeDumper\:\:dump\(\) has parameter \$node with no value type specified in iterable type array\.$#'
173+
identifier: missingType.iterableValue
170174
count: 1
171175
path: lib/PhpParser/NodeDumper.php
172176

173177
-
174-
message: "#^Method PhpParser\\\\NodeTraverser\\:\\:traverseArray\\(\\) has parameter \\$nodes with no value type specified in iterable type array\\.$#"
178+
message: '#^Method PhpParser\\NodeTraverser\:\:traverseArray\(\) has parameter \$nodes with no value type specified in iterable type array\.$#'
179+
identifier: missingType.iterableValue
175180
count: 1
176181
path: lib/PhpParser/NodeTraverser.php
177182

178183
-
179-
message: "#^Method PhpParser\\\\NodeTraverser\\:\\:traverseArray\\(\\) return type has no value type specified in iterable type array\\.$#"
184+
message: '#^Method PhpParser\\NodeTraverser\:\:traverseArray\(\) return type has no value type specified in iterable type array\.$#'
185+
identifier: missingType.iterableValue
180186
count: 1
181187
path: lib/PhpParser/NodeTraverser.php
182188

183189
-
184-
message: "#^Access to an undefined property PhpParser\\\\Node\\:\\:\\$attrGroups\\.$#"
190+
message: '#^Access to an undefined property PhpParser\\Node\:\:\$attrGroups\.$#'
191+
identifier: property.notFound
185192
count: 1
186193
path: lib/PhpParser/NodeVisitor/NameResolver.php
187194

188195
-
189-
message: "#^Access to an undefined property PhpParser\\\\Node\\:\\:\\$name\\.$#"
196+
message: '#^Access to an undefined property PhpParser\\Node\:\:\$name\.$#'
197+
identifier: property.notFound
190198
count: 1
191199
path: lib/PhpParser/NodeVisitor/NameResolver.php
192200

193201
-
194-
message: "#^Access to an undefined property PhpParser\\\\Node\\:\\:\\$namespacedName\\.$#"
202+
message: '#^Access to an undefined property PhpParser\\Node\:\:\$namespacedName\.$#'
203+
identifier: property.notFound
195204
count: 1
196205
path: lib/PhpParser/NodeVisitor/NameResolver.php
197206

198207
-
199-
message: "#^Method PhpParser\\\\NodeVisitor\\\\NodeConnectingVisitor\\:\\:beforeTraverse\\(\\) should return array\\<PhpParser\\\\Node\\>\\|null but return statement is missing\\.$#"
208+
message: '#^Method PhpParser\\NodeVisitor\\NodeConnectingVisitor\:\:beforeTraverse\(\) should return array\<PhpParser\\Node\>\|null but return statement is missing\.$#'
209+
identifier: return.missing
200210
count: 1
201211
path: lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php
202212

203213
-
204-
message: "#^Method PhpParser\\\\NodeVisitor\\\\NodeConnectingVisitor\\:\\:enterNode\\(\\) should return array\\<PhpParser\\\\Node\\>\\|int\\|PhpParser\\\\Node\\|null but return statement is missing\\.$#"
214+
message: '#^Method PhpParser\\NodeVisitor\\NodeConnectingVisitor\:\:enterNode\(\) should return array\<PhpParser\\Node\>\|int\|PhpParser\\Node\|null but return statement is missing\.$#'
215+
identifier: return.missing
205216
count: 1
206217
path: lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php
207218

208219
-
209-
message: "#^Method PhpParser\\\\NodeVisitor\\\\NodeConnectingVisitor\\:\\:leaveNode\\(\\) should return array\\<PhpParser\\\\Node\\>\\|int\\|PhpParser\\\\Node\\|null but return statement is missing\\.$#"
220+
message: '#^Method PhpParser\\NodeVisitor\\NodeConnectingVisitor\:\:leaveNode\(\) should return array\<PhpParser\\Node\>\|int\|PhpParser\\Node\|null but return statement is missing\.$#'
221+
identifier: return.missing
210222
count: 1
211223
path: lib/PhpParser/NodeVisitor/NodeConnectingVisitor.php
212224

213225
-
214-
message: "#^Method PhpParser\\\\NodeVisitor\\\\ParentConnectingVisitor\\:\\:beforeTraverse\\(\\) should return array\\<PhpParser\\\\Node\\>\\|null but return statement is missing\\.$#"
226+
message: '#^Method PhpParser\\NodeVisitor\\ParentConnectingVisitor\:\:beforeTraverse\(\) should return array\<PhpParser\\Node\>\|null but return statement is missing\.$#'
227+
identifier: return.missing
215228
count: 1
216229
path: lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php
217230

218231
-
219-
message: "#^Method PhpParser\\\\NodeVisitor\\\\ParentConnectingVisitor\\:\\:enterNode\\(\\) should return array\\<PhpParser\\\\Node\\>\\|int\\|PhpParser\\\\Node\\|null but return statement is missing\\.$#"
232+
message: '#^Method PhpParser\\NodeVisitor\\ParentConnectingVisitor\:\:enterNode\(\) should return array\<PhpParser\\Node\>\|int\|PhpParser\\Node\|null but return statement is missing\.$#'
233+
identifier: return.missing
220234
count: 1
221235
path: lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php
222236

223237
-
224-
message: "#^Method PhpParser\\\\NodeVisitor\\\\ParentConnectingVisitor\\:\\:leaveNode\\(\\) should return array\\<PhpParser\\\\Node\\>\\|int\\|PhpParser\\\\Node\\|null but return statement is missing\\.$#"
238+
message: '#^Method PhpParser\\NodeVisitor\\ParentConnectingVisitor\:\:leaveNode\(\) should return array\<PhpParser\\Node\>\|int\|PhpParser\\Node\|null but return statement is missing\.$#'
239+
identifier: return.missing
225240
count: 1
226241
path: lib/PhpParser/NodeVisitor/ParentConnectingVisitor.php
227242

228243
-
229-
message: "#^Access to undefined constant static\\(PhpParser\\\\ParserAbstract\\)\\:\\:T_ECHO\\.$#"
244+
message: '#^Access to undefined constant static\(PhpParser\\ParserAbstract\)\:\:T_ECHO\.$#'
245+
identifier: classConstant.notFound
230246
count: 1
231247
path: lib/PhpParser/ParserAbstract.php
232248

233249
-
234-
message: "#^Unary operation \"\\+\" on string results in an error\\.$#"
250+
message: '#^Unary operation "\+" on string results in an error\.$#'
251+
identifier: unaryOp.invalid
235252
count: 1
236253
path: lib/PhpParser/ParserAbstract.php
237254

238255
-
239-
message: "#^Variable \\$action might not be defined\\.$#"
256+
message: '#^Variable \$action might not be defined\.$#'
257+
identifier: variable.undefined
240258
count: 1
241259
path: lib/PhpParser/ParserAbstract.php

tools/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"require": {
33
"friendsofphp/php-cs-fixer": "^3.10",
4-
"phpstan/phpstan": "^1.8"
4+
"phpstan/phpstan": "^2.0"
55
}
66
}

0 commit comments

Comments
 (0)