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 UuidFactory
private ?Uuid $timeBasedNode;
private ?Uuid $nameBasedNamespace;
public function __construct(string|int $defaultClass = UuidV6::class, string|int $timeBasedClass = UuidV6::class, string|int $nameBasedClass = UuidV5::class, string|int $randomBasedClass = UuidV4::class, Uuid|string $timeBasedNode = null, Uuid|string $nameBasedNamespace = null)
public function __construct(string|int $defaultClass = UuidV6::class, string|int $timeBasedClass = UuidV6::class, string|int $nameBasedClass = UuidV5::class, string|int $randomBasedClass = UuidV4::class, Uuid|string|null $timeBasedNode = null, Uuid|string|null $nameBasedNamespace = null)
{
if (null !== $timeBasedNode && !$timeBasedNode instanceof Uuid) {
$timeBasedNode = Uuid::fromString($timeBasedNode);
@@ -56,7 +56,7 @@ class UuidFactory
return new RandomBasedUuidFactory($this->randomBasedClass);
}
public function timeBased(Uuid|string $node = null): TimeBasedUuidFactory
public function timeBased(Uuid|string|null $node = null): TimeBasedUuidFactory
{
$node ??= $this->timeBasedNode;
@@ -67,7 +67,7 @@ class UuidFactory
return new TimeBasedUuidFactory($this->timeBasedClass, $node);
}
public function nameBased(Uuid|string $namespace = null): NameBasedUuidFactory
public function nameBased(Uuid|string|null $namespace = null): NameBasedUuidFactory
{
$namespace ??= $this->nameBasedNamespace;