handler = $handler; } /** * Diagnostics notification are sent from the server to the client to signal results of validation runs. * * @param string $uri * @param Diagnostic[] $diagnostics * @return Promise */ public function publishDiagnostics(string $uri, array $diagnostics): Promise { return $this->handler->notify('textDocument/publishDiagnostics', [ 'uri' => $uri, 'diagnostics' => $diagnostics ]); } }