Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
samsonasik committed Sep 1, 2021
1 parent b954808 commit 48652f9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ public function refactor(Node $node): ?Node
return null;
}

if ($this->nodesToAddCollector->isActive()) {
return null;
}

$this->removeNode($node);

return $node;
Expand Down
2 changes: 1 addition & 1 deletion src/Rector/AbstractRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ abstract class AbstractRector extends NodeVisitorAbstract implements PhpRectorIn
*/
private $previousAppliedClass;

private NodesToAddCollector $nodesToAddCollector;
protected NodesToAddCollector $nodesToAddCollector;

private CurrentFileProvider $currentFileProvider;

Expand Down

0 comments on commit 48652f9

Please sign in to comment.