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 cf34490 commit 6232878Copy full SHA for 6232878
src/NodeVisitor/ClassUseTrait.php
@@ -42,15 +42,15 @@ public function afterTraverse(array $nodes): ?array
42
43
if ($node instanceof Stmt\Class_) {
44
foreach ($traits as $trait) {
45
- \array_unshift($node->stmts, new Stmt\TraitUse([new Name($trait)]));
+ $node->stmts[] = new Stmt\TraitUse([new Name($trait)]);
46
}
47
48
49
if ($node instanceof Namespace_) {
50
foreach ($node->stmts as $stmt) {
51
if ($stmt instanceof Stmt\Class_) {
52
53
- \array_unshift($stmt->stmts, new Stmt\TraitUse([new Name($trait)]));
+ $stmt->stmts[] = new Stmt\TraitUse([new Name($trait)]);
54
55
56
0 commit comments