File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
rules/Symfony73/Rector/Class_ Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff 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 ;
You can’t perform that action at this time.
0 commit comments