Aggiornato Composer
This commit is contained in:
@@ -28,7 +28,7 @@ final class FragmentUriGenerator implements FragmentUriGeneratorInterface
|
||||
private $signer;
|
||||
private $requestStack;
|
||||
|
||||
public function __construct(string $fragmentPath, UriSigner $signer = null, RequestStack $requestStack = null)
|
||||
public function __construct(string $fragmentPath, ?UriSigner $signer = null, ?RequestStack $requestStack = null)
|
||||
{
|
||||
$this->fragmentPath = $fragmentPath;
|
||||
$this->signer = $signer;
|
||||
@@ -38,7 +38,7 @@ final class FragmentUriGenerator implements FragmentUriGeneratorInterface
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
public function generate(ControllerReference $controller, Request $request = null, bool $absolute = false, bool $strict = true, bool $sign = true): string
|
||||
public function generate(ControllerReference $controller, ?Request $request = null, bool $absolute = false, bool $strict = true, bool $sign = true): string
|
||||
{
|
||||
if (null === $request && (null === $this->requestStack || null === $request = $this->requestStack->getCurrentRequest())) {
|
||||
throw new \LogicException('Generating a fragment URL can only be done when handling a Request.');
|
||||
@@ -85,7 +85,7 @@ final class FragmentUriGenerator implements FragmentUriGeneratorInterface
|
||||
foreach ($values as $key => $value) {
|
||||
if (\is_array($value)) {
|
||||
$this->checkNonScalar($value);
|
||||
} elseif (!is_scalar($value) && null !== $value) {
|
||||
} elseif (!\is_scalar($value) && null !== $value) {
|
||||
throw new \LogicException(sprintf('Controller attributes cannot contain non-scalar/non-null values (value for key "%s" is not a scalar or null).', $key));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user