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 {
29332933$ exprResult ->getImpurePoints (),
29342934static fn (): MutatingScope => $ scope ->filterByTruthyValue ($ expr ),
29352935static fn (): MutatingScope => $ scope ->filterByFalseyValue ($ expr ),
2936- $ exprResult ->isAlwaysTerminating ()
2936+ $ exprResult ->isAlwaysTerminating (),
29372937);
29382938} elseif ($ expr instanceof StaticCall) {
29392939$ hasYield = false ;
@@ -5804,7 +5804,7 @@ static function (): void {
58045804$ hasYield = $ result ->hasYield ();
58055805$ throwPoints = array_merge ($ throwPoints , $ result ->getThrowPoints ());
58065806$ impurePoints = array_merge ($ impurePoints , $ result ->getImpurePoints ());
5807- $ isAlwaysTerminating = $ isAlwaysTerminating || $ result ->isAlwaysTerminating ();
5807+ $ isAlwaysTerminating = $ result ->isAlwaysTerminating ();
58085808$ scope = $ result ->getScope ();
58095809foreach ($ var ->items as $ i => $ arrayItem ) {
58105810if ($ 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>
@@ -251,6 +252,7 @@ public function testMultipleUnreachable(): void
251252]);
252253}
253254
255+ #[RequiresPhp('>= 8.1 ' )]
254256public function testBug13232a (): void
255257{
256258$ this ->treatPhpDocTypesAsCertain = false ;
@@ -262,6 +264,7 @@ public function testBug13232a(): void
262264]);
263265}
264266
267+ #[RequiresPhp('>= 8.1 ' )]
265268public function testBug13232b (): void
266269{
267270$ this ->treatPhpDocTypesAsCertain = false ;
@@ -273,6 +276,7 @@ public function testBug13232b(): void
273276]);
274277}
275278
279+ #[RequiresPhp('>= 8.1 ' )]
276280public function testBug13232c (): void
277281{
278282$ this ->treatPhpDocTypesAsCertain = false ;
@@ -288,6 +292,7 @@ public function testBug13232c(): void
288292]);
289293}
290294
295+ #[RequiresPhp('>= 8.1 ' )]
291296public function testBug13232d (): void
292297{
293298$ this ->treatPhpDocTypesAsCertain = false ;
You can’t perform that action at this time.
0 commit comments