@@ -835,7 +835,6 @@ private function processStmtNode(
835
835
$ bodyScope = $ this ->enterForeach ($ bodyScope , $ stmt );
836
836
$ bodyScopeResult = $ this ->processStmtNodes ($ stmt , $ stmt ->stmts , $ bodyScope , static function (): void {
837
837
}, $ context ->enterDeep ())->filterOutLoopExitPoints ();
838
- $ alwaysTerminating = $ bodyScopeResult ->isAlwaysTerminating ();
839
838
$ bodyScope = $ bodyScopeResult ->getScope ();
840
839
foreach ($ bodyScopeResult ->getExitPointsByType (Continue_::class) as $ continueExitPoint ) {
841
840
$ bodyScope = $ bodyScope ->mergeWith ($ continueExitPoint ->getScope ());
@@ -848,7 +847,7 @@ private function processStmtNode(
848
847
$ bodyScope = $ prevScope ->generalizeWith ($ bodyScope );
849
848
}
850
849
$ count ++;
851
- } while (! $ alwaysTerminating && $ count < self ::LOOP_SCOPE_ITERATIONS );
850
+ } while ($ count < self ::LOOP_SCOPE_ITERATIONS );
852
851
}
853
852
854
853
$ bodyScope = $ bodyScope ->mergeWith ($ this ->polluteScopeWithAlwaysIterableForeach ? $ scope ->filterByTruthyValue ($ arrayComparisonExpr ) : $ scope );
@@ -904,7 +903,6 @@ private function processStmtNode(
904
903
}, ExpressionContext::createDeep ())->getTruthyScope ();
905
904
$ bodyScopeResult = $ this ->processStmtNodes ($ stmt , $ stmt ->stmts , $ bodyScope , static function (): void {
906
905
}, $ context ->enterDeep ())->filterOutLoopExitPoints ();
907
- $ alwaysTerminating = $ bodyScopeResult ->isAlwaysTerminating ();
908
906
$ bodyScope = $ bodyScopeResult ->getScope ();
909
907
foreach ($ bodyScopeResult ->getExitPointsByType (Continue_::class) as $ continueExitPoint ) {
910
908
$ bodyScope = $ bodyScope ->mergeWith ($ continueExitPoint ->getScope ());
@@ -917,7 +915,7 @@ private function processStmtNode(
917
915
$ bodyScope = $ prevScope ->generalizeWith ($ bodyScope );
918
916
}
919
917
$ count ++;
920
- } while (! $ alwaysTerminating && $ count < self ::LOOP_SCOPE_ITERATIONS );
918
+ } while ($ count < self ::LOOP_SCOPE_ITERATIONS );
921
919
}
922
920
923
921
$ bodyScope = $ bodyScope ->mergeWith ($ scope );
@@ -999,7 +997,7 @@ private function processStmtNode(
999
997
$ bodyScope = $ prevScope ->generalizeWith ($ bodyScope );
1000
998
}
1001
999
$ count ++;
1002
- } while (! $ alwaysTerminating && $ count < self ::LOOP_SCOPE_ITERATIONS );
1000
+ } while ($ count < self ::LOOP_SCOPE_ITERATIONS );
1003
1001
1004
1002
$ bodyScope = $ bodyScope ->mergeWith ($ scope );
1005
1003
}
@@ -1082,7 +1080,6 @@ private function processStmtNode(
1082
1080
}
1083
1081
$ bodyScopeResult = $ this ->processStmtNodes ($ stmt , $ stmt ->stmts , $ bodyScope , static function (): void {
1084
1082
}, $ context ->enterDeep ())->filterOutLoopExitPoints ();
1085
- $ alwaysTerminating = $ bodyScopeResult ->isAlwaysTerminating ();
1086
1083
$ bodyScope = $ bodyScopeResult ->getScope ();
1087
1084
foreach ($ bodyScopeResult ->getExitPointsByType (Continue_::class) as $ continueExitPoint ) {
1088
1085
$ bodyScope = $ bodyScope ->mergeWith ($ continueExitPoint ->getScope ());
@@ -1103,7 +1100,7 @@ private function processStmtNode(
1103
1100
$ bodyScope = $ prevScope ->generalizeWith ($ bodyScope );
1104
1101
}
1105
1102
$ count ++;
1106
- } while (! $ alwaysTerminating && $ count < self ::LOOP_SCOPE_ITERATIONS );
1103
+ } while ($ count < self ::LOOP_SCOPE_ITERATIONS );
1107
1104
}
1108
1105
1109
1106
$ bodyScope = $ bodyScope ->mergeWith ($ initScope );
0 commit comments