From 6c245975ec9ae1bf7dc47b7cbce30af4d1321305 Mon Sep 17 00:00:00 2001 From: Artem Onyshchenko Date: Mon, 25 Apr 2022 17:36:31 +0300 Subject: [PATCH] Update MockGenerator, update method makeReflectionClass, fix with getting classname from method annotation --- src/Generator/MockGenerator.php | 4 ++++ 1 file changed, 4 insertions(+) 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) {