notBlank( 'id "%s" is blank, but was expected to contain a value.' ); $this->id = $id; parent::__construct( $name ); } public static function hydrate( array $data ): self { Assert::that( $data, 'PublicKeyCredentialRpEntity hydration does not contain "%s".' ) ->keyExists( 'id' ) ->keyExists( 'name' ); return new self( $data['id'], $data['name'] ); } public function get_id(): string { return $this->id; } public function jsonSerialize(): array { return get_object_vars( $this ); } }