@@ -835,7 +835,6 @@ private function processStmtNode(
835835 $ bodyScope = $ this ->enterForeach ($ bodyScope , $ stmt );
836836 $ bodyScopeResult = $ this ->processStmtNodes ($ stmt , $ stmt ->stmts , $ bodyScope , static function (): void {
837837 }, $ context ->enterDeep ())->filterOutLoopExitPoints ();
838- $ alwaysTerminating = $ bodyScopeResult ->isAlwaysTerminating ();
839838 $ bodyScope = $ bodyScopeResult ->getScope ();
840839 foreach ($ bodyScopeResult ->getExitPointsByType (Continue_::class) as $ continueExitPoint ) {
841840 $ bodyScope = $ bodyScope ->mergeWith ($ continueExitPoint ->getScope ());
@@ -848,7 +847,7 @@ private function processStmtNode(
848847 $ bodyScope = $ prevScope ->generalizeWith ($ bodyScope );
849848 }
850849 $ count ++;
851- } while (! $ alwaysTerminating && $ count < self ::LOOP_SCOPE_ITERATIONS );
850+ } while ($ count < self ::LOOP_SCOPE_ITERATIONS );
852851 }
853852
854853 $ bodyScope = $ bodyScope ->mergeWith ($ this ->polluteScopeWithAlwaysIterableForeach ? $ scope ->filterByTruthyValue ($ arrayComparisonExpr ) : $ scope );
@@ -904,7 +903,6 @@ private function processStmtNode(
904903 }, ExpressionContext::createDeep ())->getTruthyScope ();
905904 $ bodyScopeResult = $ this ->processStmtNodes ($ stmt , $ stmt ->stmts , $ bodyScope , static function (): void {
906905 }, $ context ->enterDeep ())->filterOutLoopExitPoints ();
907- $ alwaysTerminating = $ bodyScopeResult ->isAlwaysTerminating ();
908906 $ bodyScope = $ bodyScopeResult ->getScope ();
909907 foreach ($ bodyScopeResult ->getExitPointsByType (Continue_::class) as $ continueExitPoint ) {
910908 $ bodyScope = $ bodyScope ->mergeWith ($ continueExitPoint ->getScope ());
@@ -917,7 +915,7 @@ private function processStmtNode(
917915 $ bodyScope = $ prevScope ->generalizeWith ($ bodyScope );
918916 }
919917 $ count ++;
920- } while (! $ alwaysTerminating && $ count < self ::LOOP_SCOPE_ITERATIONS );
918+ } while ($ count < self ::LOOP_SCOPE_ITERATIONS );
921919 }
922920
923921 $ bodyScope = $ bodyScope ->mergeWith ($ scope );
@@ -999,7 +997,7 @@ private function processStmtNode(
999997 $ bodyScope = $ prevScope ->generalizeWith ($ bodyScope );
1000998 }
1001999 $ count ++;
1002- } while (! $ alwaysTerminating && $ count < self ::LOOP_SCOPE_ITERATIONS );
1000+ } while ($ count < self ::LOOP_SCOPE_ITERATIONS );
10031001
10041002 $ bodyScope = $ bodyScope ->mergeWith ($ scope );
10051003 }
@@ -1082,7 +1080,6 @@ private function processStmtNode(
10821080 }
10831081 $ bodyScopeResult = $ this ->processStmtNodes ($ stmt , $ stmt ->stmts , $ bodyScope , static function (): void {
10841082 }, $ context ->enterDeep ())->filterOutLoopExitPoints ();
1085- $ alwaysTerminating = $ bodyScopeResult ->isAlwaysTerminating ();
10861083 $ bodyScope = $ bodyScopeResult ->getScope ();
10871084 foreach ($ bodyScopeResult ->getExitPointsByType (Continue_::class) as $ continueExitPoint ) {
10881085 $ bodyScope = $ bodyScope ->mergeWith ($ continueExitPoint ->getScope ());
@@ -1103,7 +1100,7 @@ private function processStmtNode(
11031100 $ bodyScope = $ prevScope ->generalizeWith ($ bodyScope );
11041101 }
11051102 $ count ++;
1106- } while (! $ alwaysTerminating && $ count < self ::LOOP_SCOPE_ITERATIONS );
1103+ } while ($ count < self ::LOOP_SCOPE_ITERATIONS );
11071104 }
11081105
11091106 $ bodyScope = $ bodyScope ->mergeWith ($ initScope );
0 commit comments