Skip to content

Commit

Permalink
Add missing default for ChronosInterface::now()
Browse files Browse the repository at this point in the history
  • Loading branch information
othercorey committed Sep 12, 2023
1 parent fcd740a commit cd52f20
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 cd52f20

Please sign in to comment.