File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -19,12 +19,12 @@ final class VersionResolver
1919 * @api
2020 * @var string
2121 */
22- public const PACKAGE_VERSION = 'affdec96db31156ab2b05a5801f980e284e291a5 ' ;
22+ public const PACKAGE_VERSION = '02a30d483fe28abc9315a7e6bf809614750c95ab ' ;
2323 /**
2424 * @api
2525 * @var string
2626 */
27- public const RELEASE_DATE = '2023-12-17 22:31:31 ' ;
27+ public const RELEASE_DATE = '2023-12-18 12:35:53 ' ;
2828 /**
2929 * @var int
3030 */
Original file line number Diff line number Diff line change 44namespace Rector \Core \PHPStan \NodeVisitor ;
55
66use PhpParser \Node ;
7+ use PhpParser \Node \Expr \Exit_ ;
78use PhpParser \Node \Stmt \ClassLike ;
89use PhpParser \Node \Stmt \Declare_ ;
10+ use PhpParser \Node \Stmt \Expression ;
911use PhpParser \NodeVisitorAbstract ;
1012use PHPStan \Analyser \MutatingScope ;
1113use Rector \Core \Contract \PhpParser \Node \StmtsAwareInterface ;
@@ -47,6 +49,10 @@ public function enterNode(Node $node) : ?Node
4749 $ mutatingScope = $ node ->getAttribute (AttributeKey::SCOPE );
4850 $ mutatingScope = $ mutatingScope instanceof MutatingScope ? $ mutatingScope : $ this ->scopeFactory ->createFromFile ($ this ->filePath );
4951 foreach ($ node ->stmts as $ stmt ) {
52+ if ($ stmt instanceof Expression && $ stmt ->expr instanceof Exit_) {
53+ $ isPassedUnreachableStmt = \true;
54+ continue ;
55+ }
5056 if ($ stmt ->getAttribute (AttributeKey::IS_UNREACHABLE ) === \true) {
5157 $ isPassedUnreachableStmt = \true;
5258 continue ;
You can’t perform that action at this time.
0 commit comments