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 @@ -2930,7 +2930,7 @@ static function (): void {
29302930 $ exprResult ->getImpurePoints (),
29312931 static fn (): MutatingScope => $ scope ->filterByTruthyValue ($ expr ),
29322932 static fn (): MutatingScope => $ scope ->filterByFalseyValue ($ expr ),
2933- $ exprResult ->isAlwaysTerminating ()
2933+ $ exprResult ->isAlwaysTerminating (),
29342934 );
29352935 } elseif ($ expr instanceof StaticCall) {
29362936 $ hasYield = false ;
@@ -5801,7 +5801,7 @@ static function (): void {
58015801 $ hasYield = $ result ->hasYield ();
58025802 $ throwPoints = array_merge ($ throwPoints , $ result ->getThrowPoints ());
58035803 $ impurePoints = array_merge ($ impurePoints , $ result ->getImpurePoints ());
5804- $ isAlwaysTerminating = $ isAlwaysTerminating || $ result ->isAlwaysTerminating ();
5804+ $ isAlwaysTerminating = $ result ->isAlwaysTerminating ();
58055805 $ scope = $ result ->getScope ();
58065806 foreach ($ var ->items as $ i => $ arrayItem ) {
58075807 if ($ arrayItem === null ) {
Original file line number Diff line number Diff line change 55use PHPStan \Rules \Rule ;
66use PHPStan \Testing \RuleTestCase ;
77use PHPUnit \Framework \Attributes \DataProvider ;
8+ use PHPUnit \Framework \Attributes \RequiresPhp ;
89
910/**
1011 * @extends RuleTestCase<UnreachableStatementRule>
@@ -240,6 +241,7 @@ public function testMultipleUnreachable(): void
240241 ]);
241242 }
242243
244+ #[RequiresPhp('>= 8.1 ' )]
243245 public function testBug13232a (): void
244246 {
245247 $ this ->treatPhpDocTypesAsCertain = false ;
@@ -251,6 +253,7 @@ public function testBug13232a(): void
251253 ]);
252254 }
253255
256+ #[RequiresPhp('>= 8.1 ' )]
254257 public function testBug13232b (): void
255258 {
256259 $ this ->treatPhpDocTypesAsCertain = false ;
@@ -262,6 +265,7 @@ public function testBug13232b(): void
262265 ]);
263266 }
264267
268+ #[RequiresPhp('>= 8.1 ' )]
265269 public function testBug13232c (): void
266270 {
267271 $ this ->treatPhpDocTypesAsCertain = false ;
@@ -277,6 +281,7 @@ public function testBug13232c(): void
277281 ]);
278282 }
279283
284+ #[RequiresPhp('>= 8.1 ' )]
280285 public function testBug13232d (): void
281286 {
282287 $ this ->treatPhpDocTypesAsCertain = false ;
You can’t perform that action at this time.
0 commit comments