This commit is contained in:
2025-05-12 14:25:25 +02:00
parent ab2db755ef
commit 9e378ca2b7
2719 changed files with 46505 additions and 60181 deletions

View File

@@ -34,7 +34,7 @@ abstract class AbstractSurrogateFragmentRenderer extends RoutableFragmentRendere
*
* @param FragmentRendererInterface $inlineStrategy The inline strategy to use when the surrogate is not supported
*/
public function __construct(?SurrogateInterface $surrogate, FragmentRendererInterface $inlineStrategy, UriSigner $signer = null)
public function __construct(?SurrogateInterface $surrogate, FragmentRendererInterface $inlineStrategy, ?UriSigner $signer = null)
{
$this->surrogate = $surrogate;
$this->inlineStrategy = $inlineStrategy;

View File

@@ -28,14 +28,14 @@ final class FragmentUriGenerator implements FragmentUriGeneratorInterface
private ?UriSigner $signer;
private ?RequestStack $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;
$this->requestStack = $requestStack;
}
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.');

View File

@@ -28,5 +28,5 @@ interface FragmentUriGeneratorInterface
* @param bool $strict Whether to allow non-scalar attributes or not
* @param bool $sign Whether to sign the URL or not
*/
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;
}

View File

@@ -32,7 +32,7 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer
/**
* @param string|null $globalDefaultTemplate The global default content (it can be a template name or the content)
*/
public function __construct(Environment $twig = null, UriSigner $signer = null, string $globalDefaultTemplate = null, string $charset = 'utf-8')
public function __construct(?Environment $twig = null, ?UriSigner $signer = null, ?string $globalDefaultTemplate = null, string $charset = 'utf-8')
{
$this->twig = $twig;
$this->globalDefaultTemplate = $globalDefaultTemplate;

View File

@@ -30,7 +30,7 @@ class InlineFragmentRenderer extends RoutableFragmentRenderer
private HttpKernelInterface $kernel;
private ?EventDispatcherInterface $dispatcher;
public function __construct(HttpKernelInterface $kernel, EventDispatcherInterface $dispatcher = null)
public function __construct(HttpKernelInterface $kernel, ?EventDispatcherInterface $dispatcher = null)
{
$this->kernel = $kernel;
$this->dispatcher = $dispatcher;