Skip to content

Commit 08e6144

Browse files
authored
Fix pull deprecated pull constant from NodeTraverser (#311)
1 parent b737d10 commit 08e6144

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Rector/Rector/MethodCall/RemoveMethodCallRector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use PhpParser\Node;
77
use PhpParser\Node\Expr\MethodCall;
88
use PhpParser\Node\Stmt\Expression;
9-
use PhpParser\NodeTraverser;
9+
use PhpParser\NodeVisitor;
1010
use Rector\Contract\Rector\ConfigurableRectorInterface;
1111
use Rector\Rector\AbstractRector;
1212
use Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample;
@@ -71,7 +71,7 @@ public function refactor(Node $node): ?int
7171
continue;
7272
}
7373

74-
return NodeTraverser::REMOVE_NODE;
74+
return NodeVisitor::REMOVE_NODE;
7575
}
7676

7777
return null;

src/Rector/Rector/Namespace_/AppUsesStaticCallToUseStatementRector.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
use PhpParser\Node\Stmt\Namespace_;
1313
use PhpParser\Node\Stmt\Use_;
1414
use PhpParser\Node\UseItem;
15-
use PhpParser\NodeTraverser;
15+
use PhpParser\NodeVisitor;
1616
use PHPStan\Type\ObjectType;
1717
use Rector\Contract\PhpParser\Node\StmtsAwareInterface;
1818
use Rector\NodeTypeResolver\Node\AttributeKey;
@@ -111,7 +111,7 @@ private function removeCallLikeStmts(StmtsAwareInterface $node, array $stmts, ar
111111
function (Node $subNode) use ($node, $appUsesStaticCalls, &$currentStmt) {
112112
// only lookup each of current stmts, avoid too deep traversal
113113
if ($subNode instanceof StmtsAwareInterface) {
114-
return NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN;
114+
return NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN;
115115
}
116116

117117
if ($subNode instanceof Stmt) {

0 commit comments

Comments
 (0)