Skip to content

Commit

Permalink
[TypeDeclaratio] Skip abstract method in AddVoidReturnTypeWhereNoRetu…
Browse files Browse the repository at this point in the history
…rnRector (#6173)
  • Loading branch information
TomasVotruba authored Apr 20, 2021
1 parent cd3725a commit d723aca
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php

abstract class SkipAbstractMethod
{
public abstract function getValues();
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@

return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services();

$services->set(AddVoidReturnTypeWhereNoReturnRector::class);
};
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function refactor(Node $node): ?Node
return null;
}

if ($node instanceof ClassMethod && $node->isMagic()) {
if ($node instanceof ClassMethod && ($node->isMagic() || $node->isAbstract())) {
return null;
}

Expand Down

0 comments on commit d723aca

Please sign in to comment.