Skip to content

Commit

Permalink
Merge pull request #412 from cakephp/fix-now-default
Browse files Browse the repository at this point in the history
Add missing default for ChronosInterface::now()
  • Loading branch information
othercorey authored Sep 12, 2023
2 parents fcd740a + cd52f20 commit dd58390
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/ChronosInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions tests/TestCase/Date/StringsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@

class StringsTest extends TestCase
{
/**
* @var string
*/
protected $tz;

/**
* Setup
*
Expand Down

0 comments on commit dd58390

Please sign in to comment.