Issue #3259028 by longwave: [Symfony 6] Add return types to Symfony\Component\HttpKernel\Controller\ArgumentValueResolverInterface implementations
parent
9597a77db3
commit
375f5f2d8c
|
@ -33,14 +33,14 @@ final class Psr7RequestValueResolver implements ArgumentValueResolverInterface {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function supports(Request $request, ArgumentMetadata $argument) {
|
||||
public function supports(Request $request, ArgumentMetadata $argument): bool {
|
||||
return $argument->getType() == ServerRequestInterface::class;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function resolve(Request $request, ArgumentMetadata $argument) {
|
||||
public function resolve(Request $request, ArgumentMetadata $argument): iterable {
|
||||
yield $this->httpMessageFactory->createRequest($request);
|
||||
}
|
||||
|
||||
|
|
|
@ -16,14 +16,14 @@ final class RouteMatchValueResolver implements ArgumentValueResolverInterface {
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function supports(Request $request, ArgumentMetadata $argument) {
|
||||
public function supports(Request $request, ArgumentMetadata $argument): bool {
|
||||
return $argument->getType() == RouteMatchInterface::class || is_subclass_of($argument->getType(), RouteMatchInterface::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function resolve(Request $request, ArgumentMetadata $argument) {
|
||||
public function resolve(Request $request, ArgumentMetadata $argument): iterable {
|
||||
yield RouteMatch::createFromRequest($request);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue