true, default => false, }; } /** * Retrieves an array of required headers. * * @return array An array containing only the headers that are marked as required. */ public static function getRequiredHeaders(): array { /** @var StandardHeaders $header */ return array_filter(StandardHeaders::toArray(), fn($header) => $header->isRequired()); } /** * @return array */ public static function toArray(): array { $results = []; foreach(StandardHeaders::values() as $header) { $results[$header->getValue()] = $header; } return $results; } }