"` (only if the stored version is this one) or `If-None-Match: *` * (only if the key isn't set yet). * * @return array */ public static function conditions(?int $ifVersion, bool $createOnly = false): array { if ($ifVersion !== null && $createOnly) { throw new InvalidArgumentException('A write is either conditional on a version or create-only, not both.'); } return match (true) { $ifVersion !== null => ['If-Match' => sprintf('"%d"', $ifVersion)], $createOnly => ['If-None-Match' => '*'], default => [], }; } private function __construct() { } }