Skip to content

Commit

Permalink
Remove unused method addNodesBeforeNode() (#4024)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomasVotruba committed May 30, 2023
1 parent e2213f2 commit d413dc1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 16 deletions.
16 changes: 1 addition & 15 deletions packages/PostRector/Collector/NodesToAddCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public function isActive(): bool
}

/**
* @api
* @deprecated
* @internal Return created nodes right in refactor() method to keep context instead.
*/
Expand Down Expand Up @@ -77,21 +78,6 @@ public function clearNodesToAddBefore(Node $node): void
unset($this->nodesToAddBefore[$objectHash]);
}

/**
* @deprecated
* @api downgrade
* @deprecated Return created nodes right in refactor() method to keep context instead.
* @param Node[] $newNodes
*/
public function addNodesBeforeNode(array $newNodes, Node $positionNode): void
{
foreach ($newNodes as $newNode) {
$this->addNodeBeforeNode($newNode, $positionNode);
}

$this->rectorChangeCollector->notifyNodeFileInfo($positionNode);
}

private function resolveNearestStmtPosition(Node $node): string
{
if ($node instanceof Stmt) {
Expand Down
2 changes: 1 addition & 1 deletion src/Kernel/RectorKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ final class RectorKernel
/**
* @var string
*/
private const CACHE_KEY = 'v41';
private const CACHE_KEY = 'v42';

private ContainerInterface|null $container = null;

Expand Down

0 comments on commit d413dc1

Please sign in to comment.