Skip to content

Commit d81aef8

Browse files
committed
fixup! fix printer by using new ClassMethod
1 parent f4c3792 commit d81aef8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

rules/Symfony73/Rector/Class_/InvokableCommandInputAttributeRector.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ public function __construct(
4949
private readonly CommandOptionsResolver $commandOptionsResolver,
5050
private readonly CommandInvokeParamsFactory $commandInvokeParamsFactory,
5151
private readonly ConsoleOptionAndArgumentMethodCallVariableReplacer $consoleOptionAndArgumentMethodCallVariableReplacer,
52-
private readonly VisibilityManipulator $visibilityManipulator,
5352
private readonly OutputInputSymfonyStyleReplacer $outputInputSymfonyStyleReplacer,
54-
private readonly CommandUnusedInputOutputRemover $commandUnusedInputOutputRemover,
5553
private readonly BetterNodeFinder $betterNodeFinder,
5654
) {
5755
}
@@ -148,6 +146,10 @@ public function refactor(Node $node): ?Class_
148146
$hasChanged = false;
149147

150148
foreach ($node->stmts as $key => $classStmt) {
149+
if (! $classStmt instanceof ClassMethod) {
150+
continue;
151+
}
152+
151153
// $executeClassMethod = $node->getMethod(CommandMethodName::EXECUTE);
152154
if (! $this->isName($classStmt, CommandMethodName::EXECUTE)) {
153155
continue;

0 commit comments

Comments
 (0)