<?php
 namespace Eluceo\iCal\Domain\ValueObject; final class UniqueIdentifier { private string $uid; public function __construct(string $uid) { $this->uid = $uid; } public static function createRandom(): self { if (function_exists('random_bytes')) { return new self(bin2hex(random_bytes(16))); } return new self(uniqid()); } public function __toString(): string { return $this->uid; } } 