This commit is contained in:
2025-05-12 14:25:25 +02:00
parent ab2db755ef
commit 9e378ca2b7
2719 changed files with 46505 additions and 60181 deletions

View File

@@ -26,7 +26,7 @@ class Ulid extends AbstractUid implements TimeBasedUidInterface
private static string $time = '';
private static array $rand = [];
public function __construct(string $ulid = null)
public function __construct(?string $ulid = null)
{
if (null === $ulid) {
$this->uid = static::generate();
@@ -148,7 +148,7 @@ class Ulid extends AbstractUid implements TimeBasedUidInterface
return \DateTimeImmutable::createFromFormat('U.u', substr_replace($time, '.', -3, 0));
}
public static function generate(\DateTimeInterface $time = null): string
public static function generate(?\DateTimeInterface $time = null): string
{
if (null === $mtime = $time) {
$time = microtime(false);