Skip to content

Commit

Permalink
Revert [Core] No need reindex FileWithoutNamespace on beforeTraverse (#…
Browse files Browse the repository at this point in the history
…4043) (#4044)

This reverts commit 90b1f9f.
  • Loading branch information
samsonasik authored Jun 2, 2023
1 parent 90b1f9f commit 7cde413
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Rector/AbstractRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,11 @@ public function beforeTraverse(array $nodes): ?array
if (! $childStmt instanceof FileWithoutNamespace) {
$childStmt->setAttribute(AttributeKey::STMT_KEY, $key);
continue;
}
}

foreach ($childStmt->stmts as $keyChildStmt => $childStmtStmt) {
$childStmtStmt->setAttribute(AttributeKey::STMT_KEY, $keyChildStmt);
}
}

return parent::beforeTraverse($nodes);
Expand Down

0 comments on commit 7cde413

Please sign in to comment.