protocolWriter = $protocolWriter; } /** * Diagnostics notification are sent from the server to the client to signal results of validation runs. * * @param string $uri * @param Diagnostic[] $diagnostics */ public function publishDiagnostics(string $uri, array $diagnostics) { $this->protocolWriter->write(new Message(new NotificationBody( 'textDocument/publishDiagnostics', (object)[ 'uri' => $uri, 'diagnostics' => $diagnostics ] ))); } }