File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
tests/PHPStan/Rules/Exceptions/data Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1638,6 +1638,13 @@ private function processStmtNode(
16381638 } else {
16391639 $ catchScope = $ catchScope ->mergeWith ($ matchingThrowPoint ->getScope ());
16401640 }
1641+
1642+ foreach ($ finallyExitPoints as $ key => $ finallyExitPoint ) {
1643+ if ($ finallyExitPoint ->getStatement ()->expr === $ matchingThrowPoint ->getNode ()) {
1644+ unset($ finallyExitPoints [$ key ]);
1645+ break ;
1646+ }
1647+ }
16411648 }
16421649
16431650 $ variableName = null ;
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ function func(): void {
88 try {
99 throw new LogicException ('test ' );
1010 } catch (LogicException ) {
11- // This catch-block should cause line 7 to not be treated as an exit point
11+ // This catch-block should cause line 9 to not be treated as an exit point
1212 } finally {
1313 if (getenv ('FOO ' )) {
1414 return ;
You can’t perform that action at this time.
0 commit comments