From 87075c604201f3eefd86ee4d41007670cf4227db Mon Sep 17 00:00:00 2001 From: Jonathan Date: Tue, 12 Nov 2024 11:08:24 +0100 Subject: [PATCH] cs-fixer --- src/DateTime.php | 2 +- src/Now.php | 4 ++-- src/TestPattern.php | 6 ++++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/DateTime.php b/src/DateTime.php index bf0f94a..c35d449 100644 --- a/src/DateTime.php +++ b/src/DateTime.php @@ -24,7 +24,7 @@ private function compile(string $date, string $format, string $timezone = 'null' PHP; } - private function evaluate(array $context, string $date, string $format, string $timezone = null) + private function evaluate(array $context, string $date, string $format, ?string $timezone = null) { return \DateTimeImmutable::createFromFormat($format, $date, null !== $timezone ? new \DateTimeZone($timezone) : null); } diff --git a/src/Now.php b/src/Now.php index a4d4b15..02951f3 100644 --- a/src/Now.php +++ b/src/Now.php @@ -17,14 +17,14 @@ public function __construct($name) ); } - private function compile(string $timezone = null): string + private function compile(?string $timezone = null): string { return <<