mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
Closures that use $this
should not be static
This commit is contained in:
parent
70f2fb7d1b
commit
bfce3a41e4
@ -58,7 +58,7 @@ class TextDocument
|
||||
/**
|
||||
* @return Generator<int, Promise<object>, object, TextDocumentItem>
|
||||
*/
|
||||
static function () use ($textDocument) {
|
||||
function () use ($textDocument) {
|
||||
/** @var Promise<object> */
|
||||
$promise = $this->handler->request(
|
||||
'textDocument/xcontent',
|
||||
|
@ -48,7 +48,7 @@ class ClientHandler
|
||||
/**
|
||||
* @return Generator<int, Promise, mixed, Promise<mixed>>
|
||||
*/
|
||||
static function () use ($id, $method, $params): Generator {
|
||||
function () use ($id, $method, $params): Generator {
|
||||
yield $this->protocolWriter->write(
|
||||
new Message(
|
||||
new Request($id, $method, (object) $params),
|
||||
@ -58,7 +58,7 @@ class ClientHandler
|
||||
$deferred = new Deferred();
|
||||
|
||||
$listener =
|
||||
static function (Message $msg) use ($id, $deferred, &$listener): void {
|
||||
function (Message $msg) use ($id, $deferred, &$listener): void {
|
||||
error_log('request handler');
|
||||
/**
|
||||
* @psalm-suppress UndefinedPropertyFetch
|
||||
|
Loading…
Reference in New Issue
Block a user