@@ -42,10 +42,6 @@ protected function getRule(): Rule
4242
4343 public function testRule (): void
4444 {
45- if (PHP_VERSION_ID < 80000 ) {
46- self ::markTestSkipped ();
47- }
48-
4945 $ this ->analyse ([__DIR__ . '/data/data-provider-data.php ' ], [
5046 [
5147 'Parameter #2 $input of method DataProviderDataTest\FooTest::testWithAttribute() expects string, int given. ' ,
@@ -99,97 +95,108 @@ public function testRule(): void
9995 'Parameter #2 $input of method DataProviderDataTest\UnionTypeReturnTest::testFoo() expects string, int given. ' ,
10096 216 ,
10197 ],
102- [
103- 'Parameter $input of method DataProviderDataTest\NamedArgsInProvider::testFoo() expects string, int given. ' ,
104- 255 ,
105- ],
106- [
107- 'Parameter $input of method DataProviderDataTest\NamedArgsInProvider::testFoo() expects string, false given. ' ,
108- 255 ,
109- ],
11098 [
11199 'Parameter #2 $input of method DataProviderDataTest\YieldFromExpr::testFoo() expects string, int given. ' ,
112- 275 ,
100+ 236 ,
113101 ],
114102 [
115103 'Parameter #2 $input of method DataProviderDataTest\YieldFromExpr::testFoo() expects string, true given. ' ,
116- 277 ,
104+ 238 ,
117105 ],
118106 [
119107 'Parameter #1 $si of method DataProviderDataTest\TestInvalidVariadic::testBar() expects int, string given. ' ,
120- 334 ,
108+ 295 ,
121109 ],
122110 [
123111 'Parameter #1 $s of method DataProviderDataTest\TestInvalidVariadic::testFoo() expects string, int given. ' ,
124- 335 ,
112+ 296 ,
125113 ],
126114 [
127115 'Parameter #1 $si of method DataProviderDataTest\TestInvalidVariadic2::testBar() expects int, string given. ' ,
128- 356 ,
116+ 317 ,
129117 ],
130118 [
131119 'Parameter #2 ...$moreS of method DataProviderDataTest\TestInvalidVariadic2::testFoo() expects int, string given. ' ,
132- 356 ,
120+ 317 ,
133121 ],
134122 [
135123 'Parameter #4 ...$moreS of method DataProviderDataTest\TestInvalidVariadic2::testFoo() expects int, string given. ' ,
136- 356 ,
124+ 317 ,
137125 ],
138126 [
139127 'Parameter #1 $s of method DataProviderDataTest\TestInvalidVariadic2::testFoo() expects string, int given. ' ,
140- 357 ,
128+ 318 ,
141129 ],
142130 [
143131 'Unknown parameter $foo in call to method DataProviderDataTest\TestArrayShapeIterable::testBar(). ' ,
144- 371 ,
132+ 332 ,
145133 ],
146134 [
147135 'Missing parameter $si (int) in call to method DataProviderDataTest\TestArrayShapeIterable::testBar(). ' ,
148- 371 ,
136+ 332 ,
149137 ],
150138 [
151139 'Parameter #1 $i of method DataProviderDataTest\TestArrayIterator::testBar() expects int, int|string given. ' ,
152- 421 ,
140+ 382 ,
153141 ],
154142 [
155143 'Parameter #1 $i of method DataProviderDataTest\TestArrayIterator::testFoo() expects int, int|string given. ' ,
156- 421 ,
144+ 382 ,
157145 ],
158146 [
159147 'Parameter #1 $s1 of method DataProviderDataTest\TestArrayIterator::testFooBar() expects string, int|string given. ' ,
160- 421 ,
148+ 382 ,
161149 ],
162150 [
163151 'Parameter #1 $si of method DataProviderDataTest\TestWrongTypedIterable::testBar() expects int, string given. ' ,
164- 439 ,
152+ 400 ,
165153 ],
166154 [
167155 'Parameter #2 $input of method DataProviderDataTest\AbstractBaseTest::testWithAttribute() expects string, int given. ' ,
168- 466 ,
156+ 427 ,
169157 ],
170158 [
171159 'Parameter #2 $input of method DataProviderDataTest\AbstractBaseTest::testWithAttribute() expects string, false given. ' ,
172- 470 ,
160+ 431 ,
173161 ],
174162 [
175163 'Parameter #2 $input of method DataProviderDataTest\ConstantArrayUnionTypeReturnTest::testFoo() expects string, int given. ' ,
176- 505 ,
164+ 466 ,
177165 ],
178166 [
179167 'Method DataProviderDataTest\ConstantArrayDifferentLengthUnionTypeReturnTest::testFoo() invoked with 3 parameters, 2 required. ' ,
180- 543 ,
168+ 504 ,
181169 ],
182170 [
183171 'Parameter #2 $input of method DataProviderDataTest\ConstantArrayDifferentLengthUnionTypeReturnTest::testFoo() expects string, int given. ' ,
184- 543 ,
172+ 504 ,
185173 ],
186174 [
187175 'Parameter #2 $input of method DataProviderDataTest\ConstantArrayUnionWithDifferentValueTypeReturnTest::testFoo() expects string, int|string given. ' ,
188- 576 ,
176+ 537 ,
189177 ],
190178 ]);
191179 }
192180
181+ public function testRulePhp8 (): void
182+ {
183+ if (PHP_VERSION_ID < 80000 ) {
184+ self ::markTestSkipped ();
185+ }
186+
187+ $ this ->analyse ([__DIR__ . '/data/data-provider-data-named.php ' ], [
188+ [
189+ 'Parameter $input of method DataProviderDataTestPhp8\NamedArgsInProvider::testFoo() expects string, int given. ' ,
190+ 44
191+ ],
192+ [
193+ 'Parameter $input of method DataProviderDataTestPhp8\NamedArgsInProvider::testFoo() expects string, false given. ' ,
194+ 44
195+ ],
196+ ]);
197+ }
198+
199+
193200 public function testVariadicMethod (): void
194201 {
195202 $ this ->analyse ([__DIR__ . '/data/data-provider-variadic-method.php ' ], [
0 commit comments