File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
rules/PHPUnit120/Rector/MethodCall Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 44
55namespace Rector \PHPUnit \PHPUnit120 \Rector \MethodCall ;
66
7+ use PhpParser \Node \Stmt \ClassMethod ;
78use PhpParser \Node ;
89use PhpParser \Node \Arg ;
910use PhpParser \Node \Expr \MethodCall ;
@@ -67,11 +68,11 @@ public function testMe()
6768 */
6869 public function getNodeTypes (): array
6970 {
70- return [Node \ Stmt \ ClassMethod::class];
71+ return [ClassMethod::class];
7172 }
7273
7374 /**
74- * @param Node\Stmt\ ClassMethod $node
75+ * @param ClassMethod $node
7576 */
7677 public function refactor (Node $ node ): Node |null
7778 {
@@ -85,7 +86,7 @@ public function refactor(Node $node): Node|null
8586
8687 $ hasChanged = false ;
8788
88- $ this ->traverseNodesWithCallable ((array ) $ node ->stmts , function (\ PhpParser \ Node $ node ) use (&$ hasChanged ) {
89+ $ this ->traverseNodesWithCallable ((array ) $ node ->stmts , function (Node $ node ) use (&$ hasChanged ): ? MethodCall {
8990 if (! $ node instanceof MethodCall) {
9091 return null ;
9192 }
You can’t perform that action at this time.
0 commit comments