{"action":"created","comment":{"url":"https://api.github.com/repos/felixfbecker/php-language-server/pulls/comments/82509911","pull_request_review_id":3414809,"id":82509911,"diff_hunk":"@@ -70,9 +89,36 @@ public function __construct(string $uri, Project $project, LanguageClient $clien\n      *\n      * @return SymbolInformation[]\n      */\n-    public function getSymbols()\n+    public function getSymbols(): array\n     {\n-        return $this->symbols;\n+        $nodeSymbolKindMap = [\n+            Node\\Stmt\\Class_::class           => SymbolKind::CLASS_,\n+            Node\\Stmt\\Trait_::class           => SymbolKind::CLASS_,\n+            Node\\Stmt\\Interface_::class       => SymbolKind::INTERFACE,\n+            Node\\Stmt\\Namespace_::class       => SymbolKind::NAMESPACE,\n+            Node\\Stmt\\Function_::class        => SymbolKind::FUNCTION,\n+            Node\\Stmt\\ClassMethod::class      => SymbolKind::METHOD,\n+            Node\\Stmt\\PropertyProperty::class => SymbolKind::PROPERTY,\n+            Node\\Const_::class                => SymbolKind::CONSTANT\n+        ];\n+        $symbols = [];\n+        foreach ($this->definitions as $fqn => $node) {","path":"src/PhpDocument.php","position":70,"original_position":70,"commit_id":"6a24d1679550626fd22cebfea68cf84a99ce4363","original_commit_id":"6309b73556af6f0ff943bc7b2968c4e3869255b1","user":{"login":"MadHed","id":2094371,"avatar_url":"https://avatars.githubusercontent.com/u/2094371?v=3","gravatar_id":"","url":"https://api.github.com/users/MadHed","html_url":"https://github.com/MadHed","followers_url":"https://api.github.com/users/MadHed/followers","following_url":"https://api.github.com/users/MadHed/following{/other_user}","gists_url":"https://api.github.com/users/MadHed/gists{/gist_id}","starred_url":"https://api.github.com/users/MadHed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MadHed/subscriptions","organizations_url":"https://api.github.com/users/MadHed/orgs","repos_url":"https://api.github.com/users/MadHed/repos","events_url":"https://api.github.com/users/MadHed/events{/privacy}","received_events_url":"https://api.github.com/users/MadHed/received_events","type":"User","site_admin":false},"body":"I just found it. It comes from `invalid_file.php`. It's never successfully parsed.","created_at":"2016-10-08T21:10:30Z","updated_at":"2016-10-08T21:10:30Z","html_url":"https://github.com/felixfbecker/php-language-server/pull/49#discussion_r82509911","pull_request_url":"https://api.github.com/repos/felixfbecker/php-language-server/pulls/49","_links":{"self":{"href":"https://api.github.com/repos/felixfbecker/php-language-server/pulls/comments/82509911"},"html":{"href":"https://github.com/felixfbecker/php-language-server/pull/49#discussion_r82509911"},"pull_request":{"href":"https://api.github.com/repos/felixfbecker/php-language-server/pulls/49"}}},"pull_request":{"url":"https://api.github.com/repos/felixfbecker/php-language-server/pulls/49","id":88545569,"html_url":"https://github.com/felixfbecker/php-language-server/pull/49","diff_url":"https://github.com/felixfbecker/php-language-server/pull/49.diff","patch_url":"https://github.com/felixfbecker/php-language-server/pull/49.patch","issue_url":"https://api.github.com/repos/felixfbecker/php-language-server/issues/49","number":49,"state":"open","locked":false,"title":"Go to definition support","user":{"login":"felixfbecker","id":10532611,"avatar_url":"https://avatars.githubusercontent.com/u/10532611?v=3","gravatar_id":"","url":"https://api.github.com/users/felixfbecker","html_url":"https://github.com/felixfbecker","followers_url":"https://api.github.com/users/felixfbecker/followers","following_url":"https://api.github.com/users/felixfbecker/following{/other_user}","gists_url":"https://api.github.com/users/felixfbecker/gists{/gist_id}","starred_url":"https://api.github.com/users/felixfbecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixfbecker/subscriptions","organizations_url":"https://api.github.com/users/felixfbecker/orgs","repos_url":"https://api.github.com/users/felixfbecker/repos","events_url":"https://api.github.com/users/felixfbecker/events{/privacy}","received_events_url":"https://api.github.com/users/felixfbecker/received_events","type":"User","site_admin":false},"body":"Closes #19\r\n\r\n![animation](https://cloud.githubusercontent.com/assets/10532611/19213313/47f1f506-8d69-11e6-8293-3140de45b639.gif)\r\n\r\nClasses, interfaces, traits, methods, properties and constants get indexed by their fully qualified name.\r\nExamples for FQNs:\r\n - testFunction()\r\n - TestNamespace\\TestClass\r\n - TestNamespace\\TestClass::TEST_CONSTANT\r\n - TestNamespace\\TestClass::staticTestProperty\r\n - TestNamespace\\TestClass::testProperty\r\n - TestNamespace\\TestClass::staticTestMethod()\r\n - TestNamespace\\TestClass::testMethod()\r\n\r\nVariables are resolved at request.\r\n\r\nSo far only Gotodef for classes is tested, other tests will follow.\r\n\r\nWhat does not work yet:\r\n```php\r\n$x = new Whatever();\r\n$y = $x;\r\n$y->myMethod(); // cannot get definition for myMethod\r\n\r\n$x = new Whatever();\r\n$x->property->myMethod(); // cannot get definition for myMethod\r\n\r\n$this->myMethod(); // cannot get definition for myMethod, $this is not resolved to the class\r\n\r\nfunction test_function(TestClass $x)  // cannot get definition for TestClass\r\n{\r\n}\r\n```\r\n\r\nNeed to add some recursive logic there.","created_at":"2016-10-08T13:13:39Z","updated_at":"2016-10-08T21:10:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"00860fffc7cf1a710c392eae459b7a4091ba4b32","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/felixfbecker/php-language-server/pulls/49/commits","review_comments_url":"https://api.github.com/repos/felixfbecker/php-language-server/pulls/49/comments","review_comment_url":"https://api.github.com/repos/felixfbecker/php-language-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/felixfbecker/php-language-server/issues/49/comments","statuses_url":"https://api.github.com/repos/felixfbecker/php-language-server/statuses/6a24d1679550626fd22cebfea68cf84a99ce4363","head":{"label":"felixfbecker:definition","ref":"definition","sha":"6a24d1679550626fd22cebfea68cf84a99ce4363","user":{"login":"felixfbecker","id":10532611,"avatar_url":"https://avatars.githubusercontent.com/u/10532611?v=3","gravatar_id":"","url":"https://api.github.com/users/felixfbecker","html_url":"https://github.com/felixfbecker","followers_url":"https://api.github.com/users/felixfbecker/followers","following_url":"https://api.github.com/users/felixfbecker/following{/other_user}","gists_url":"https://api.github.com/users/felixfbecker/gists{/gist_id}","starred_url":"https://api.github.com/users/felixfbecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixfbecker/subscriptions","organizations_url":"https://api.github.com/users/felixfbecker/orgs","repos_url":"https://api.github.com/users/felixfbecker/repos","events_url":"https://api.github.com/users/felixfbecker/events{/privacy}","received_events_url":"https://api.github.com/users/felixfbecker/received_events","type":"User","site_admin":false},"repo":{"id":65535756,"name":"php-language-server","full_name":"felixfbecker/php-language-server","owner":{"login":"felixfbecker","id":10532611,"avatar_url":"https://avatars.githubusercontent.com/u/10532611?v=3","gravatar_id":"","url":"https://api.github.com/users/felixfbecker","html_url":"https://github.com/felixfbecker","followers_url":"https://api.github.com/users/felixfbecker/followers","following_url":"https://api.github.com/users/felixfbecker/following{/other_user}","gists_url":"https://api.github.com/users/felixfbecker/gists{/gist_id}","starred_url":"https://api.github.com/users/felixfbecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixfbecker/subscriptions","organizations_url":"https://api.github.com/users/felixfbecker/orgs","repos_url":"https://api.github.com/users/felixfbecker/repos","events_url":"https://api.github.com/users/felixfbecker/events{/privacy}","received_events_url":"https://api.github.com/users/felixfbecker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/felixfbecker/php-language-server","description":"PHP Implementation of the VS Code Language Server Protocol 🆚↔🖥","fork":false,"url":"https://api.github.com/repos/felixfbecker/php-language-server","forks_url":"https://api.github.com/repos/felixfbecker/php-language-server/forks","keys_url":"https://api.github.com/repos/felixfbecker/php-language-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/felixfbecker/php-language-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/felixfbecker/php-language-server/teams","hooks_url":"https://api.github.com/repos/felixfbecker/php-language-server/hooks","issue_events_url":"https://api.github.com/repos/felixfbecker/php-language-server/issues/events{/number}","events_url":"https://api.github.com/repos/felixfbecker/php-language-server/events","assignees_url":"https://api.github.com/repos/felixfbecker/php-language-server/assignees{/user}","branches_url":"https://api.github.com/repos/felixfbecker/php-language-server/branches{/branch}","tags_url":"https://api.github.com/repos/felixfbecker/php-language-server/tags","blobs_url":"https://api.github.com/repos/felixfbecker/php-language-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/felixfbecker/php-language-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/felixfbecker/php-language-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/felixfbecker/php-language-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/felixfbecker/php-language-server/statuses/{sha}","languages_url":"https://api.github.com/repos/felixfbecker/php-language-server/languages","stargazers_url":"https://api.github.com/repos/felixfbecker/php-language-server/stargazers","contributors_url":"https://api.github.com/repos/felixfbecker/php-language-server/contributors","subscribers_url":"https://api.github.com/repos/felixfbecker/php-language-server/subscribers","subscription_url":"https://api.github.com/repos/felixfbecker/php-language-server/subscription","commits_url":"https://api.github.com/repos/felixfbecker/php-language-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/felixfbecker/php-language-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/felixfbecker/php-language-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/felixfbecker/php-language-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/felixfbecker/php-language-server/contents/{+path}","compare_url":"https://api.github.com/repos/felixfbecker/php-language-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/felixfbecker/php-language-server/merges","archive_url":"https://api.github.com/repos/felixfbecker/php-language-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/felixfbecker/php-language-server/downloads","issues_url":"https://api.github.com/repos/felixfbecker/php-language-server/issues{/number}","pulls_url":"https://api.github.com/repos/felixfbecker/php-language-server/pulls{/number}","milestones_url":"https://api.github.com/repos/felixfbecker/php-language-server/milestones{/number}","notifications_url":"https://api.github.com/repos/felixfbecker/php-language-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/felixfbecker/php-language-server/labels{/name}","releases_url":"https://api.github.com/repos/felixfbecker/php-language-server/releases{/id}","deployments_url":"https://api.github.com/repos/felixfbecker/php-language-server/deployments","created_at":"2016-08-12T08:11:14Z","updated_at":"2016-10-04T06:25:38Z","pushed_at":"2016-10-08T20:59:38Z","git_url":"git://github.com/felixfbecker/php-language-server.git","ssh_url":"git@github.com:felixfbecker/php-language-server.git","clone_url":"https://github.com/felixfbecker/php-language-server.git","svn_url":"https://github.com/felixfbecker/php-language-server","homepage":"","size":292,"stargazers_count":20,"watchers_count":20,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":24,"forks":9,"open_issues":24,"watchers":20,"default_branch":"master"}},"base":{"label":"felixfbecker:master","ref":"master","sha":"6cb916e28d8a9f83c26d4df29c6e17153500d825","user":{"login":"felixfbecker","id":10532611,"avatar_url":"https://avatars.githubusercontent.com/u/10532611?v=3","gravatar_id":"","url":"https://api.github.com/users/felixfbecker","html_url":"https://github.com/felixfbecker","followers_url":"https://api.github.com/users/felixfbecker/followers","following_url":"https://api.github.com/users/felixfbecker/following{/other_user}","gists_url":"https://api.github.com/users/felixfbecker/gists{/gist_id}","starred_url":"https://api.github.com/users/felixfbecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixfbecker/subscriptions","organizations_url":"https://api.github.com/users/felixfbecker/orgs","repos_url":"https://api.github.com/users/felixfbecker/repos","events_url":"https://api.github.com/users/felixfbecker/events{/privacy}","received_events_url":"https://api.github.com/users/felixfbecker/received_events","type":"User","site_admin":false},"repo":{"id":65535756,"name":"php-language-server","full_name":"felixfbecker/php-language-server","owner":{"login":"felixfbecker","id":10532611,"avatar_url":"https://avatars.githubusercontent.com/u/10532611?v=3","gravatar_id":"","url":"https://api.github.com/users/felixfbecker","html_url":"https://github.com/felixfbecker","followers_url":"https://api.github.com/users/felixfbecker/followers","following_url":"https://api.github.com/users/felixfbecker/following{/other_user}","gists_url":"https://api.github.com/users/felixfbecker/gists{/gist_id}","starred_url":"https://api.github.com/users/felixfbecker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixfbecker/subscriptions","organizations_url":"https://api.github.com/users/felixfbecker/orgs","repos_url":"https://api.github.com/users/felixfbecker/repos","events_url":"https://api.github.com/users/felixfbecker/events{/privacy}","received_events_url":"https://api.github.com/users/felixfbecker/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/felixfbecker/php-language-server","description":"PHP Implementation of the VS Code Language Server Protocol 🆚↔🖥","fork":false,"url":"https://api.github.com/repos/felixfbecker/php-language-server","forks_url":"https://api.github.com/repos/felixfbecker/php-language-server/forks","keys_url":"https://api.github.com/repos/felixfbecker/php-language-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/felixfbecker/php-language-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/felixfbecker/php-language-server/teams","hooks_url":"https://api.github.com/repos/felixfbecker/php-language-server/hooks","issue_events_url":"https://api.github.com/repos/felixfbecker/php-language-server/issues/events{/number}","events_url":"https://api.github.com/repos/felixfbecker/php-language-server/events","assignees_url":"https://api.github.com/repos/felixfbecker/php-language-server/assignees{/user}","branches_url":"https://api.github.com/repos/felixfbecker/php-language-server/branches{/branch}","tags_url":"https://api.github.com/repos/felixfbecker/php-language-server/tags","blobs_url":"https://api.github.com/repos/felixfbecker/php-language-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/felixfbecker/php-language-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/felixfbecker/php-language-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/felixfbecker/php-language-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/felixfbecker/php-language-server/statuses/{sha}","languages_url":"https://api.github.com/repos/felixfbecker/php-language-server/languages","stargazers_url":"https://api.github.com/repos/felixfbecker/php-language-server/stargazers","contributors_url":"https://api.github.com/repos/felixfbecker/php-language-server/contributors","subscribers_url":"https://api.github.com/repos/felixfbecker/php-language-server/subscribers","subscription_url":"https://api.github.com/repos/felixfbecker/php-language-server/subscription","commits_url":"https://api.github.com/repos/felixfbecker/php-language-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/felixfbecker/php-language-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/felixfbecker/php-language-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/felixfbecker/php-language-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/felixfbecker/php-language-server/contents/{+path}","compare_url":"https://api.github.com/repos/felixfbecker/php-language-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/felixfbecker/php-language-server/merges","archive_url":"https://api.github.com/repos/felixfbecker/php-language-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/felixfbecker/php-language-server/downloads","issues_url":"https://api.github.com/repos/felixfbecker/php-language-server/issues{/number}","pulls_url":"https://api.github.com/repos/felixfbecker/php-language-server/pulls{/number}","milestones_url":"https://api.github.com/repos/felixfbecker/php-language-server/milestones{/number}","notifications_url":"https://api.github.com/repos/felixfbecker/php-language-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/felixfbecker/php-language-server/labels{/name}","releases_url":"https://api.github.com/repos/felixfbecker/php-language-server/releases{/id}","deployments_url":"https://api.github.com/repos/felixfbecker/php-language-server/deployments","created_at":"2016-08-12T08:11:14Z","updated_at":"2016-10-04T06:25:38Z","pushed_at":"2016-10-08T20:59:38Z","git_url":"git://github.com/felixfbecker/php-language-server.git","ssh_url":"git@github.com:felixfbecker/php-language-server.git","clone_url":"https://github.com/felixfbecker/php-language-server.git","svn_url":"https://github.com/felixfbecker/php-language-server","homepage":"","size":292,"stargazers_count":20,"watchers_count":20,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":24,"forks":9,"open_issues":24,"watchers":20,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/felixfbecker/php-language-server/pulls/49"},"html":{"href":"https://github.com/felixfbecker/php-language-server/pull/49"},"issue":{"href":"https://api.github.com/repos/felixfbecker/php-language-server/issues/49"},"comments":{"href":"https://api.github.com/repos/felixfbecker/php-language-server/issues/49/comments"},"review_comments":{"href":"https://api.github.com/repos/felixfbecker/php-language-server/pulls/49/comments"},"review_comment":{"href":"https://api.github.com/repos/felixfbecker/php-language-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/felixfbecker/php-language-server/pulls/49/commits"},"statuses":{"href":"https://api.github.com/repos/felixfbecker/php-language-server/statuses/6a24d1679550626fd22cebfea68cf84a99ce4363"}}}}
{"actor":{"display_login":"MadHed"}}