From 13e25b18f439b3043a55f0adfcb6294164ad5d14 Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Thu, 19 Dec 2024 07:22:37 +0700 Subject: [PATCH] clean up array_values() on StmtKeyNodeVisitor Already covered previously on indexer https://github.com/rectorphp/rector-src/blob/3e414f34039da79932322ed6e1f906454ab8c366/src/NodeTypeResolver/PHPStan/Scope/PHPStanNodeScopeResolver.php#L162-L168 --- .../PHPStan/Scope/NodeVisitor/StmtKeyNodeVisitor.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/NodeTypeResolver/PHPStan/Scope/NodeVisitor/StmtKeyNodeVisitor.php b/src/NodeTypeResolver/PHPStan/Scope/NodeVisitor/StmtKeyNodeVisitor.php index d35a35422d7..d1d74ca247e 100644 --- a/src/NodeTypeResolver/PHPStan/Scope/NodeVisitor/StmtKeyNodeVisitor.php +++ b/src/NodeTypeResolver/PHPStan/Scope/NodeVisitor/StmtKeyNodeVisitor.php @@ -24,8 +24,6 @@ public function enterNode(Node $node): ?Node return null; } - $node->stmts = array_values($node->stmts); - // re-index stmt key under current node foreach ($node->stmts as $key => $childStmt) { $childStmt->setAttribute(AttributeKey::STMT_KEY, $key);