Skip to content

Commit 8541e22

Browse files
committed
Fix deprecations
1 parent 7c9c681 commit 8541e22

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

src/Dependency/ExportedNodeVisitor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace PHPStan\Dependency;
44

55
use PhpParser\Node;
6-
use PhpParser\NodeTraverser;
6+
use PhpParser\NodeVisitor;
77
use PhpParser\NodeVisitorAbstract;
88
use PHPStan\ShouldNotHappenException;
99

@@ -52,7 +52,7 @@ public function enterNode(Node $node): ?int
5252
|| $node instanceof Node\Stmt\Function_
5353
|| $node instanceof Node\Stmt\Trait_
5454
) {
55-
return NodeTraverser::DONT_TRAVERSE_CHILDREN;
55+
return NodeVisitor::DONT_TRAVERSE_CHILDREN;
5656
}
5757

5858
return null;

src/Reflection/BetterReflection/SourceLocator/CachingVisitor.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use PhpParser\Node;
66
use PhpParser\Node\Stmt\Namespace_;
7-
use PhpParser\NodeTraverser;
7+
use PhpParser\NodeVisitor;
88
use PhpParser\NodeVisitorAbstract;
99
use PHPStan\BetterReflection\Reflection\Exception\InvalidConstantNode;
1010
use PHPStan\BetterReflection\SourceLocator\Located\LocatedSource;
@@ -51,7 +51,7 @@ public function enterNode(Node $node): ?int
5151
);
5252
}
5353

54-
return NodeTraverser::DONT_TRAVERSE_CHILDREN;
54+
return NodeVisitor::DONT_TRAVERSE_CHILDREN;
5555
}
5656

5757
if ($node instanceof Node\Stmt\Function_) {
@@ -64,7 +64,7 @@ public function enterNode(Node $node): ?int
6464
);
6565
}
6666

67-
return NodeTraverser::DONT_TRAVERSE_CHILDREN;
67+
return NodeVisitor::DONT_TRAVERSE_CHILDREN;
6868
}
6969

7070
if ($node instanceof Node\Stmt\Const_) {
@@ -80,7 +80,7 @@ public function enterNode(Node $node): ?int
8080
);
8181
}
8282

83-
return NodeTraverser::DONT_TRAVERSE_CHILDREN;
83+
return NodeVisitor::DONT_TRAVERSE_CHILDREN;
8484
}
8585

8686
if ($node instanceof Node\Expr\FuncCall) {
@@ -101,7 +101,7 @@ public function enterNode(Node $node): ?int
101101
);
102102
$this->constantNodes[ConstantNameHelper::normalize($constantName)][] = $constantNode;
103103

104-
return NodeTraverser::DONT_TRAVERSE_CHILDREN;
104+
return NodeVisitor::DONT_TRAVERSE_CHILDREN;
105105
}
106106

107107
return null;

src/Rules/Whitespace/FileWhitespaceRule.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
use Nette\Utils\Strings;
66
use PhpParser\Node;
77
use PhpParser\NodeTraverser;
8+
use PhpParser\NodeVisitor;
89
use PhpParser\NodeVisitorAbstract;
910
use PHPStan\Analyser\Scope;
1011
use PHPStan\Node\FileNode;
@@ -61,7 +62,7 @@ public function enterNode(Node $node)
6162
}
6263
return null;
6364
}
64-
return NodeTraverser::DONT_TRAVERSE_CURRENT_AND_CHILDREN;
65+
return NodeVisitor::DONT_TRAVERSE_CURRENT_AND_CHILDREN;
6566
}
6667

6768
/**

0 commit comments

Comments
 (0)