Skip to content

Commit

Permalink
[ci-review] Rector Rectify
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 5, 2021
1 parent daa6bff commit 7f3fdc0
Showing 1 changed file with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,21 @@
use PhpParser\Node;
use PhpParser\Node\Name\FullyQualified;
use PhpParser\Node\Stmt\Interface_;
use PHPStan\Reflection\ReflectionProvider;
use Rector\Core\Rector\AbstractRector;
use Rector\FamilyTree\Reflection\FamilyRelationsAnalyzer;
use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample;
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
use PHPStan\Reflection\ReflectionProvider;
use Rector\FamilyTree\Reflection\FamilyRelationsAnalyzer;

/**
* @see \Rector\Tests\DowngradePhp74\Rector\Interface_\DowngradePreviouslyImplementedInterfaceRector\DowngradePreviouslyImplementedInterfaceRectorTest
*/
final class DowngradePreviouslyImplementedInterfaceRector extends AbstractRector
{
public function __construct(private ReflectionProvider $reflectionProvider, private FamilyRelationsAnalyzer $familyRelationsAnalyzer)
{
public function __construct(
private ReflectionProvider $reflectionProvider,
private FamilyRelationsAnalyzer $familyRelationsAnalyzer
) {
}

public function getRuleDefinition(): RuleDefinition
Expand Down Expand Up @@ -81,7 +83,10 @@ public function refactor(Node $node): ?Node
unset($extends[$key]);
}

$collectInterfaces = array_merge($collectInterfaces, $this->familyRelationsAnalyzer->getClassLikeAncestorNames($extend));
$collectInterfaces = array_merge(
$collectInterfaces,
$this->familyRelationsAnalyzer->getClassLikeAncestorNames($extend)
);
}

return $node;
Expand Down

0 comments on commit 7f3fdc0

Please sign in to comment.