We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9cea4c4 commit cf34490Copy full SHA for cf34490
src/NodeVisitor/NamespaceUse.php
@@ -47,18 +47,15 @@ public function afterTraverse(array $nodes): ?array
47
$newNodes[] = $node;
48
49
if ($node instanceof Stmt\Namespace_) {
50
- $stmts = $node->stmts;
51
foreach ($imports as $import) {
52
if (\is_array($import)) {
53
$useNamespace = $this->builderFactory->use($import[0]);
54
$useNamespace->as($import[1]);
55
} else {
56
$useNamespace = $this->builderFactory->use($import);
57
}
58
-
59
- \array_unshift($stmts, $useNamespace->getNode());
+ $node->stmts[] = $useNamespace->getNode(); // @phpstan-ignore-line
60
61
- $node->stmts = $stmts; // @phpstan-ignore-line
62
63
64
0 commit comments