Skip to content

Commit c32ebc6

Browse files
authored
[TASK] Raise PHPStan to level 5 (#1356)
1 parent 54574e3 commit c32ebc6

File tree

2 files changed

+79
-1
lines changed

2 files changed

+79
-1
lines changed

config/phpstan-baseline.neon

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ parameters:
66
count: 1
77
path: ../src/CSSList/CSSList.php
88

9+
-
10+
message: '#^Parameter \#2 \$found of class Sabberworm\\CSS\\Parsing\\UnexpectedTokenException constructor expects string, Sabberworm\\CSS\\Value\\CSSFunction\|Sabberworm\\CSS\\Value\\CSSString\|Sabberworm\\CSS\\Value\\LineName\|Sabberworm\\CSS\\Value\\Size\|Sabberworm\\CSS\\Value\\URL given\.$#'
11+
identifier: argument.type
12+
count: 1
13+
path: ../src/CSSList/CSSList.php
14+
915
-
1016
message: '#^Parameters should have "Sabberworm\\CSS\\CSSList\\CSSListItem\|array" types as the only types passed to this method$#'
1117
identifier: typePerfect.narrowPublicClassMethodParamType
@@ -30,6 +36,18 @@ parameters:
3036
count: 1
3137
path: ../src/RuleSet/DeclarationBlock.php
3238

39+
-
40+
message: '#^Parameter \#2 \$arguments of class Sabberworm\\CSS\\Value\\CSSFunction constructor expects array\<Sabberworm\\CSS\\Value\\Value\|string\>\|Sabberworm\\CSS\\Value\\RuleValueList, Sabberworm\\CSS\\Value\\Value\|string given\.$#'
41+
identifier: argument.type
42+
count: 1
43+
path: ../src/Value/CSSFunction.php
44+
45+
-
46+
message: '#^Parameter \#2 \$offset of method Sabberworm\\CSS\\Parsing\\ParserState\:\:peek\(\) expects int\<0, max\>, \-1 given\.$#'
47+
identifier: argument.type
48+
count: 2
49+
path: ../src/Value/CalcFunction.php
50+
3351
-
3452
message: '#^Cannot call method getSize\(\) on Sabberworm\\CSS\\Value\\Value\|string\.$#'
3553
identifier: method.nonObject
@@ -48,8 +66,68 @@ parameters:
4866
count: 1
4967
path: ../src/Value/Size.php
5068

69+
-
70+
message: '#^Parameter \#2 \$arguments of class Sabberworm\\CSS\\Value\\CSSFunction constructor expects array\<Sabberworm\\CSS\\Value\\Value\|string\>\|Sabberworm\\CSS\\Value\\RuleValueList, Sabberworm\\CSS\\Value\\Value\|string given\.$#'
71+
identifier: argument.type
72+
count: 1
73+
path: ../src/Value/Value.php
74+
75+
-
76+
message: '#^Parameter \#2 \$offset of method Sabberworm\\CSS\\Parsing\\ParserState\:\:peek\(\) expects int\<0, max\>, \-1 given\.$#'
77+
identifier: argument.type
78+
count: 1
79+
path: ../src/Value/Value.php
80+
5181
-
5282
message: '#^Call to static method PHPUnit\\Framework\\Assert\:\:assertSame\(\) with ''red'' and Sabberworm\\CSS\\Value\\Value will always evaluate to false\.$#'
5383
identifier: staticMethod.impossibleType
5484
count: 1
5585
path: ../tests/ParserTest.php
86+
87+
-
88+
message: '#^Parameter \#1 \$message of static method PHPUnit\\Framework\\Assert\:\:fail\(\) expects string, Exception given\.$#'
89+
identifier: argument.type
90+
count: 1
91+
path: ../tests/ParserTest.php
92+
93+
-
94+
message: '#^Parameter \#1 \$value of method Sabberworm\\CSS\\Rule\\Rule\:\:setValue\(\) expects Sabberworm\\CSS\\Value\\RuleValueList\|string\|null, Sabberworm\\CSS\\Value\\Size given\.$#'
95+
identifier: argument.type
96+
count: 3
97+
path: ../tests/RuleSet/DeclarationBlockTest.php
98+
99+
-
100+
message: '#^Parameter \#1 \$type of class Sabberworm\\CSS\\CSSList\\AtRuleBlockList constructor expects non\-empty\-string, '''' given\.$#'
101+
identifier: argument.type
102+
count: 3
103+
path: ../tests/Unit/CSSList/AtRuleBlockListTest.php
104+
105+
-
106+
message: '#^Parameter \#1 \$value of method Sabberworm\\CSS\\Rule\\Rule\:\:setValue\(\) expects Sabberworm\\CSS\\Value\\RuleValueList\|string\|null, Sabberworm\\CSS\\Value\\CSSFunction given\.$#'
107+
identifier: argument.type
108+
count: 2
109+
path: ../tests/Unit/CSSList/CSSBlockListTest.php
110+
111+
-
112+
message: '#^Parameter \#1 \$value of method Sabberworm\\CSS\\Rule\\Rule\:\:setValue\(\) expects Sabberworm\\CSS\\Value\\RuleValueList\|string\|null, Sabberworm\\CSS\\Value\\CSSString given\.$#'
113+
identifier: argument.type
114+
count: 10
115+
path: ../tests/Unit/CSSList/CSSBlockListTest.php
116+
117+
-
118+
message: '#^Parameter \#1 \$selectors of method Sabberworm\\CSS\\CSSList\\CSSList\:\:removeDeclarationBlockBySelector\(\) expects array\<Sabberworm\\CSS\\Property\\Selector\>\|Sabberworm\\CSS\\RuleSet\\DeclarationBlock\|string, array\<int, string\> given\.$#'
119+
identifier: argument.type
120+
count: 2
121+
path: ../tests/Unit/CSSList/CSSListTest.php
122+
123+
-
124+
message: '#^Parameter \#3 \$matchType of class Sabberworm\\CSS\\Parsing\\UnexpectedEOFException constructor expects ''count''\|''custom''\|''expression''\|''identifier''\|''literal''\|''search'', ''coding'' given\.$#'
125+
identifier: argument.type
126+
count: 1
127+
path: ../tests/Unit/Parsing/UnexpectedEOFExceptionTest.php
128+
129+
-
130+
message: '#^Parameter \#3 \$matchType of class Sabberworm\\CSS\\Parsing\\UnexpectedTokenException constructor expects ''count''\|''custom''\|''expression''\|''identifier''\|''literal''\|''search'', ''coding'' given\.$#'
131+
identifier: argument.type
132+
count: 1
133+
path: ../tests/Unit/Parsing/UnexpectedTokenExceptionTest.php

config/phpstan.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ parameters:
88

99
phpVersion: 70200
1010

11-
level: 4
11+
level: 5
1212

1313
paths:
1414
- %currentWorkingDirectory%/bin/

0 commit comments

Comments
 (0)