diff --git a/src/Psalm/Internal/LanguageServer/LanguageServer.php b/src/Psalm/Internal/LanguageServer/LanguageServer.php index 54009b9cc5a..aa709503831 100644 --- a/src/Psalm/Internal/LanguageServer/LanguageServer.php +++ b/src/Psalm/Internal/LanguageServer/LanguageServer.php @@ -997,4 +997,19 @@ public static function uriToPath(string $uri): string 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; + } }