diff --git a/src/Generator/MockGenerator.php b/src/Generator/MockGenerator.php index ba772ca..381fb39 100644 --- a/src/Generator/MockGenerator.php +++ b/src/Generator/MockGenerator.php @@ -388,6 +388,10 @@ private function makeReflectionClass( ReflectionMethod $parentMethod, ReflectionClass $parentClass ): ReflectionClass { + if (str_contains($className, '<')) { + $className = substr($className, 0, strpos($className, '<')); + } + try { $reflection = new ReflectionClass($className); } catch (Throwable $e) {