Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1be42b2

Browse files
committed
updated phpstan-baseline
1 parent 4707546 commit 1be42b2

File tree

2 files changed

+184
-34
lines changed

2 files changed

+184
-34
lines changed

‎.github/workflows/static-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- uses: actions/checkout@v4
1111
- uses: shivammathur/setup-php@v2
1212
with:
13-
php-version: 8.1
13+
php-version: 8.5
1414
coverage: none
1515

1616
- run: composer install --no-progress --prefer-dist

‎phpstan-baseline.neon

Lines changed: 183 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,121 +1,271 @@
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
24+
count: 1
25+
path: src/PhpGenerator/ClassType.php
26+
27+
-
28+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Property \.\.\.\$props\) \{..." on a separate line does not do anything\.$#'
29+
identifier: expr.resultUnused
1030
count: 1
1131
path: src/PhpGenerator/ClassType.php
1232

1333
-
14-
message: '#^Method Nette\\PhpGenerator\\EnumType\:\:addTrait\(\) has parameter \$deprecatedParam with no value type specified in iterable type array\.$#'
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: '#^Parameter \#1 \$class of method Nette\\PhpGenerator\\Extractor\:\:addEnumCaseToClass\(\) expects Nette\\PhpGenerator\\EnumType, Nette\\PhpGenerator\\ClassLike given\.$#'
119+
identifier: argument.type
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: '#^Variable \$trait might not be defined\.$#'
125+
identifier: variable.undefined
55126
count: 1
56127
path: src/PhpGenerator/Extractor.php
57128

58129
-
59-
message: '#^Variable \$trait might not be defined\.$#'
60-
count: 2
61-
path: src/PhpGenerator/Extractor.php
130+
message: '#^Method Nette\\PhpGenerator\\Factory\:\:getAttributes\(\) has parameter \$from with no type specified\.$#'
131+
identifier: missingType.parameter
132+
count: 1
133+
path: src/PhpGenerator/Factory.php
62134

63135
-
64-
message: '#^Call to an undefined method ReflectionClass\<object\>\:\:hasCase\(\)\.$#'
136+
message: '#^Variable \$bodies on left side of \?\?\= always exists and is not nullable\.$#'
137+
identifier: nullCoalesce.variable
65138
count: 1
66139
path: src/PhpGenerator/Factory.php
67140

68141
-
69-
message: '#^Elseif branch is unreachable because previous condition is always true\.$#'
142+
message: '#^Variable \$cache on left side of \?\?\= always exists and is not nullable\.$#'
143+
identifier: nullCoalesce.variable
70144
count: 1
71145
path: src/PhpGenerator/Factory.php
72146

73147
-
74-
message: '#^Method Nette\\PhpGenerator\\Factory\:\:getAttributes\(\) has parameter \$from with no type specified\.$#'
148+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Attribute \.\.\.\$attrs\) \{..." on a separate line does not do anything\.$#'
149+
identifier: expr.resultUnused
75150
count: 1
76-
path: src/PhpGenerator/Factory.php
151+
path: src/PhpGenerator/GlobalFunction.php
77152

78153
-
79-
message: '#^Method Nette\\PhpGenerator\\Factory\:\:getAttributes\(\) return type has no value type specified in iterable type array\.$#'
154+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Parameter \.\.\.\$val\) \{..." on a separate line does not do anything\.$#'
155+
identifier: expr.resultUnused
80156
count: 1
81-
path: src/PhpGenerator/Factory.php
157+
path: src/PhpGenerator/GlobalFunction.php
82158

83159
-
84-
message: '#^Method Nette\\PhpGenerator\\Factory\:\:getExtractor\(\) has parameter \$from with no type specified\.$#'
160+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Constant \.\.\.\$consts\) \{..." on a separate line does not do anything\.$#'
161+
identifier: expr.resultUnused
85162
count: 1
86-
path: src/PhpGenerator/Factory.php
163+
path: src/PhpGenerator/InterfaceType.php
87164

88165
-
89-
message: '#^Method Nette\\PhpGenerator\\Factory\:\:getVisibility\(\) has parameter \$from with no type specified\.$#'
166+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Method \.\.\.\$methods\) \{..." on a separate line does not do anything\.$#'
167+
identifier: expr.resultUnused
90168
count: 1
91-
path: src/PhpGenerator/Factory.php
169+
path: src/PhpGenerator/InterfaceType.php
92170

93171
-
94-
message: '#^Parameter \#1 \$name of method Nette\\PhpGenerator\\ClassType\:\:setExtends\(\) expects string\|null, array\<int, string\> given\.$#'
172+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Property \.\.\.\$props\) \{..." on a separate line does not do anything\.$#'
173+
identifier: expr.resultUnused
95174
count: 1
96-
path: src/PhpGenerator/Factory.php
175+
path: src/PhpGenerator/InterfaceType.php
97176

98177
-
99-
message: '#^Unreachable statement \- code above always terminates\.$#'
178+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Attribute \.\.\.\$attrs\) \{..." on a separate line does not do anything\.$#'
179+
identifier: expr.resultUnused
100180
count: 1
101-
path: src/PhpGenerator/Factory.php
181+
path: src/PhpGenerator/Method.php
102182

103183
-
104-
message: '#^Variable \$bodies on left side of \?\?\= always exists and is not nullable\.$#'
184+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Parameter \.\.\.\$val\) \{..." on a separate line does not do anything\.$#'
185+
identifier: expr.resultUnused
105186
count: 1
106-
path: src/PhpGenerator/Factory.php
187+
path: src/PhpGenerator/Method.php
107188

108189
-
109-
message: '#^Method Nette\\PhpGenerator\\Helpers\:\:formatArgs\(\) has parameter \$args with no value type specified in iterable type array\.$#'
190+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Attribute \.\.\.\$attrs\) \{..." on a separate line does not do anything\.$#'
191+
identifier: expr.resultUnused
110192
count: 1
111-
path: src/PhpGenerator/Helpers.php
193+
path: src/PhpGenerator/Parameter.php
112194

113195
-
114-
message: '#^Method Nette\\PhpGenerator\\Method\:\:from\(\) has parameter \$method with no value type specified in iterable type array\.$#'
196+
message: '#^Instanceof between Nette\\PhpGenerator\\EnumType and Nette\\PhpGenerator\\EnumType will always evaluate to true\.$#'
197+
identifier: instanceof.alwaysTrue
115198
count: 1
116-
path: src/PhpGenerator/Method.php
199+
path: src/PhpGenerator/Printer.php
200+
201+
-
202+
message: '#^Method Nette\\PhpGenerator\\Printer\:\:printDocComment\(\) has parameter \$commentable with no type specified\.$#'
203+
identifier: missingType.parameter
204+
count: 1
205+
path: src/PhpGenerator/Printer.php
206+
207+
-
208+
message: '#^Parameter \#2 \$array of function implode expects array\<string\>, array\<string, Nette\\PhpGenerator\\PropertyHook\|string\> given\.$#'
209+
identifier: argument.type
210+
count: 2
211+
path: src/PhpGenerator/Printer.php
212+
213+
-
214+
message: '#^Result of \|\| is always true\.$#'
215+
identifier: booleanOr.alwaysTrue
216+
count: 1
217+
path: src/PhpGenerator/Printer.php
218+
219+
-
220+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\PropertyHook \.\.\.\$hooks\) \{..." on a separate line does not do anything\.$#'
221+
identifier: expr.resultUnused
222+
count: 1
223+
path: src/PhpGenerator/PromotedParameter.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/Property.php
230+
231+
-
232+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\PropertyHook \.\.\.\$hooks\) \{..." on a separate line does not do anything\.$#'
233+
identifier: expr.resultUnused
234+
count: 1
235+
path: src/PhpGenerator/Property.php
236+
237+
-
238+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Attribute \.\.\.\$attrs\) \{..." on a separate line does not do anything\.$#'
239+
identifier: expr.resultUnused
240+
count: 1
241+
path: src/PhpGenerator/PropertyHook.php
242+
243+
-
244+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Parameter \.\.\.\$val\) \{..." on a separate line does not do anything\.$#'
245+
identifier: expr.resultUnused
246+
count: 1
247+
path: src/PhpGenerator/PropertyHook.php
248+
249+
-
250+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Constant \.\.\.\$consts\) \{..." on a separate line does not do anything\.$#'
251+
identifier: expr.resultUnused
252+
count: 1
253+
path: src/PhpGenerator/TraitType.php
254+
255+
-
256+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Method \.\.\.\$methods\) \{..." on a separate line does not do anything\.$#'
257+
identifier: expr.resultUnused
258+
count: 1
259+
path: src/PhpGenerator/TraitType.php
260+
261+
-
262+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\Property \.\.\.\$props\) \{..." on a separate line does not do anything\.$#'
263+
identifier: expr.resultUnused
264+
count: 1
265+
path: src/PhpGenerator/TraitType.php
117266

118267
-
119-
message: '#^Method Nette\\PhpGenerator\\TraitType\:\:addTrait\(\) has parameter \$deprecatedParam with no value type specified in iterable type array\.$#'
268+
message: '#^Expression "\(function \(\\Nette\\PhpGenerator\\TraitUse \.\.\.\$traits\) \{..." on a separate line does not do anything\.$#'
269+
identifier: expr.resultUnused
120270
count: 1
121271
path: src/PhpGenerator/TraitType.php

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /