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 @@ -2931,7 +2931,7 @@ static function (): void {
2931
2931
$ exprResult ->getImpurePoints (),
2932
2932
static fn (): MutatingScope => $ scope ->filterByTruthyValue ($ expr ),
2933
2933
static fn (): MutatingScope => $ scope ->filterByFalseyValue ($ expr ),
2934
- $ exprResult ->isAlwaysTerminating ()
2934
+ $ exprResult ->isAlwaysTerminating (),
2935
2935
);
2936
2936
} elseif ($ expr instanceof StaticCall) {
2937
2937
$ hasYield = false ;
@@ -5802,7 +5802,7 @@ static function (): void {
5802
5802
$ hasYield = $ result ->hasYield ();
5803
5803
$ throwPoints = array_merge ($ throwPoints , $ result ->getThrowPoints ());
5804
5804
$ impurePoints = array_merge ($ impurePoints , $ result ->getImpurePoints ());
5805
- $ isAlwaysTerminating = $ isAlwaysTerminating || $ result ->isAlwaysTerminating ();
5805
+ $ isAlwaysTerminating = $ result ->isAlwaysTerminating ();
5806
5806
$ scope = $ result ->getScope ();
5807
5807
foreach ($ var ->items as $ i => $ arrayItem ) {
5808
5808
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