Skip to content

Commit

Permalink
Fix rule AnonymousMigrationsRector (#260)
Browse files Browse the repository at this point in the history
  • Loading branch information
GeniJaho authored Oct 17, 2024
1 parent a4fb100 commit 3fbbe3f
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions src/Rector/Class_/AnonymousMigrationsRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,19 +78,8 @@ public function refactor(Node $node): ?Node
return null;
}

return new Return_(new New_(new Class_(
null,
[
'flags' => $node->flags,
'extends' => $node->extends,
'implements' => $node->implements,
'stmts' => $node->stmts,
'attrGroups' => $node->attrGroups,
],
[
'startLine' => $node->getStartLine(),
'endLine' => $node->getEndLine(),
]
)));
$node->name = null;

return new Return_(new New_($node));
}
}

0 comments on commit 3fbbe3f

Please sign in to comment.