1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

Merge pull request #10046 from weirdan/map-special-rpc-paths

Map special RPC paths
This commit is contained in:
Bruce Weirdan 2023-07-25 00:55:40 +02:00 committed by GitHub
commit c50ae7c2e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -997,4 +997,19 @@ class LanguageServer extends Dispatcher
return $filepath;
}
// the methods below forward special paths
// like `$/cancelRequest` to `$this->cancelRequest()`
// and `$/a/b/c` to `$this->a->b->c()`
public function __isset(string $prop_name): bool
{
return $prop_name === '$';
}
/** @return static */
public function __get(string $_prop_name): self
{
return $this;
}
}