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 Jan 19, 2025
1 parent 776609d commit 7227ac0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions rules/Removing/Rector/Class_/RemoveInterfacesRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,16 +75,16 @@ public function configure(array $configuration): void
$this->interfacesToRemove = $configuration;
}

private function refactorClass(Class_ $node): ?Class_
private function refactorClass(Class_ $class): ?Class_
{
if ($node->implements === []) {
if ($class->implements === []) {
return null;
}

$isInterfacesRemoved = false;
foreach ($node->implements as $key => $implement) {
foreach ($class->implements as $key => $implement) {
if ($this->isNames($implement, $this->interfacesToRemove)) {
unset($node->implements[$key]);
unset($class->implements[$key]);
$isInterfacesRemoved = true;
}
}
Expand All @@ -93,7 +93,7 @@ private function refactorClass(Class_ $node): ?Class_
return null;
}

return $node;
return $class;
}

private function refactorInterface(Interface_ $interface): Interface_|null
Expand Down

0 comments on commit 7227ac0

Please sign in to comment.