Skip to content

Commit

Permalink
Merge c5ad0db into 25b681e
Browse files Browse the repository at this point in the history
  • Loading branch information
espritf committed Dec 1, 2020
2 parents 25b681e + c5ad0db commit 9b2732e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Mappers/RequestParameterMiddleware.php
Expand Up @@ -18,7 +18,8 @@ class RequestParameterMiddleware implements ParameterMiddlewareInterface

public function mapParameter(ReflectionParameter $parameter, DocBlock $docBlock, ?Type $paramTagType, ParameterAnnotations $parameterAnnotations, ParameterHandlerInterface $next): ParameterInterface
{
if ($parameter->getType()->getName() === Request::class) {
$parameterType = $parameter->getType();
if ($parameterType && $parameterType->getName() === Request::class) {
return new RequestParameter();
}
return $next->mapParameter($parameter, $docBlock, $paramTagType, $parameterAnnotations);
Expand Down

0 comments on commit 9b2732e

Please sign in to comment.