Skip to content

Commit

Permalink
Update MockGenerator, update method makeReflectionClass, fix with get…
Browse files Browse the repository at this point in the history
…ting classname from method annotation
  • Loading branch information
Artem Onyshchenko committed Apr 25, 2022
1 parent 7a58fc4 commit 6c24597
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Generator/MockGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 6c24597

Please sign in to comment.