Skip to content

Commit 0898e6a

Browse files
committed
[rector] Rector fixes
1 parent 07eeaac commit 0898e6a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

rules/PHPUnit120/Rector/MethodCall/ExplicitMockExpectsCallRector.php

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

55
namespace Rector\PHPUnit\PHPUnit120\Rector\MethodCall;
66

7+
use PhpParser\Node\Stmt\ClassMethod;
78
use PhpParser\Node;
89
use PhpParser\Node\Arg;
910
use 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
}

0 commit comments

Comments
 (0)