Skip to content

Commit

Permalink
[Symfony 6.1] Skip abstract class on CommandConfigureToAttributeRect…
Browse files Browse the repository at this point in the history
…or (#662)

* [Symfony 6.1] Skip abstract class on CommandConfigureToAttributeRector

* [Symfony 6.1] Skip abstract class on CommandConfigureToAttributeRector

* [Symfony 6.1] Skip abstract class on CommandConfigureToAttributeRector
  • Loading branch information
samsonasik authored Aug 20, 2024
1 parent 0eca1e4 commit d7cc42e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace Rector\Symfony\Tests\Symfony61\Rector\Class_\CommandConfigureToAttributeRector\Fixture;

use Symfony\Component\Console\Command\Command;

abstract class SkipAbstractClass extends Command
{
public function configure()
{
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ public function getNodeTypes(): array
*/
public function refactor(Node $node): ?Node
{
if ($node->isAbstract()) {
return null;
}

if (! $this->reflectionProvider->hasClass(SymfonyAnnotation::AS_COMMAND)) {
return null;
}
Expand Down

0 comments on commit d7cc42e

Please sign in to comment.