Skip to content

Commit

Permalink
Handle nullable date in Clock::at() - cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrooo committed Jul 12, 2023
1 parent e564f71 commit 00ab99f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Ouzo/Goodies/Utilities/Clock.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public static function now(): Clock
/** Obtains a Clock set to to a specific point. */
public static function at(?string $date): Clock
{
$date = $date ?? Strings::EMPTY;
$date ??= Strings::EMPTY;
$dateTime = new DateTime($date);
return new Clock($dateTime);
}
Expand Down

0 comments on commit 00ab99f

Please sign in to comment.