updated-packages
This commit is contained in:
@@ -25,7 +25,7 @@ final class VariadicValueResolver implements ArgumentValueResolverInterface
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function supports(Request $request, ArgumentMetadata $argument)
|
||||
public function supports(Request $request, ArgumentMetadata $argument): bool
|
||||
{
|
||||
return $argument->isVariadic() && $request->attributes->has($argument->getName());
|
||||
}
|
||||
@@ -33,7 +33,7 @@ final class VariadicValueResolver implements ArgumentValueResolverInterface
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function resolve(Request $request, ArgumentMetadata $argument)
|
||||
public function resolve(Request $request, ArgumentMetadata $argument): iterable
|
||||
{
|
||||
$values = $request->attributes->get($argument->getName());
|
||||
|
||||
@@ -41,8 +41,6 @@ final class VariadicValueResolver implements ArgumentValueResolverInterface
|
||||
throw new \InvalidArgumentException(sprintf('The action argument "...$%1$s" is required to be an array, the request attribute "%1$s" contains a type of "%2$s" instead.', $argument->getName(), \gettype($values)));
|
||||
}
|
||||
|
||||
foreach ($values as $value) {
|
||||
yield $value;
|
||||
}
|
||||
yield from $values;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user