{"action":"created","comment":{"url":"https://api.github.com/repos/SonarSource/sonar-php/pulls/comments/205170546","pull_request_review_id":140387817,"id":205170546,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNTE3MDU0Ng==","diff_hunk":"@@ -281,3 +281,19 @@ function extract_function() {\n   extract($var_array);\n   echo \"$color\";\n }\n+\n+/**\n+ * SONARPHP-760\n+ */\n+function anonymous_class() {\n+\n+  $foo760 = '...'; // used in anonymous class\n+  new class($foo760) {\n+    private $bar;\n+    public function __construct($bar) { $this->bar = $bar; }\n+  };\n+\n+  $bar760 = '...'; // used in anonymous class\n+  new class($bar760) { };","path":"php-checks/src/test/resources/checks/UnusedLocalVariableCheck.php","position":17,"original_position":17,"commit_id":"893d452eb67b87758a754a336f604d98c7a9d112","original_commit_id":"893d452eb67b87758a754a336f604d98c7a9d112","user":{"login":"andrei-epure-sonarsource","id":38876598,"node_id":"MDQ6VXNlcjM4ODc2NTk4","avatar_url":"https://avatars1.githubusercontent.com/u/38876598?v=4","gravatar_id":"","url":"https://api.github.com/users/andrei-epure-sonarsource","html_url":"https://github.com/andrei-epure-sonarsource","followers_url":"https://api.github.com/users/andrei-epure-sonarsource/followers","following_url":"https://api.github.com/users/andrei-epure-sonarsource/following{/other_user}","gists_url":"https://api.github.com/users/andrei-epure-sonarsource/gists{/gist_id}","starred_url":"https://api.github.com/users/andrei-epure-sonarsource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrei-epure-sonarsource/subscriptions","organizations_url":"https://api.github.com/users/andrei-epure-sonarsource/orgs","repos_url":"https://api.github.com/users/andrei-epure-sonarsource/repos","events_url":"https://api.github.com/users/andrei-epure-sonarsource/events{/privacy}","received_events_url":"https://api.github.com/users/andrei-epure-sonarsource/received_events","type":"User","site_admin":false},"body":"This is a FN, should I check here that the anonymous class has a constructor with N parameters, where N is the number of variables passed to the class as parameters?\r\nIt would add complexity to the implementation...","created_at":"2018-07-25T16:08:02Z","updated_at":"2018-07-25T16:08:02Z","html_url":"https://github.com/SonarSource/sonar-php/pull/318#discussion_r205170546","pull_request_url":"https://api.github.com/repos/SonarSource/sonar-php/pulls/318","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/SonarSource/sonar-php/pulls/comments/205170546"},"html":{"href":"https://github.com/SonarSource/sonar-php/pull/318#discussion_r205170546"},"pull_request":{"href":"https://api.github.com/repos/SonarSource/sonar-php/pulls/318"}}},"pull_request":{"url":"https://api.github.com/repos/SonarSource/sonar-php/pulls/318","id":203887527,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzODg3NTI3","html_url":"https://github.com/SonarSource/sonar-php/pull/318","diff_url":"https://github.com/SonarSource/sonar-php/pull/318.diff","patch_url":"https://github.com/SonarSource/sonar-php/pull/318.patch","issue_url":"https://api.github.com/repos/SonarSource/sonar-php/issues/318","number":318,"state":"open","locked":false,"title":"SONARPHP-760 FP on S1481 on anonymous class parameter","user":{"login":"andrei-epure-sonarsource","id":38876598,"node_id":"MDQ6VXNlcjM4ODc2NTk4","avatar_url":"https://avatars1.githubusercontent.com/u/38876598?v=4","gravatar_id":"","url":"https://api.github.com/users/andrei-epure-sonarsource","html_url":"https://github.com/andrei-epure-sonarsource","followers_url":"https://api.github.com/users/andrei-epure-sonarsource/followers","following_url":"https://api.github.com/users/andrei-epure-sonarsource/following{/other_user}","gists_url":"https://api.github.com/users/andrei-epure-sonarsource/gists{/gist_id}","starred_url":"https://api.github.com/users/andrei-epure-sonarsource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrei-epure-sonarsource/subscriptions","organizations_url":"https://api.github.com/users/andrei-epure-sonarsource/orgs","repos_url":"https://api.github.com/users/andrei-epure-sonarsource/repos","events_url":"https://api.github.com/users/andrei-epure-sonarsource/events{/privacy}","received_events_url":"https://api.github.com/users/andrei-epure-sonarsource/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-25T16:04:09Z","updated_at":"2018-07-25T16:08:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8e6960230e2e768333af7aee151726e555549355","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/SonarSource/sonar-php/pulls/318/commits","review_comments_url":"https://api.github.com/repos/SonarSource/sonar-php/pulls/318/comments","review_comment_url":"https://api.github.com/repos/SonarSource/sonar-php/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SonarSource/sonar-php/issues/318/comments","statuses_url":"https://api.github.com/repos/SonarSource/sonar-php/statuses/893d452eb67b87758a754a336f604d98c7a9d112","head":{"label":"SonarSource:SONARPHP-760","ref":"SONARPHP-760","sha":"893d452eb67b87758a754a336f604d98c7a9d112","user":{"login":"SonarSource","id":545988,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0NTk4OA==","avatar_url":"https://avatars0.githubusercontent.com/u/545988?v=4","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"repo":{"id":4544982,"node_id":"MDEwOlJlcG9zaXRvcnk0NTQ0OTgy","name":"sonar-php","full_name":"SonarSource/sonar-php","owner":{"login":"SonarSource","id":545988,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0NTk4OA==","avatar_url":"https://avatars0.githubusercontent.com/u/545988?v=4","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SonarSource/sonar-php","description":" :elephant: SonarPHP: PHP static analyzer for SonarQube & SonarLint","fork":false,"url":"https://api.github.com/repos/SonarSource/sonar-php","forks_url":"https://api.github.com/repos/SonarSource/sonar-php/forks","keys_url":"https://api.github.com/repos/SonarSource/sonar-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SonarSource/sonar-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SonarSource/sonar-php/teams","hooks_url":"https://api.github.com/repos/SonarSource/sonar-php/hooks","issue_events_url":"https://api.github.com/repos/SonarSource/sonar-php/issues/events{/number}","events_url":"https://api.github.com/repos/SonarSource/sonar-php/events","assignees_url":"https://api.github.com/repos/SonarSource/sonar-php/assignees{/user}","branches_url":"https://api.github.com/repos/SonarSource/sonar-php/branches{/branch}","tags_url":"https://api.github.com/repos/SonarSource/sonar-php/tags","blobs_url":"https://api.github.com/repos/SonarSource/sonar-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SonarSource/sonar-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SonarSource/sonar-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/SonarSource/sonar-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SonarSource/sonar-php/statuses/{sha}","languages_url":"https://api.github.com/repos/SonarSource/sonar-php/languages","stargazers_url":"https://api.github.com/repos/SonarSource/sonar-php/stargazers","contributors_url":"https://api.github.com/repos/SonarSource/sonar-php/contributors","subscribers_url":"https://api.github.com/repos/SonarSource/sonar-php/subscribers","subscription_url":"https://api.github.com/repos/SonarSource/sonar-php/subscription","commits_url":"https://api.github.com/repos/SonarSource/sonar-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/SonarSource/sonar-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/SonarSource/sonar-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/SonarSource/sonar-php/issues/comments{/number}","contents_url":"https://api.github.com/repos/SonarSource/sonar-php/contents/{+path}","compare_url":"https://api.github.com/repos/SonarSource/sonar-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SonarSource/sonar-php/merges","archive_url":"https://api.github.com/repos/SonarSource/sonar-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SonarSource/sonar-php/downloads","issues_url":"https://api.github.com/repos/SonarSource/sonar-php/issues{/number}","pulls_url":"https://api.github.com/repos/SonarSource/sonar-php/pulls{/number}","milestones_url":"https://api.github.com/repos/SonarSource/sonar-php/milestones{/number}","notifications_url":"https://api.github.com/repos/SonarSource/sonar-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SonarSource/sonar-php/labels{/name}","releases_url":"https://api.github.com/repos/SonarSource/sonar-php/releases{/id}","deployments_url":"https://api.github.com/repos/SonarSource/sonar-php/deployments","created_at":"2012-06-04T08:36:12Z","updated_at":"2018-07-25T15:43:07Z","pushed_at":"2018-07-25T16:04:10Z","git_url":"git://github.com/SonarSource/sonar-php.git","ssh_url":"git@github.com:SonarSource/sonar-php.git","clone_url":"https://github.com/SonarSource/sonar-php.git","svn_url":"https://github.com/SonarSource/sonar-php","homepage":"","size":13046,"stargazers_count":133,"watchers_count":133,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":54,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":54,"open_issues":3,"watchers":133,"default_branch":"master"}},"base":{"label":"SonarSource:master","ref":"master","sha":"ae8b346c9751775e58c98f3d14e5752c9f816ded","user":{"login":"SonarSource","id":545988,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0NTk4OA==","avatar_url":"https://avatars0.githubusercontent.com/u/545988?v=4","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"repo":{"id":4544982,"node_id":"MDEwOlJlcG9zaXRvcnk0NTQ0OTgy","name":"sonar-php","full_name":"SonarSource/sonar-php","owner":{"login":"SonarSource","id":545988,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU0NTk4OA==","avatar_url":"https://avatars0.githubusercontent.com/u/545988?v=4","gravatar_id":"","url":"https://api.github.com/users/SonarSource","html_url":"https://github.com/SonarSource","followers_url":"https://api.github.com/users/SonarSource/followers","following_url":"https://api.github.com/users/SonarSource/following{/other_user}","gists_url":"https://api.github.com/users/SonarSource/gists{/gist_id}","starred_url":"https://api.github.com/users/SonarSource/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SonarSource/subscriptions","organizations_url":"https://api.github.com/users/SonarSource/orgs","repos_url":"https://api.github.com/users/SonarSource/repos","events_url":"https://api.github.com/users/SonarSource/events{/privacy}","received_events_url":"https://api.github.com/users/SonarSource/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SonarSource/sonar-php","description":" :elephant: SonarPHP: PHP static analyzer for SonarQube & SonarLint","fork":false,"url":"https://api.github.com/repos/SonarSource/sonar-php","forks_url":"https://api.github.com/repos/SonarSource/sonar-php/forks","keys_url":"https://api.github.com/repos/SonarSource/sonar-php/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SonarSource/sonar-php/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SonarSource/sonar-php/teams","hooks_url":"https://api.github.com/repos/SonarSource/sonar-php/hooks","issue_events_url":"https://api.github.com/repos/SonarSource/sonar-php/issues/events{/number}","events_url":"https://api.github.com/repos/SonarSource/sonar-php/events","assignees_url":"https://api.github.com/repos/SonarSource/sonar-php/assignees{/user}","branches_url":"https://api.github.com/repos/SonarSource/sonar-php/branches{/branch}","tags_url":"https://api.github.com/repos/SonarSource/sonar-php/tags","blobs_url":"https://api.github.com/repos/SonarSource/sonar-php/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SonarSource/sonar-php/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SonarSource/sonar-php/git/refs{/sha}","trees_url":"https://api.github.com/repos/SonarSource/sonar-php/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SonarSource/sonar-php/statuses/{sha}","languages_url":"https://api.github.com/repos/SonarSource/sonar-php/languages","stargazers_url":"https://api.github.com/repos/SonarSource/sonar-php/stargazers","contributors_url":"https://api.github.com/repos/SonarSource/sonar-php/contributors","subscribers_url":"https://api.github.com/repos/SonarSource/sonar-php/subscribers","subscription_url":"https://api.github.com/repos/SonarSource/sonar-php/subscription","commits_url":"https://api.github.com/repos/SonarSource/sonar-php/commits{/sha}","git_commits_url":"https://api.github.com/repos/SonarSource/sonar-php/git/commits{/sha}","comments_url":"https://api.github.com/repos/SonarSource/sonar-php/comments{/number}","issue_comment_url":"https://api.github.com/repos/SonarSource/sonar-php/issues/comments{/number}","contents_url":"https://api.github.com/repos/SonarSource/sonar-php/contents/{+path}","compare_url":"https://api.github.com/repos/SonarSource/sonar-php/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SonarSource/sonar-php/merges","archive_url":"https://api.github.com/repos/SonarSource/sonar-php/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SonarSource/sonar-php/downloads","issues_url":"https://api.github.com/repos/SonarSource/sonar-php/issues{/number}","pulls_url":"https://api.github.com/repos/SonarSource/sonar-php/pulls{/number}","milestones_url":"https://api.github.com/repos/SonarSource/sonar-php/milestones{/number}","notifications_url":"https://api.github.com/repos/SonarSource/sonar-php/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SonarSource/sonar-php/labels{/name}","releases_url":"https://api.github.com/repos/SonarSource/sonar-php/releases{/id}","deployments_url":"https://api.github.com/repos/SonarSource/sonar-php/deployments","created_at":"2012-06-04T08:36:12Z","updated_at":"2018-07-25T15:43:07Z","pushed_at":"2018-07-25T16:04:10Z","git_url":"git://github.com/SonarSource/sonar-php.git","ssh_url":"git@github.com:SonarSource/sonar-php.git","clone_url":"https://github.com/SonarSource/sonar-php.git","svn_url":"https://github.com/SonarSource/sonar-php","homepage":"","size":13046,"stargazers_count":133,"watchers_count":133,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":54,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":54,"open_issues":3,"watchers":133,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SonarSource/sonar-php/pulls/318"},"html":{"href":"https://github.com/SonarSource/sonar-php/pull/318"},"issue":{"href":"https://api.github.com/repos/SonarSource/sonar-php/issues/318"},"comments":{"href":"https://api.github.com/repos/SonarSource/sonar-php/issues/318/comments"},"review_comments":{"href":"https://api.github.com/repos/SonarSource/sonar-php/pulls/318/comments"},"review_comment":{"href":"https://api.github.com/repos/SonarSource/sonar-php/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SonarSource/sonar-php/pulls/318/commits"},"statuses":{"href":"https://api.github.com/repos/SonarSource/sonar-php/statuses/893d452eb67b87758a754a336f604d98c7a9d112"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"andrei-epure-sonarsource"}}