Skip to content

Commit 1995bef

Browse files
committed
updated phpstan-baseline
1 parent 1ad0dda commit 1995bef

File tree

1 file changed

+213
-27
lines changed

1 file changed

+213
-27
lines changed

phpstan-baseline.neon

Lines changed: 213 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,121 +1,307 @@
11
parameters:
22
ignoreErrors:
33
-
4-
message: '#^Match expression does not handle remaining value\: true$#'
4+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Attribute \.\.\.\$attrs\) \{…" on a separate line does not do anything\.$#'
5+
identifier: expr.resultUnused
56
count: 1
67
path: src/PhpGenerator/ClassLike.php
78

89
-
9-
message: '#^Method Nette\\PhpGenerator\\ClassType\:\:addTrait\(\) has parameter \$deprecatedParam with no value type specified in iterable type array\.$#'
10+
message: '#^Parameter \#1 \$class of method Nette\\PhpGenerator\\Printer\:\:printClass\(\) expects Nette\\PhpGenerator\\ClassType\|Nette\\PhpGenerator\\EnumType\|Nette\\PhpGenerator\\InterfaceType\|Nette\\PhpGenerator\\TraitType, \$this\(Nette\\PhpGenerator\\ClassLike\) given\.$#'
11+
identifier: argument.type
12+
count: 1
13+
path: src/PhpGenerator/ClassLike.php
14+
15+
-
16+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Constant \.\.\.\$consts\) \{…" on a separate line does not do anything\.$#'
17+
identifier: expr.resultUnused
18+
count: 1
19+
path: src/PhpGenerator/ClassType.php
20+
21+
-
22+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Method \.\.\.\$methods\) \{…" on a separate line does not do anything\.$#'
23+
identifier: expr.resultUnused
1024
count: 1
1125
path: src/PhpGenerator/ClassType.php
1226

1327
-
14-
message: '#^Method Nette\\PhpGenerator\\EnumType\:\:addTrait\(\) has parameter \$deprecatedParam with no value type specified in iterable type array\.$#'
28+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Property \.\.\.\$props\) \{…" on a separate line does not do anything\.$#'
29+
identifier: expr.resultUnused
30+
count: 1
31+
path: src/PhpGenerator/ClassType.php
32+
33+
-
34+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\TraitUse \.\.\.\$traits\) \{…" on a separate line does not do anything\.$#'
35+
identifier: expr.resultUnused
36+
count: 1
37+
path: src/PhpGenerator/ClassType.php
38+
39+
-
40+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Attribute \.\.\.\$attrs\) \{…" on a separate line does not do anything\.$#'
41+
identifier: expr.resultUnused
42+
count: 1
43+
path: src/PhpGenerator/Closure.php
44+
45+
-
46+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Parameter \.\.\.\$uses\) \{…" on a separate line does not do anything\.$#'
47+
identifier: expr.resultUnused
48+
count: 1
49+
path: src/PhpGenerator/Closure.php
50+
51+
-
52+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Parameter \.\.\.\$val\) \{…" on a separate line does not do anything\.$#'
53+
identifier: expr.resultUnused
54+
count: 1
55+
path: src/PhpGenerator/Closure.php
56+
57+
-
58+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Attribute \.\.\.\$attrs\) \{…" on a separate line does not do anything\.$#'
59+
identifier: expr.resultUnused
60+
count: 1
61+
path: src/PhpGenerator/Constant.php
62+
63+
-
64+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Attribute \.\.\.\$attrs\) \{…" on a separate line does not do anything\.$#'
65+
identifier: expr.resultUnused
66+
count: 1
67+
path: src/PhpGenerator/EnumCase.php
68+
69+
-
70+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Constant \.\.\.\$consts\) \{…" on a separate line does not do anything\.$#'
71+
identifier: expr.resultUnused
1572
count: 1
1673
path: src/PhpGenerator/EnumType.php
1774

1875
-
19-
message: '#^Access to an undefined property PhpParser\\Node\:\:\$attrGroups\.$#'
76+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\EnumCase \.\.\.\$cases\) \{…" on a separate line does not do anything\.$#'
77+
identifier: expr.resultUnused
2078
count: 1
21-
path: src/PhpGenerator/Extractor.php
79+
path: src/PhpGenerator/EnumType.php
2280

2381
-
24-
message: '#^Access to an undefined property PhpParser\\Node\\Expr\:\:\$value\.$#'
82+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Method \.\.\.\$methods\) \{…" on a separate line does not do anything\.$#'
83+
identifier: expr.resultUnused
2584
count: 1
26-
path: src/PhpGenerator/Extractor.php
85+
path: src/PhpGenerator/EnumType.php
86+
87+
-
88+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\TraitUse \.\.\.\$traits\) \{…" on a separate line does not do anything\.$#'
89+
identifier: expr.resultUnused
90+
count: 1
91+
path: src/PhpGenerator/EnumType.php
2792

2893
-
2994
message: '#^Call to an undefined method Nette\\PhpGenerator\\ClassLike\:\:addConstant\(\)\.$#'
95+
identifier: method.notFound
3096
count: 1
3197
path: src/PhpGenerator/Extractor.php
3298

3399
-
34100
message: '#^Call to an undefined method Nette\\PhpGenerator\\ClassLike\:\:addMethod\(\)\.$#'
101+
identifier: method.notFound
35102
count: 1
36103
path: src/PhpGenerator/Extractor.php
37104

38105
-
39106
message: '#^Call to an undefined method Nette\\PhpGenerator\\ClassLike\:\:addProperty\(\)\.$#'
107+
identifier: method.notFound
40108
count: 1
41109
path: src/PhpGenerator/Extractor.php
42110

43111
-
44112
message: '#^Call to an undefined method Nette\\PhpGenerator\\ClassLike\:\:addTrait\(\)\.$#'
113+
identifier: method.notFound
45114
count: 1
46115
path: src/PhpGenerator/Extractor.php
47116

48117
-
49-
message: '#^Method Nette\\PhpGenerator\\Extractor\:\:addCommentAndAttributes\(\) has parameter \$element with no type specified\.$#'
118+
message: '#^Call to function method_exists\(\) with PhpParser\\Node\\Stmt\\ClassConst and ''isFinal'' will always evaluate to true\.$#'
119+
identifier: function.alreadyNarrowedType
50120
count: 1
51121
path: src/PhpGenerator/Extractor.php
52122

53123
-
54-
message: '#^Property class@anonymous/PhpGenerator/Extractor\.php\:176\:\:\$callback has no type specified\.$#'
124+
message: '#^Call to function method_exists\(\) with PhpParser\\Node\\Stmt\\Class_ and ''isReadonly'' will always evaluate to true\.$#'
125+
identifier: function.alreadyNarrowedType
55126
count: 1
56127
path: src/PhpGenerator/Extractor.php
57128

129+
-
130+
message: '#^Call to function method_exists\(\) with PhpParser\\Node\\Stmt\\Property and ''isReadonly'' will always evaluate to true\.$#'
131+
identifier: function.alreadyNarrowedType
132+
count: 1
133+
path: src/PhpGenerator/Extractor.php
134+
135+
-
136+
message: '#^Parameter \#1 \$class of method Nette\\PhpGenerator\\Extractor\:\:addEnumCaseToClass\(\) expects Nette\\PhpGenerator\\EnumType, Nette\\PhpGenerator\\ClassLike given\.$#'
137+
identifier: argument.type
138+
count: 1
139+
path: src/PhpGenerator/Extractor.php
140+
141+
-
142+
message: '#^Variable \$class might not be defined\.$#'
143+
identifier: variable.undefined
144+
count: 3
145+
path: src/PhpGenerator/Extractor.php
146+
58147
-
59148
message: '#^Variable \$trait might not be defined\.$#'
149+
identifier: variable.undefined
60150
count: 2
61151
path: src/PhpGenerator/Extractor.php
62152

63153
-
64-
message: '#^Call to an undefined method ReflectionClass\<object\>\:\:hasCase\(\)\.$#'
154+
message: '#^Method Nette\\PhpGenerator\\Factory\:\:getAttributes\(\) has parameter \$from with no type specified\.$#'
155+
identifier: missingType.parameter
65156
count: 1
66157
path: src/PhpGenerator/Factory.php
67158

68159
-
69-
message: '#^Elseif branch is unreachable because previous condition is always true\.$#'
160+
message: '#^Variable \$bodies on left side of \?\?\= always exists and is not nullable\.$#'
161+
identifier: nullCoalesce.variable
70162
count: 1
71163
path: src/PhpGenerator/Factory.php
72164

73165
-
74-
message: '#^Method Nette\\PhpGenerator\\Factory\:\:getAttributes\(\) has parameter \$from with no type specified\.$#'
166+
message: '#^Variable \$cache on left side of \?\?\= always exists and is not nullable\.$#'
167+
identifier: nullCoalesce.variable
75168
count: 1
76169
path: src/PhpGenerator/Factory.php
77170

78171
-
79-
message: '#^Method Nette\\PhpGenerator\\Factory\:\:getAttributes\(\) return type has no value type specified in iterable type array\.$#'
172+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Attribute \.\.\.\$attrs\) \{…" on a separate line does not do anything\.$#'
173+
identifier: expr.resultUnused
80174
count: 1
81-
path: src/PhpGenerator/Factory.php
175+
path: src/PhpGenerator/GlobalFunction.php
82176

83177
-
84-
message: '#^Method Nette\\PhpGenerator\\Factory\:\:getExtractor\(\) has parameter \$from with no type specified\.$#'
178+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Parameter \.\.\.\$val\) \{…" on a separate line does not do anything\.$#'
179+
identifier: expr.resultUnused
85180
count: 1
86-
path: src/PhpGenerator/Factory.php
181+
path: src/PhpGenerator/GlobalFunction.php
87182

88183
-
89-
message: '#^Method Nette\\PhpGenerator\\Factory\:\:getVisibility\(\) has parameter \$from with no type specified\.$#'
184+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Constant \.\.\.\$consts\) \{…" on a separate line does not do anything\.$#'
185+
identifier: expr.resultUnused
90186
count: 1
91-
path: src/PhpGenerator/Factory.php
187+
path: src/PhpGenerator/InterfaceType.php
92188

93189
-
94-
message: '#^Parameter \#1 \$name of method Nette\\PhpGenerator\\ClassType\:\:setExtends\(\) expects string\|null, array\<int, string\> given\.$#'
190+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Method \.\.\.\$methods\) \{…" on a separate line does not do anything\.$#'
191+
identifier: expr.resultUnused
95192
count: 1
96-
path: src/PhpGenerator/Factory.php
193+
path: src/PhpGenerator/InterfaceType.php
97194

98195
-
99-
message: '#^Unreachable statement \- code above always terminates\.$#'
196+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Property \.\.\.\$props\) \{…" on a separate line does not do anything\.$#'
197+
identifier: expr.resultUnused
100198
count: 1
101-
path: src/PhpGenerator/Factory.php
199+
path: src/PhpGenerator/InterfaceType.php
102200

103201
-
104-
message: '#^Variable \$bodies on left side of \?\?\= always exists and is not nullable\.$#'
202+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Attribute \.\.\.\$attrs\) \{…" on a separate line does not do anything\.$#'
203+
identifier: expr.resultUnused
105204
count: 1
106-
path: src/PhpGenerator/Factory.php
205+
path: src/PhpGenerator/Method.php
107206

108207
-
109-
message: '#^Method Nette\\PhpGenerator\\Helpers\:\:formatArgs\(\) has parameter \$args with no value type specified in iterable type array\.$#'
208+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Parameter \.\.\.\$val\) \{…" on a separate line does not do anything\.$#'
209+
identifier: expr.resultUnused
110210
count: 1
111-
path: src/PhpGenerator/Helpers.php
211+
path: src/PhpGenerator/Method.php
112212

113213
-
114214
message: '#^Method Nette\\PhpGenerator\\Method\:\:from\(\) has parameter \$method with no value type specified in iterable type array\.$#'
215+
identifier: missingType.iterableValue
115216
count: 1
116217
path: src/PhpGenerator/Method.php
117218

118219
-
119-
message: '#^Method Nette\\PhpGenerator\\TraitType\:\:addTrait\(\) has parameter \$deprecatedParam with no value type specified in iterable type array\.$#'
220+
message: '#^PHPDoc tag @param for parameter \$method with type callable is not subtype of native type array\|Closure\|string\.$#'
221+
identifier: parameter.phpDocType
222+
count: 1
223+
path: src/PhpGenerator/Method.php
224+
225+
-
226+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Attribute \.\.\.\$attrs\) \{…" on a separate line does not do anything\.$#'
227+
identifier: expr.resultUnused
228+
count: 1
229+
path: src/PhpGenerator/Parameter.php
230+
231+
-
232+
message: '#^Instanceof between Nette\\PhpGenerator\\EnumType and Nette\\PhpGenerator\\EnumType will always evaluate to true\.$#'
233+
identifier: instanceof.alwaysTrue
234+
count: 1
235+
path: src/PhpGenerator/Printer.php
236+
237+
-
238+
message: '#^Method Nette\\PhpGenerator\\Printer\:\:printDocComment\(\) has parameter \$commentable with no type specified\.$#'
239+
identifier: missingType.parameter
240+
count: 1
241+
path: src/PhpGenerator/Printer.php
242+
243+
-
244+
message: '#^Parameter \#2 \$array of function implode expects array\<string\>, array\<string, Nette\\PhpGenerator\\PropertyHook\|string\> given\.$#'
245+
identifier: argument.type
246+
count: 2
247+
path: src/PhpGenerator/Printer.php
248+
249+
-
250+
message: '#^Result of \|\| is always true\.$#'
251+
identifier: booleanOr.alwaysTrue
252+
count: 1
253+
path: src/PhpGenerator/Printer.php
254+
255+
-
256+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\PropertyHook \.\.\.\$hooks\) \{…" on a separate line does not do anything\.$#'
257+
identifier: expr.resultUnused
258+
count: 1
259+
path: src/PhpGenerator/PromotedParameter.php
260+
261+
-
262+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Attribute \.\.\.\$attrs\) \{…" on a separate line does not do anything\.$#'
263+
identifier: expr.resultUnused
264+
count: 1
265+
path: src/PhpGenerator/Property.php
266+
267+
-
268+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\PropertyHook \.\.\.\$hooks\) \{…" on a separate line does not do anything\.$#'
269+
identifier: expr.resultUnused
270+
count: 1
271+
path: src/PhpGenerator/Property.php
272+
273+
-
274+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Attribute \.\.\.\$attrs\) \{…" on a separate line does not do anything\.$#'
275+
identifier: expr.resultUnused
276+
count: 1
277+
path: src/PhpGenerator/PropertyHook.php
278+
279+
-
280+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Parameter \.\.\.\$val\) \{…" on a separate line does not do anything\.$#'
281+
identifier: expr.resultUnused
282+
count: 1
283+
path: src/PhpGenerator/PropertyHook.php
284+
285+
-
286+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Constant \.\.\.\$consts\) \{…" on a separate line does not do anything\.$#'
287+
identifier: expr.resultUnused
288+
count: 1
289+
path: src/PhpGenerator/TraitType.php
290+
291+
-
292+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Method \.\.\.\$methods\) \{…" on a separate line does not do anything\.$#'
293+
identifier: expr.resultUnused
294+
count: 1
295+
path: src/PhpGenerator/TraitType.php
296+
297+
-
298+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Property \.\.\.\$props\) \{…" on a separate line does not do anything\.$#'
299+
identifier: expr.resultUnused
300+
count: 1
301+
path: src/PhpGenerator/TraitType.php
302+
303+
-
304+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\TraitUse \.\.\.\$traits\) \{…" on a separate line does not do anything\.$#'
305+
identifier: expr.resultUnused
120306
count: 1
121307
path: src/PhpGenerator/TraitType.php

0 commit comments

Comments
 (0)