44
55namespace Rector \DowngradePhp80 \Rector \Expression ;
66
7+ use PhpParser \NodeVisitor ;
78use PhpParser \Node ;
89use PhpParser \Node \Arg ;
910use PhpParser \Node \ArrayItem ;
2526use PhpParser \Node \Stmt \Expression ;
2627use PhpParser \Node \Stmt \Return_ ;
2728use PhpParser \Node \Stmt \Switch_ ;
28- use PhpParser \NodeTraverser ;
2929use PHPStan \Analyser \Scope ;
3030use Rector \NodeTypeResolver \Node \AttributeKey ;
3131use Rector \Php72 \NodeFactory \AnonymousFunctionFactory ;
@@ -120,7 +120,7 @@ function (Node $subNode) use ($node, &$match, &$hasChanged, $scope) {
120120 $ subNode ->value = new FuncCall ($ this ->anonymousFunctionFactory ->create ([], [$ switch ], null ));
121121
122122 $ hasChanged = true ;
123- return NodeTraverser ::DONT_TRAVERSE_CURRENT_AND_CHILDREN ;
123+ return NodeVisitor ::DONT_TRAVERSE_CURRENT_AND_CHILDREN ;
124124 }
125125
126126 if ($ subNode instanceof Arg && $ subNode ->value instanceof ArrowFunction && $ subNode ->value ->expr instanceof Match_) {
@@ -129,7 +129,7 @@ function (Node $subNode) use ($node, &$match, &$hasChanged, $scope) {
129129 $ hasChanged = true ;
130130 }
131131
132- return NodeTraverser ::DONT_TRAVERSE_CURRENT_AND_CHILDREN ;
132+ return NodeVisitor ::DONT_TRAVERSE_CURRENT_AND_CHILDREN ;
133133 }
134134
135135 if ($ subNode instanceof Assign && $ subNode ->expr instanceof ArrowFunction && $ subNode ->expr ->expr instanceof Match_) {
@@ -138,7 +138,7 @@ function (Node $subNode) use ($node, &$match, &$hasChanged, $scope) {
138138 $ hasChanged = true ;
139139 }
140140
141- return NodeTraverser ::DONT_TRAVERSE_CURRENT_AND_CHILDREN ;
141+ return NodeVisitor ::DONT_TRAVERSE_CURRENT_AND_CHILDREN ;
142142 }
143143
144144 if ($ subNode instanceof Expression && $ subNode ->expr instanceof ArrowFunction && $ subNode ->expr ->expr instanceof Match_) {
@@ -147,7 +147,7 @@ function (Node $subNode) use ($node, &$match, &$hasChanged, $scope) {
147147 $ hasChanged = true ;
148148 }
149149
150- return NodeTraverser ::DONT_TRAVERSE_CURRENT_AND_CHILDREN ;
150+ return NodeVisitor ::DONT_TRAVERSE_CURRENT_AND_CHILDREN ;
151151 }
152152
153153 if ($ subNode instanceof Return_ && $ subNode ->expr instanceof ArrowFunction && $ subNode ->expr ->expr instanceof Match_) {
@@ -156,7 +156,7 @@ function (Node $subNode) use ($node, &$match, &$hasChanged, $scope) {
156156 $ hasChanged = true ;
157157 }
158158
159- return NodeTraverser ::DONT_TRAVERSE_CURRENT_AND_CHILDREN ;
159+ return NodeVisitor ::DONT_TRAVERSE_CURRENT_AND_CHILDREN ;
160160 }
161161
162162 if ($ subNode instanceof FuncCall && $ subNode ->name instanceof ArrowFunction && $ subNode ->name ->expr instanceof Match_) {
@@ -165,12 +165,12 @@ function (Node $subNode) use ($node, &$match, &$hasChanged, $scope) {
165165 $ hasChanged = true ;
166166 }
167167
168- return NodeTraverser ::DONT_TRAVERSE_CURRENT_AND_CHILDREN ;
168+ return NodeVisitor ::DONT_TRAVERSE_CURRENT_AND_CHILDREN ;
169169 }
170170
171171 if ($ subNode instanceof Match_) {
172172 $ match = $ subNode ;
173- return NodeTraverser ::STOP_TRAVERSAL ;
173+ return NodeVisitor ::STOP_TRAVERSAL ;
174174 }
175175 }
176176 );
0 commit comments