$raw */ public function __construct( public string $id, public string $type, public string $serviceEndpoint, public array $raw = [], ) {} /** * Parses a service endpoint from DID document data. * * @param array $service */ public static function fromArray(array $service): ?self { if (!\is_string($service['id'] ?? NULL) || !\is_string($service['type'] ?? NULL)) { return NULL; } if (!\is_string($service['serviceEndpoint'] ?? NULL)) { return NULL; } return new self($service['id'], $service['type'], $service['serviceEndpoint'], $service); } }