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>
@@ -240,6 +241,7 @@ public function testMultipleUnreachable(): void
240
241
]);
241
242
}
242
243
244
+ #[RequiresPhp('>= 8.1 ' )]
243
245
public function testBug13232a (): void
244
246
{
245
247
$ this ->treatPhpDocTypesAsCertain = false ;
@@ -251,6 +253,7 @@ public function testBug13232a(): void
251
253
]);
252
254
}
253
255
256
+ #[RequiresPhp('>= 8.1 ' )]
254
257
public function testBug13232b (): void
255
258
{
256
259
$ this ->treatPhpDocTypesAsCertain = false ;
@@ -262,6 +265,7 @@ public function testBug13232b(): void
262
265
]);
263
266
}
264
267
268
+ #[RequiresPhp('>= 8.1 ' )]
265
269
public function testBug13232c (): void
266
270
{
267
271
$ this ->treatPhpDocTypesAsCertain = false ;
@@ -277,6 +281,7 @@ public function testBug13232c(): void
277
281
]);
278
282
}
279
283
284
+ #[RequiresPhp('>= 8.1 ' )]
280
285
public function testBug13232d (): void
281
286
{
282
287
$ this ->treatPhpDocTypesAsCertain = false ;
You can’t perform that action at this time.
0 commit comments