Skip to content

Commit 3fbbe3f

Browse files
authored
Fix rule AnonymousMigrationsRector (#260)
1 parent a4fb100 commit 3fbbe3f

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

src/Rector/Class_/AnonymousMigrationsRector.php

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -78,19 +78,8 @@ public function refactor(Node $node): ?Node
7878
return null;
7979
}
8080

81-
return new Return_(new New_(new Class_(
82-
null,
83-
[
84-
'flags' => $node->flags,
85-
'extends' => $node->extends,
86-
'implements' => $node->implements,
87-
'stmts' => $node->stmts,
88-
'attrGroups' => $node->attrGroups,
89-
],
90-
[
91-
'startLine' => $node->getStartLine(),
92-
'endLine' => $node->getEndLine(),
93-
]
94-
)));
81+
$node->name = null;
82+
83+
return new Return_(new New_($node));
9584
}
9685
}

0 commit comments

Comments
 (0)