$errors */ public function __construct( public string $id, public string $type, public ?ParamsSchema $parameters, public ?SchemaInterface $input, public ?string $inputEncoding, public ?SchemaInterface $output, public ?string $outputEncoding, public array $errors = [], ) {} /** * Returns the HTTP method required by the XRPC operation. */ public function httpMethod(): string { return $this->type === 'query' ? 'GET' : 'POST'; } /** * Returns whether the method declares the named XRPC error. */ public function declaresError(string $name): bool { return \in_array($name, $this->errors, TRUE); } }