Skip to content

Commit cb3ae4b

Browse files
authored
[TASK] Raise PHPStan to level 2 (#877)
1 parent 88b8729 commit cb3ae4b

File tree

2 files changed

+247
-2
lines changed

2 files changed

+247
-2
lines changed

config/phpstan-baseline.neon

Lines changed: 246 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,248 @@
11
parameters:
2-
ignoreErrors: []
2+
ignoreErrors:
3+
-
4+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:comments\(\)\.$#'
5+
identifier: method.notFound
6+
count: 1
7+
path: ../src/CSSList/AtRuleBlockList.php
8+
9+
-
10+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceBeforeOpeningBrace\(\)\.$#'
11+
identifier: method.notFound
12+
count: 1
13+
path: ../src/CSSList/AtRuleBlockList.php
14+
15+
-
16+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:safely\(\)\.$#'
17+
identifier: method.notFound
18+
count: 1
19+
path: ../src/CSSList/CSSList.php
20+
21+
-
22+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceAfterBlocks\(\)\.$#'
23+
identifier: method.notFound
24+
count: 1
25+
path: ../src/CSSList/CSSList.php
26+
27+
-
28+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceBeforeBlocks\(\)\.$#'
29+
identifier: method.notFound
30+
count: 1
31+
path: ../src/CSSList/CSSList.php
32+
33+
-
34+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceBetweenBlocks\(\)\.$#'
35+
identifier: method.notFound
36+
count: 1
37+
path: ../src/CSSList/CSSList.php
38+
39+
-
40+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:comments\(\)\.$#'
41+
identifier: method.notFound
42+
count: 1
43+
path: ../src/CSSList/Document.php
44+
45+
-
46+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:comments\(\)\.$#'
47+
identifier: method.notFound
48+
count: 1
49+
path: ../src/CSSList/KeyFrame.php
50+
51+
-
52+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceBeforeOpeningBrace\(\)\.$#'
53+
identifier: method.notFound
54+
count: 1
55+
path: ../src/CSSList/KeyFrame.php
56+
57+
-
58+
message: '#^Default value of the parameter \#2 \$bIncludeEnd \(false\) of method Sabberworm\\CSS\\Parsing\\ParserState\:\:consumeUntil\(\) is incompatible with type string\.$#'
59+
identifier: parameter.defaultValue
60+
count: 1
61+
path: ../src/Parsing/ParserState.php
62+
63+
-
64+
message: '#^Default value of the parameter \#3 \$consumeEnd \(false\) of method Sabberworm\\CSS\\Parsing\\ParserState\:\:consumeUntil\(\) is incompatible with type string\.$#'
65+
identifier: parameter.defaultValue
66+
count: 1
67+
path: ../src/Parsing/ParserState.php
68+
69+
-
70+
message: '#^PHPDoc tag @return with type array\<int, Sabberworm\\CSS\\Comment\\Comment\>\|void is not subtype of native type array\.$#'
71+
identifier: return.phpDocType
72+
count: 1
73+
path: ../src/Parsing/ParserState.php
74+
75+
-
76+
message: '#^Cannot call method render\(\) on string\.$#'
77+
identifier: method.nonObject
78+
count: 1
79+
path: ../src/Property/CSSNamespace.php
80+
81+
-
82+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:comments\(\)\.$#'
83+
identifier: method.notFound
84+
count: 1
85+
path: ../src/Property/Charset.php
86+
87+
-
88+
message: '#^PHPDoc tag @param references unknown parameter\: \$oCharset$#'
89+
identifier: parameter.notFound
90+
count: 1
91+
path: ../src/Property/Charset.php
92+
93+
-
94+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:comments\(\)\.$#'
95+
identifier: method.notFound
96+
count: 1
97+
path: ../src/Property/Import.php
98+
99+
-
100+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:comments\(\)\.$#'
101+
identifier: method.notFound
102+
count: 1
103+
path: ../src/Rule/Rule.php
104+
105+
-
106+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceAfterRuleName\(\)\.$#'
107+
identifier: method.notFound
108+
count: 1
109+
path: ../src/Rule/Rule.php
110+
111+
-
112+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:comments\(\)\.$#'
113+
identifier: method.notFound
114+
count: 1
115+
path: ../src/RuleSet/AtRuleSet.php
116+
117+
-
118+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceBeforeOpeningBrace\(\)\.$#'
119+
identifier: method.notFound
120+
count: 1
121+
path: ../src/RuleSet/AtRuleSet.php
122+
123+
-
124+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:comments\(\)\.$#'
125+
identifier: method.notFound
126+
count: 1
127+
path: ../src/RuleSet/DeclarationBlock.php
128+
129+
-
130+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:implode\(\)\.$#'
131+
identifier: method.notFound
132+
count: 1
133+
path: ../src/RuleSet/DeclarationBlock.php
134+
135+
-
136+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceAfterSelectorSeparator\(\)\.$#'
137+
identifier: method.notFound
138+
count: 1
139+
path: ../src/RuleSet/DeclarationBlock.php
140+
141+
-
142+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceBeforeOpeningBrace\(\)\.$#'
143+
identifier: method.notFound
144+
count: 1
145+
path: ../src/RuleSet/DeclarationBlock.php
146+
147+
-
148+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceBeforeSelectorSeparator\(\)\.$#'
149+
identifier: method.notFound
150+
count: 1
151+
path: ../src/RuleSet/DeclarationBlock.php
152+
153+
-
154+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:removeLastSemicolon\(\)\.$#'
155+
identifier: method.notFound
156+
count: 1
157+
path: ../src/RuleSet/RuleSet.php
158+
159+
-
160+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:safely\(\)\.$#'
161+
identifier: method.notFound
162+
count: 1
163+
path: ../src/RuleSet/RuleSet.php
164+
165+
-
166+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceAfterRules\(\)\.$#'
167+
identifier: method.notFound
168+
count: 1
169+
path: ../src/RuleSet/RuleSet.php
170+
171+
-
172+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceBeforeRules\(\)\.$#'
173+
identifier: method.notFound
174+
count: 1
175+
path: ../src/RuleSet/RuleSet.php
176+
177+
-
178+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceBetweenRules\(\)\.$#'
179+
identifier: method.notFound
180+
count: 1
181+
path: ../src/RuleSet/RuleSet.php
182+
183+
-
184+
message: '#^PHPDoc tag @throws with type Sabberworm\\CSS\\Value\\SourceException\|Sabberworm\\CSS\\Value\\UnexpectedEOFException\|Sabberworm\\CSS\\Value\\UnexpectedTokenException is not subtype of Throwable$#'
185+
identifier: throws.notThrowable
186+
count: 3
187+
path: ../src/Value/CSSFunction.php
188+
189+
-
190+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:implode\(\)\.$#'
191+
identifier: method.notFound
192+
count: 1
193+
path: ../src/Value/CalcRuleValueList.php
194+
195+
-
196+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:implode\(\)\.$#'
197+
identifier: method.notFound
198+
count: 2
199+
path: ../src/Value/Color.php
200+
201+
-
202+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceAfterListArgumentSeparator\(\)\.$#'
203+
identifier: method.notFound
204+
count: 1
205+
path: ../src/Value/Color.php
206+
207+
-
208+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceBeforeListArgumentSeparator\(\)\.$#'
209+
identifier: method.notFound
210+
count: 1
211+
path: ../src/Value/Color.php
212+
213+
-
214+
message: '#^Cannot call method getSize\(\) on Sabberworm\\CSS\\Value\\Value\|string\.$#'
215+
identifier: method.nonObject
216+
count: 3
217+
path: ../src/Value/Color.php
218+
219+
-
220+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:implode\(\)\.$#'
221+
identifier: method.notFound
222+
count: 1
223+
path: ../src/Value/ValueList.php
224+
225+
-
226+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceAfterListArgumentSeparator\(\)\.$#'
227+
identifier: method.notFound
228+
count: 1
229+
path: ../src/Value/ValueList.php
230+
231+
-
232+
message: '#^Call to an undefined method Sabberworm\\CSS\\OutputFormat\:\:spaceBeforeListArgumentSeparator\(\)\.$#'
233+
identifier: method.notFound
234+
count: 1
235+
path: ../src/Value/ValueList.php
236+
237+
-
238+
message: '#^Cannot call method getColor\(\) on Sabberworm\\CSS\\Value\\RuleValueList\|string\.$#'
239+
identifier: method.nonObject
240+
count: 7
241+
path: ../tests/ParserTest.php
242+
243+
-
244+
message: '#^Cannot call method getListSeparator\(\) on Sabberworm\\CSS\\Value\\Value\|string\.$#'
245+
identifier: method.nonObject
246+
count: 4
247+
path: ../tests/ParserTest.php
3248

config/phpstan.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ parameters:
66
# Don't be overly greedy on machines with more CPU's to be a good neighbor especially on CI
77
maximumNumberOfProcesses: 5
88

9-
level: 1
9+
level: 2
1010

1111
paths:
1212
- %currentWorkingDirectory%/bin/

0 commit comments

Comments
 (0)