From cd52f2011ed3bb31d12145e17ffe9ef1ffb28bd0 Mon Sep 17 00:00:00 2001 From: Corey Taylor Date: Mon, 11 Sep 2023 22:09:40 -0500 Subject: [PATCH] Add missing default for ChronosInterface::now() --- src/ChronosInterface.php | 2 +- tests/TestCase/Date/StringsTest.php | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChronosInterface.php b/src/ChronosInterface.php index 8e8b5d13..fa7a4738 100644 --- a/src/ChronosInterface.php +++ b/src/ChronosInterface.php @@ -102,7 +102,7 @@ interface ChronosInterface extends DateTimeInterface * @param \DateTimeZone|string|null $tz The DateTimeZone object or timezone name. * @return static */ - public static function now($tz): self; + public static function now($tz = null): self; /** * Get a copy of the instance diff --git a/tests/TestCase/Date/StringsTest.php b/tests/TestCase/Date/StringsTest.php index edeb338d..abc8f4c0 100644 --- a/tests/TestCase/Date/StringsTest.php +++ b/tests/TestCase/Date/StringsTest.php @@ -18,6 +18,11 @@ class StringsTest extends TestCase { + /** + * @var string + */ + protected $tz; + /** * Setup *