diff --git a/src/Client/TextDocument.php b/src/Client/TextDocument.php index d96f7c1..a7759c8 100644 --- a/src/Client/TextDocument.php +++ b/src/Client/TextDocument.php @@ -4,7 +4,7 @@ declare(strict_types = 1); namespace LanguageServer\Client; use LanguageServer\ClientHandler; -use LanguageServer\Protocol\Message; +use LanguageServer\Protocol\{Message, Content}; use Sabre\Event\Promise; use JsonMapper; @@ -49,7 +49,7 @@ class TextDocument * to request the current content of a text document identified by the URI * * @param TextDocumentIdentifier $textDocument The document to get the content for - * @return Promise The document's current content + * @return Promise The document's current content */ public function xcontent(TextDocumentIdentifier $textDocument): Promise { @@ -57,7 +57,7 @@ class TextDocument 'textDocument/xcontent', ['textDocument' => $textDocument] )->then(function ($result) { - return $this->mapper->map($result, new TextDocumentContentResult); + return $this->mapper->map($result, new Content); }); } } diff --git a/src/Protocol/TextDocumentContentResult.php b/src/Protocol/Content.php similarity index 82% rename from src/Protocol/TextDocumentContentResult.php rename to src/Protocol/Content.php index 10b98ad..6f95a8a 100644 --- a/src/Protocol/TextDocumentContentResult.php +++ b/src/Protocol/Content.php @@ -2,7 +2,7 @@ namespace LanguageServer\Protocol; -class TextDocumentContentResult +class Content { /** * The content of the text document