From 4252843f73c92517d64db2672e0cee2c21f4bfe6 Mon Sep 17 00:00:00 2001 From: Josh Dariano Date: Tue, 26 Nov 2024 11:10:04 -0500 Subject: [PATCH] explicit nulls --- src/Recorders/DumpRecorder/HtmlDumper.php | 2 +- src/Recorders/DumpRecorder/MultiDumpHandler.php | 2 +- tests/TestClasses/FakeTime.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Recorders/DumpRecorder/HtmlDumper.php b/src/Recorders/DumpRecorder/HtmlDumper.php index ebf18396..4f7667e6 100644 --- a/src/Recorders/DumpRecorder/HtmlDumper.php +++ b/src/Recorders/DumpRecorder/HtmlDumper.php @@ -8,7 +8,7 @@ class HtmlDumper extends BaseHtmlDumper { - public function __construct($output = null, string $charset = null, int $flags = 0) + public function __construct($output = null, ?string $charset = null, int $flags = 0) { parent::__construct($output, $charset, $flags); diff --git a/src/Recorders/DumpRecorder/MultiDumpHandler.php b/src/Recorders/DumpRecorder/MultiDumpHandler.php index 9bf72f07..c6ddccd6 100644 --- a/src/Recorders/DumpRecorder/MultiDumpHandler.php +++ b/src/Recorders/DumpRecorder/MultiDumpHandler.php @@ -16,7 +16,7 @@ public function dump(mixed $value): void } } - public function addHandler(callable $callable = null): self + public function addHandler(?callable $callable = null): self { $this->handlers[] = $callable; diff --git a/tests/TestClasses/FakeTime.php b/tests/TestClasses/FakeTime.php index 0569a5fb..30eba3c7 100644 --- a/tests/TestClasses/FakeTime.php +++ b/tests/TestClasses/FakeTime.php @@ -9,7 +9,7 @@ class FakeTime implements Time { protected DateTimeImmutable $dateTime; - public function __construct(string $dateTime = null, $format = 'Y-m-d H:i:s') + public function __construct(?string $dateTime = null, $format = 'Y-m-d H:i:s') { if (! is_null($dateTime)) { $this->setCurrentTime($dateTime, $format);