From 4062c1338e7f8dccc2f0ac37ce4487664123dcc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Pysiak?= Date: Tue, 3 Dec 2024 20:15:49 +0100 Subject: [PATCH] Fix nullable parameters --- .../Renderer/Exception/NoSupportedRendererException.php | 2 +- src/TwigHooks/src/Profiler/HooksDataCollector.php | 2 +- src/TwigHooks/src/Twig/Node/HookNode.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/TwigHooks/src/Hookable/Renderer/Exception/NoSupportedRendererException.php b/src/TwigHooks/src/Hookable/Renderer/Exception/NoSupportedRendererException.php index 46ca1bf1..7709237d 100644 --- a/src/TwigHooks/src/Hookable/Renderer/Exception/NoSupportedRendererException.php +++ b/src/TwigHooks/src/Hookable/Renderer/Exception/NoSupportedRendererException.php @@ -20,7 +20,7 @@ public function __construct( string $hookableName, string $message = 'No supported renderer found for the hook "%s" and "%s" hookable.', int $code = 0, - \Throwable $previous = null, + ?\Throwable $previous = null, ) { parent::__construct( sprintf( diff --git a/src/TwigHooks/src/Profiler/HooksDataCollector.php b/src/TwigHooks/src/Profiler/HooksDataCollector.php index ca650b21..a9121950 100644 --- a/src/TwigHooks/src/Profiler/HooksDataCollector.php +++ b/src/TwigHooks/src/Profiler/HooksDataCollector.php @@ -28,7 +28,7 @@ public function __construct( ) { } - public function collect(Request $request, Response $response, \Throwable $exception = null): void + public function collect(Request $request, Response $response, ?\Throwable $exception = null): void { } diff --git a/src/TwigHooks/src/Twig/Node/HookNode.php b/src/TwigHooks/src/Twig/Node/HookNode.php index 9e0a55df..9f8b50ff 100644 --- a/src/TwigHooks/src/Twig/Node/HookNode.php +++ b/src/TwigHooks/src/Twig/Node/HookNode.php @@ -25,7 +25,7 @@ public function __construct( ?Node $context, bool $only, int $lineno, - string $tag = null, + ?string $tag = null, ) { parent::__construct( [