Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions src/PhpParser/NodeTraverser/RectorNodeTraverser.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@
use PhpParser\Node;
use PhpParser\Node\Expr;
use PhpParser\Node\Stmt;
use PhpParser\NodeTraverserInterface;
use PhpParser\NodeVisitor;
use Rector\Configuration\ConfigurationRuleFilter;
use Rector\Contract\Rector\RectorInterface;
use Rector\Exception\ShouldNotHappenException;
use Rector\Rector\RectorRunner;
use Rector\VersionBonding\ComposerPackageConstraintFilter;
use Rector\VersionBonding\PhpVersionedFilter;
Expand All @@ -29,7 +27,7 @@
* @see \Rector\Tests\PhpParser\NodeTraverser\RectorNodeTraverserTest
* @internal No BC promise on this class, it might change any time.
*/
final class RectorNodeTraverser implements NodeTraverserInterface
final class RectorNodeTraverser
{
/**
* @var RectorInterface[]
Expand Down Expand Up @@ -57,16 +55,6 @@ public function __construct(
) {
}

public function addVisitor(NodeVisitor $visitor): void
{
throw new ShouldNotHappenException('The immutable node traverser does not support adding visitors.');
}

public function removeVisitor(NodeVisitor $visitor): void
{
throw new ShouldNotHappenException('The immutable node traverser does not support removing visitors.');
}

/**
* @param Node[] $nodes
* @return Node[]
Expand Down
Loading