🔧
This commit is contained in:
4
vendor/symfony/uid/UuidV6.php
vendored
4
vendor/symfony/uid/UuidV6.php
vendored
@@ -24,7 +24,7 @@ class UuidV6 extends Uuid implements TimeBasedUidInterface
|
||||
|
||||
private static string $node;
|
||||
|
||||
public function __construct(string $uuid = null)
|
||||
public function __construct(?string $uuid = null)
|
||||
{
|
||||
if (null === $uuid) {
|
||||
$this->uid = static::generate();
|
||||
@@ -43,7 +43,7 @@ class UuidV6 extends Uuid implements TimeBasedUidInterface
|
||||
return substr($this->uid, 24);
|
||||
}
|
||||
|
||||
public static function generate(\DateTimeInterface $time = null, Uuid $node = null): string
|
||||
public static function generate(?\DateTimeInterface $time = null, ?Uuid $node = null): string
|
||||
{
|
||||
$uuidV1 = UuidV1::generate($time, $node);
|
||||
$uuid = substr($uuidV1, 15, 3).substr($uuidV1, 9, 4).$uuidV1[0].'-'.substr($uuidV1, 1, 4).'-6'.substr($uuidV1, 5, 3).substr($uuidV1, 18, 6);
|
||||
|
||||
Reference in New Issue
Block a user