@@ -895,7 +895,7 @@ private function processStmtNode(
895895 }
896896
897897 return new InternalStatementResult ($ scope , $ hasYield , true , [
898- new StatementExitPoint ($ stmt , $ scope ),
898+ new InternalStatementExitPoint ($ stmt , $ scope ),
899899 ], $ overridingThrowPoints ?? $ throwPoints , $ impurePoints );
900900 } elseif ($ stmt instanceof Continue_ || $ stmt instanceof Break_) {
901901 if ($ stmt ->num !== null ) {
@@ -911,7 +911,7 @@ private function processStmtNode(
911911 }
912912
913913 return new InternalStatementResult ($ scope , $ hasYield , true , [
914- new StatementExitPoint ($ stmt , $ scope ),
914+ new InternalStatementExitPoint ($ stmt , $ scope ),
915915 ], $ overridingThrowPoints ?? $ throwPoints , $ impurePoints );
916916 } elseif ($ stmt instanceof Node \Stmt \Expression) {
917917 if ($ stmt ->expr instanceof Expr \Throw_) {
@@ -958,7 +958,7 @@ private function processStmtNode(
958958
959959 if ($ earlyTerminationExpr !== null ) {
960960 return new InternalStatementResult ($ scope , $ hasYield , true , [
961- new StatementExitPoint ($ stmt , $ scope ),
961+ new InternalStatementExitPoint ($ stmt , $ scope ),
962962 ], $ overridingThrowPoints ?? $ throwPoints , $ impurePoints );
963963 }
964964 return new InternalStatementResult ($ scope , $ hasYield , $ isAlwaysTerminating , [], $ overridingThrowPoints ?? $ throwPoints , $ impurePoints );
@@ -1466,7 +1466,7 @@ private function processStmtNode(
14661466 }
14671467
14681468 $ isIterableAtLeastOnce = $ beforeCondBooleanType ->isTrue ()->yes ();
1469- $ nodeCallback (new BreaklessWhileLoopNode ($ stmt , $ finalScopeResult ->getExitPoints ()), $ bodyScopeMaybeRan );
1469+ $ nodeCallback (new BreaklessWhileLoopNode ($ stmt , $ finalScopeResult ->toPublic ()-> getExitPoints ()), $ bodyScopeMaybeRan );
14701470
14711471 if ($ alwaysIterates ) {
14721472 $ isAlwaysTerminating = count ($ finalScopeResult ->getExitPointsByType (Break_::class)) === 0 ;
@@ -1543,7 +1543,7 @@ private function processStmtNode(
15431543 $ condBooleanType = ($ this ->treatPhpDocTypesAsCertain ? $ bodyScope ->getType ($ stmt ->cond ) : $ bodyScope ->getNativeType ($ stmt ->cond ))->toBoolean ();
15441544 $ alwaysIterates = $ condBooleanType ->isTrue ()->yes () && $ context ->isTopLevel ();
15451545
1546- $ nodeCallback (new DoWhileLoopConditionNode ($ stmt ->cond , $ bodyScopeResult ->getExitPoints ()), $ bodyScope );
1546+ $ nodeCallback (new DoWhileLoopConditionNode ($ stmt ->cond , $ bodyScopeResult ->toPublic ()-> getExitPoints ()), $ bodyScope );
15471547
15481548 if ($ alwaysIterates ) {
15491549 $ alwaysTerminating = count ($ bodyScopeResult ->getExitPointsByType (Break_::class)) === 0 ;
@@ -1801,7 +1801,7 @@ private function processStmtNode(
18011801 $ finallyScope = null ;
18021802 }
18031803 foreach ($ branchScopeResult ->getExitPoints () as $ exitPoint ) {
1804- $ finallyExitPoints [] = $ exitPoint ;
1804+ $ finallyExitPoints [] = $ exitPoint-> toPublic () ;
18051805 if ($ exitPoint ->getStatement () instanceof Node \Stmt \Expression && $ exitPoint ->getStatement ()->expr instanceof Expr \Throw_) {
18061806 continue ;
18071807 }
@@ -1954,7 +1954,7 @@ private function processStmtNode(
19541954 $ finallyScope = $ finallyScope ->mergeWith ($ catchScopeForFinally );
19551955 }
19561956 foreach ($ catchScopeResult ->getExitPoints () as $ exitPoint ) {
1957- $ finallyExitPoints [] = $ exitPoint ;
1957+ $ finallyExitPoints [] = $ exitPoint-> toPublic () ;
19581958 if ($ exitPoint ->getStatement () instanceof Node \Stmt \Expression && $ exitPoint ->getStatement ()->expr instanceof Expr \Throw_) {
19591959 continue ;
19601960 }
@@ -1994,7 +1994,7 @@ private function processStmtNode(
19941994 $ finalScope = $ finallyResult ->isAlwaysTerminating () ? $ finalScope : $ finalScope ->processFinallyScope ($ finallyScope , $ originalFinallyScope );
19951995 if (count ($ finallyResult ->getExitPoints ()) > 0 ) {
19961996 $ nodeCallback (new FinallyExitPointsNode (
1997- $ finallyResult ->getExitPoints (),
1997+ $ finallyResult ->toPublic ()-> getExitPoints (),
19981998 $ finallyExitPoints ,
19991999 ), $ scope );
20002000 }
0 commit comments