Skip to content

Commit

Permalink
Merge pull request #10046 from weirdan/map-special-rpc-paths
Browse files Browse the repository at this point in the history
Map special RPC paths
  • Loading branch information
weirdan committed Jul 24, 2023
2 parents f2c77ca + 4a0a12d commit c50ae7c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Psalm/Internal/LanguageServer/LanguageServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit c50ae7c

Please sign in to comment.