Skip to content

Commit

Permalink
Fix LSP api discrepancies
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Apr 27, 2022
1 parent fe0470a commit 9c153de
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
1 change: 1 addition & 0 deletions src/Psalm/Internal/LanguageServer/LanguageServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,7 @@ function (IssueData $issue_data): Diagnostic {
} else {
// the Diagnostic constructor only takes `int` for the code, but the property can be
// `int` or `string`, so we set the property directly because we want to use a `string`
/** @psalm-suppress InvalidPropertyAssignmentValue */
$diagnostic->code = $code;
}

Expand Down
12 changes: 0 additions & 12 deletions src/Psalm/Internal/LanguageServer/Server/TextDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -378,18 +378,6 @@ public function codeAction(TextDocumentIdentifier $textDocument, Range $range):
$indentation = $matches[1] ?? '';
}


/**
* Suppress Psalm because ther are bugs in how
* LanguageServer's signature of WorkspaceEdit is declared:
*
* See:
* https://github.com/felixfbecker/php-language-server-protocol
* See:
* https://microsoft.github.io/language-server-protocol/specifications/specification-3-17/#workspaceEdit
*
* @psalm-suppress InvalidArgument
*/
$edit = new WorkspaceEdit([
$textDocument->uri => [
new TextEdit(
Expand Down

0 comments on commit 9c153de

Please sign in to comment.