Skip to content

Commit cdd85e6

Browse files
committed
fix
1 parent 4ca3f87 commit cdd85e6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

rules/CodeQuality/Rector/ClassMethod/CreateMockToAnonymousClassRector.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@ private function createAnonymousClass(Arg $firstArg): Class_
200200
throw new NotImplementedYetException();
201201
}
202202

203+
if (!$className instanceof Node\Name) {
204+
throw new NotImplementedYetException();
205+
}
206+
203207
// must respect PHPStan anonymous internal naming \Rector\NodeTypeResolver\PHPStan\Scope\PHPStanNodeScopeResolver::ANONYMOUS_CLASS_START_REGEX
204208
return new Class_('AnonymousClass1234', [
205209
'extends' => $className,

0 commit comments

Comments
 (0)