Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions packages/Symfony/src/Rector/Class_/MakeCommandLazyRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,26 +136,6 @@ private function resolveCommandNameAndRemove(Class_ $class): ?Node
}
}

if ($node instanceof ClassMethod && $this->isName($node, '__construct')) {
if (count((array) $node->stmts) !== 1) {
return null;
}

$onlyNode = $node->stmts[0];
if ($onlyNode instanceof Expression) {
$onlyNode = $onlyNode->expr;

$commandName = $this->matchCommandNameNodeInConstruct($onlyNode);
if ($commandName === null) {
return null;
}

if (count($node->params) === 0) {
$this->removeNode($node);
}
}
}

if ($node instanceof StaticCall) {
if (! $this->isType($node, self::COMMAND_CLASS)) {
return null;
Expand Down