diff --git a/src/Handler.php b/src/Handler.php index 5f536b0..d81c1d5 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -62,10 +62,9 @@ class Handler implements RequestHandlerInterface * @param $reflectionType * @return string */ - protected function returnType($reflectionType): string + protected function returnType(ReflectionMethod $reflectionType): string { - var_dump($reflectionType->getName()); - return match ($reflectionType->getName()) { + return match ($reflectionType->getReturnType()->getName()) { 'array' => ArrayFormat::class, 'mixed', 'object' => MixedFormat::class, 'int', 'string', 'bool' => OtherFormat::class,