File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
tests/PHPStan/Rules/DeadCode Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -2933,7 +2933,7 @@ static function (): void {
2933
2933
$ exprResult ->getImpurePoints (),
2934
2934
static fn (): MutatingScope => $ scope ->filterByTruthyValue ($ expr ),
2935
2935
static fn (): MutatingScope => $ scope ->filterByFalseyValue ($ expr ),
2936
- $ exprResult ->isAlwaysTerminating ()
2936
+ $ exprResult ->isAlwaysTerminating (),
2937
2937
);
2938
2938
} elseif ($ expr instanceof StaticCall) {
2939
2939
$ hasYield = false ;
@@ -5804,7 +5804,7 @@ static function (): void {
5804
5804
$ hasYield = $ result ->hasYield ();
5805
5805
$ throwPoints = array_merge ($ throwPoints , $ result ->getThrowPoints ());
5806
5806
$ impurePoints = array_merge ($ impurePoints , $ result ->getImpurePoints ());
5807
- $ isAlwaysTerminating = $ isAlwaysTerminating || $ result ->isAlwaysTerminating ();
5807
+ $ isAlwaysTerminating = $ result ->isAlwaysTerminating ();
5808
5808
$ scope = $ result ->getScope ();
5809
5809
foreach ($ var ->items as $ i => $ arrayItem ) {
5810
5810
if ($ arrayItem === null ) {
Original file line number Diff line number Diff line change 5
5
use PHPStan \Rules \Rule ;
6
6
use PHPStan \Testing \RuleTestCase ;
7
7
use PHPUnit \Framework \Attributes \DataProvider ;
8
+ use PHPUnit \Framework \Attributes \RequiresPhp ;
8
9
9
10
/**
10
11
* @extends RuleTestCase<UnreachableStatementRule>
@@ -251,6 +252,7 @@ public function testMultipleUnreachable(): void
251
252
]);
252
253
}
253
254
255
+ #[RequiresPhp('>= 8.1 ' )]
254
256
public function testBug13232a (): void
255
257
{
256
258
$ this ->treatPhpDocTypesAsCertain = false ;
@@ -262,6 +264,7 @@ public function testBug13232a(): void
262
264
]);
263
265
}
264
266
267
+ #[RequiresPhp('>= 8.1 ' )]
265
268
public function testBug13232b (): void
266
269
{
267
270
$ this ->treatPhpDocTypesAsCertain = false ;
@@ -273,6 +276,7 @@ public function testBug13232b(): void
273
276
]);
274
277
}
275
278
279
+ #[RequiresPhp('>= 8.1 ' )]
276
280
public function testBug13232c (): void
277
281
{
278
282
$ this ->treatPhpDocTypesAsCertain = false ;
@@ -288,6 +292,7 @@ public function testBug13232c(): void
288
292
]);
289
293
}
290
294
295
+ #[RequiresPhp('>= 8.1 ' )]
291
296
public function testBug13232d (): void
292
297
{
293
298
$ this ->treatPhpDocTypesAsCertain = false ;
You can’t perform that action at this time.
0 commit comments