{"action":"created","comment":{"url":"https://api.github.com/repos/phpbb/phpbb/pulls/comments/30641847","id":30641847,"diff_hunk":"@@ -147,43 +148,35 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)\n \t\t\t$comment_end = $phpcsFile->findPrevious($find, ($function_declaration - 1));\n \t\t\tif ($comment_end !== false)\n \t\t\t{\n-\t\t\t\tif (!$tokens[$comment_end]['code'] !== T_DOC_COMMENT)\n+\t\t\t\tif ($tokens[$comment_end]['code'] === T_DOC_COMMENT_CLOSE_TAG)\n \t\t\t\t{\n-\t\t\t\t\t$comment_start = ($phpcsFile->findPrevious(T_DOC_COMMENT, ($comment_end - 1), null, true) + 1);\n-\t\t\t\t\t$comment      = $phpcsFile->getTokensAsString($comment_start, ($comment_end - $comment_start + 1));\n-\n-\t\t\t\t\ttry\n-\t\t\t\t\t{\n-\t\t\t\t\t\t$comment_parser = new PHP_CodeSniffer_CommentParser_FunctionCommentParser($comment, $phpcsFile);\n-\t\t\t\t\t\t$comment_parser->parse();\n-\n-\t\t\t\t\t\t// Check @param\n-\t\t\t\t\t\tforeach ($comment_parser->getParams() as $param) {\n-\t\t\t\t\t\t\t$type = $param->getType();\n-\t\t\t\t\t\t\t$types = explode('|', str_replace('[]', '', $type));\n-\t\t\t\t\t\t\tforeach ($types as $type)\n-\t\t\t\t\t\t\t{\n-\t\t\t\t\t\t\t\t$ok = $this->check($phpcsFile, $type, $class_name_full, $class_name_short, $param->getLine() + $comment_start) ? true : $ok;\n-\t\t\t\t\t\t\t}\n+\t\t\t\t\t$comment_start = $tokens[$comment_end]['comment_opener'];\n+\t\t\t\t\tforeach ($tokens[$comment_start]['comment_tags'] as $tag) {\n+\t\t\t\t\t\tif ($tokens[$tag]['content'] !== '@param' && $tokens[$tag]['content'] !== '@return' && $tokens[$tag]['content'] !== '@throws') {\n+\t\t\t\t\t\t\tcontinue;\n \t\t\t\t\t\t}\n \n-\t\t\t\t\t\t// Check @return\n-\t\t\t\t\t\t$return = $comment_parser->getReturn();\n-\t\t\t\t\t\tif ($return !== null)\n+\t\t\t\t\t\t$classes = $tokens[($tag + 2)]['content'];\n+\t\t\t\t\t\t$space = strpos($classes, ' ');\n+\t\t\t\t\t\tif ($space !== false) {\n+\t\t\t\t\t\t\t$classes = substr($classes, 0, $space);\n+\t\t\t\t\t\t}\n+\n+\t\t\t\t\t\t$tab = strpos($classes, \"\\t\");\n+\t\t\t\t\t\tif ($tab !== false) {\n+\t\t\t\t\t\t\t$classes = substr($classes, 0, $tab);\n+\t\t\t\t\t\t}\n+\n+\t\t\t\t\t\t$classes = explode('|', str_replace('[]', '', $classes));\n+\t\t\t\t\t\tforeach ($classes as $class)\n \t\t\t\t\t\t{\n-\t\t\t\t\t\t\t$type = $return->getValue();\n-\t\t\t\t\t\t\t$types = explode('|', str_replace('[]', '', $type));\n-\t\t\t\t\t\t\tforeach ($types as $type)\n-\t\t\t\t\t\t\t{\n-\t\t\t\t\t\t\t\t$ok = $this->check($phpcsFile, $type, $class_name_full, $class_name_short, $return->getLine() + $comment_start) ? true : $ok;\n-\t\t\t\t\t\t\t}\n+\t\t\t\t\t\t\t$ok = $this->check($phpcsFile, $class, $class_name_full, $class_name_short, $tokens[$tag + 2]['line']) ? true : $ok;\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n-\t\t\t\t\tcatch (PHP_CodeSniffer_CommentParser_ParserException $e)\n-\t\t\t\t\t{\n-\t\t\t\t\t\t$line = ($e->getLineWithinComment() + $comment_start);\n-\t\t\t\t\t\t$phpcsFile->addError($e->getMessage(), $line, 'FailedParse');\n-\t\t\t\t\t}\n+\t\t\t\t}\n+\t\t\t\telse// if ($tokens[$comment_end]['code'] === T_DOC_COMMENT)","path":"build/code_sniffer/phpbb/Sniffs/Namespaces/UnusedUseSniff.php","position":null,"original_position":69,"commit_id":"a462f14aa367e9b8f94c4d2da35458353bad8c0f","original_commit_id":"3edf52c9283cc485a8c3f33a8c2c0e223cbea2af","user":{"login":"Nicofuma","id":591456,"avatar_url":"https://avatars.githubusercontent.com/u/591456?v=3","gravatar_id":"","url":"https://api.github.com/users/Nicofuma","html_url":"https://github.com/Nicofuma","followers_url":"https://api.github.com/users/Nicofuma/followers","following_url":"https://api.github.com/users/Nicofuma/following{/other_user}","gists_url":"https://api.github.com/users/Nicofuma/gists{/gist_id}","starred_url":"https://api.github.com/users/Nicofuma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nicofuma/subscriptions","organizations_url":"https://api.github.com/users/Nicofuma/orgs","repos_url":"https://api.github.com/users/Nicofuma/repos","events_url":"https://api.github.com/users/Nicofuma/events{/privacy}","received_events_url":"https://api.github.com/users/Nicofuma/received_events","type":"User","site_admin":false},"body":"updated","created_at":"2015-05-19T20:19:35Z","updated_at":"2015-05-19T20:19:35Z","html_url":"https://github.com/phpbb/phpbb/pull/3560#discussion_r30641847","pull_request_url":"https://api.github.com/repos/phpbb/phpbb/pulls/3560","_links":{"self":{"href":"https://api.github.com/repos/phpbb/phpbb/pulls/comments/30641847"},"html":{"href":"https://github.com/phpbb/phpbb/pull/3560#discussion_r30641847"},"pull_request":{"href":"https://api.github.com/repos/phpbb/phpbb/pulls/3560"}}},"pull_request":{"url":"https://api.github.com/repos/phpbb/phpbb/pulls/3560","id":34220179,"html_url":"https://github.com/phpbb/phpbb/pull/3560","diff_url":"https://github.com/phpbb/phpbb/pull/3560.diff","patch_url":"https://github.com/phpbb/phpbb/pull/3560.patch","issue_url":"https://api.github.com/repos/phpbb/phpbb/issues/3560","number":3560,"state":"open","locked":false,"title":"[ticket/13790] Update phpcs","user":{"login":"Nicofuma","id":591456,"avatar_url":"https://avatars.githubusercontent.com/u/591456?v=3","gravatar_id":"","url":"https://api.github.com/users/Nicofuma","html_url":"https://github.com/Nicofuma","followers_url":"https://api.github.com/users/Nicofuma/followers","following_url":"https://api.github.com/users/Nicofuma/following{/other_user}","gists_url":"https://api.github.com/users/Nicofuma/gists{/gist_id}","starred_url":"https://api.github.com/users/Nicofuma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nicofuma/subscriptions","organizations_url":"https://api.github.com/users/Nicofuma/orgs","repos_url":"https://api.github.com/users/Nicofuma/repos","events_url":"https://api.github.com/users/Nicofuma/events{/privacy}","received_events_url":"https://api.github.com/users/Nicofuma/received_events","type":"User","site_admin":false},"body":"https://tracker.phpbb.com/browse/PHPBB3-13790\r\n\r\nPHPBB3-13790","created_at":"2015-04-27T23:19:27Z","updated_at":"2015-05-19T20:19:35Z","closed_at":null,"merged_at":null,"merge_commit_sha":"260cc25e845a858aeb3f4bcf45383c87de7cce94","assignee":null,"milestone":{"url":"https://api.github.com/repos/phpbb/phpbb/milestones/7","html_url":"https://github.com/phpbb/phpbb/milestones/3.1.5","labels_url":"https://api.github.com/repos/phpbb/phpbb/milestones/7/labels","id":988734,"number":7,"title":"3.1.5","description":"","creator":{"login":"nickvergessen","id":213943,"avatar_url":"https://avatars.githubusercontent.com/u/213943?v=3","gravatar_id":"","url":"https://api.github.com/users/nickvergessen","html_url":"https://github.com/nickvergessen","followers_url":"https://api.github.com/users/nickvergessen/followers","following_url":"https://api.github.com/users/nickvergessen/following{/other_user}","gists_url":"https://api.github.com/users/nickvergessen/gists{/gist_id}","starred_url":"https://api.github.com/users/nickvergessen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nickvergessen/subscriptions","organizations_url":"https://api.github.com/users/nickvergessen/orgs","repos_url":"https://api.github.com/users/nickvergessen/repos","events_url":"https://api.github.com/users/nickvergessen/events{/privacy}","received_events_url":"https://api.github.com/users/nickvergessen/received_events","type":"User","site_admin":false},"open_issues":43,"closed_issues":22,"state":"open","created_at":"2015-02-20T19:11:10Z","updated_at":"2015-05-19T19:17:53Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/phpbb/phpbb/pulls/3560/commits","review_comments_url":"https://api.github.com/repos/phpbb/phpbb/pulls/3560/comments","review_comment_url":"https://api.github.com/repos/phpbb/phpbb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/phpbb/phpbb/issues/3560/comments","statuses_url":"https://api.github.com/repos/phpbb/phpbb/statuses/a462f14aa367e9b8f94c4d2da35458353bad8c0f","head":{"label":"Nicofuma:ticket/13790","ref":"ticket/13790","sha":"a462f14aa367e9b8f94c4d2da35458353bad8c0f","user":{"login":"Nicofuma","id":591456,"avatar_url":"https://avatars.githubusercontent.com/u/591456?v=3","gravatar_id":"","url":"https://api.github.com/users/Nicofuma","html_url":"https://github.com/Nicofuma","followers_url":"https://api.github.com/users/Nicofuma/followers","following_url":"https://api.github.com/users/Nicofuma/following{/other_user}","gists_url":"https://api.github.com/users/Nicofuma/gists{/gist_id}","starred_url":"https://api.github.com/users/Nicofuma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nicofuma/subscriptions","organizations_url":"https://api.github.com/users/Nicofuma/orgs","repos_url":"https://api.github.com/users/Nicofuma/repos","events_url":"https://api.github.com/users/Nicofuma/events{/privacy}","received_events_url":"https://api.github.com/users/Nicofuma/received_events","type":"User","site_admin":false},"repo":{"id":18715287,"name":"phpbb","full_name":"Nicofuma/phpbb","owner":{"login":"Nicofuma","id":591456,"avatar_url":"https://avatars.githubusercontent.com/u/591456?v=3","gravatar_id":"","url":"https://api.github.com/users/Nicofuma","html_url":"https://github.com/Nicofuma","followers_url":"https://api.github.com/users/Nicofuma/followers","following_url":"https://api.github.com/users/Nicofuma/following{/other_user}","gists_url":"https://api.github.com/users/Nicofuma/gists{/gist_id}","starred_url":"https://api.github.com/users/Nicofuma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nicofuma/subscriptions","organizations_url":"https://api.github.com/users/Nicofuma/orgs","repos_url":"https://api.github.com/users/Nicofuma/repos","events_url":"https://api.github.com/users/Nicofuma/events{/privacy}","received_events_url":"https://api.github.com/users/Nicofuma/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Nicofuma/phpbb","description":" phpBB 3 Development: phpBB is a popular open-source bulletin board written in PHP. This repository also contains the history of version 2.","fork":true,"url":"https://api.github.com/repos/Nicofuma/phpbb","forks_url":"https://api.github.com/repos/Nicofuma/phpbb/forks","keys_url":"https://api.github.com/repos/Nicofuma/phpbb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Nicofuma/phpbb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Nicofuma/phpbb/teams","hooks_url":"https://api.github.com/repos/Nicofuma/phpbb/hooks","issue_events_url":"https://api.github.com/repos/Nicofuma/phpbb/issues/events{/number}","events_url":"https://api.github.com/repos/Nicofuma/phpbb/events","assignees_url":"https://api.github.com/repos/Nicofuma/phpbb/assignees{/user}","branches_url":"https://api.github.com/repos/Nicofuma/phpbb/branches{/branch}","tags_url":"https://api.github.com/repos/Nicofuma/phpbb/tags","blobs_url":"https://api.github.com/repos/Nicofuma/phpbb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Nicofuma/phpbb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Nicofuma/phpbb/git/refs{/sha}","trees_url":"https://api.github.com/repos/Nicofuma/phpbb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Nicofuma/phpbb/statuses/{sha}","languages_url":"https://api.github.com/repos/Nicofuma/phpbb/languages","stargazers_url":"https://api.github.com/repos/Nicofuma/phpbb/stargazers","contributors_url":"https://api.github.com/repos/Nicofuma/phpbb/contributors","subscribers_url":"https://api.github.com/repos/Nicofuma/phpbb/subscribers","subscription_url":"https://api.github.com/repos/Nicofuma/phpbb/subscription","commits_url":"https://api.github.com/repos/Nicofuma/phpbb/commits{/sha}","git_commits_url":"https://api.github.com/repos/Nicofuma/phpbb/git/commits{/sha}","comments_url":"https://api.github.com/repos/Nicofuma/phpbb/comments{/number}","issue_comment_url":"https://api.github.com/repos/Nicofuma/phpbb/issues/comments{/number}","contents_url":"https://api.github.com/repos/Nicofuma/phpbb/contents/{+path}","compare_url":"https://api.github.com/repos/Nicofuma/phpbb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Nicofuma/phpbb/merges","archive_url":"https://api.github.com/repos/Nicofuma/phpbb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Nicofuma/phpbb/downloads","issues_url":"https://api.github.com/repos/Nicofuma/phpbb/issues{/number}","pulls_url":"https://api.github.com/repos/Nicofuma/phpbb/pulls{/number}","milestones_url":"https://api.github.com/repos/Nicofuma/phpbb/milestones{/number}","notifications_url":"https://api.github.com/repos/Nicofuma/phpbb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Nicofuma/phpbb/labels{/name}","releases_url":"https://api.github.com/repos/Nicofuma/phpbb/releases{/id}","created_at":"2014-04-12T21:36:20Z","updated_at":"2015-02-03T09:26:19Z","pushed_at":"2015-05-19T20:19:35Z","git_url":"git://github.com/Nicofuma/phpbb.git","ssh_url":"git@github.com:Nicofuma/phpbb.git","clone_url":"https://github.com/Nicofuma/phpbb.git","svn_url":"https://github.com/Nicofuma/phpbb","homepage":"http://www.phpbb.com","size":120009,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"develop-ascraeus"}},"base":{"label":"phpbb:3.1.x","ref":"3.1.x","sha":"1d2a127144476b29ebd37a7d239520d87bd93adc","user":{"login":"phpbb","id":176697,"avatar_url":"https://avatars.githubusercontent.com/u/176697?v=3","gravatar_id":"","url":"https://api.github.com/users/phpbb","html_url":"https://github.com/phpbb","followers_url":"https://api.github.com/users/phpbb/followers","following_url":"https://api.github.com/users/phpbb/following{/other_user}","gists_url":"https://api.github.com/users/phpbb/gists{/gist_id}","starred_url":"https://api.github.com/users/phpbb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phpbb/subscriptions","organizations_url":"https://api.github.com/users/phpbb/orgs","repos_url":"https://api.github.com/users/phpbb/repos","events_url":"https://api.github.com/users/phpbb/events{/privacy}","received_events_url":"https://api.github.com/users/phpbb/received_events","type":"Organization","site_admin":false},"repo":{"id":541983,"name":"phpbb","full_name":"phpbb/phpbb","owner":{"login":"phpbb","id":176697,"avatar_url":"https://avatars.githubusercontent.com/u/176697?v=3","gravatar_id":"","url":"https://api.github.com/users/phpbb","html_url":"https://github.com/phpbb","followers_url":"https://api.github.com/users/phpbb/followers","following_url":"https://api.github.com/users/phpbb/following{/other_user}","gists_url":"https://api.github.com/users/phpbb/gists{/gist_id}","starred_url":"https://api.github.com/users/phpbb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phpbb/subscriptions","organizations_url":"https://api.github.com/users/phpbb/orgs","repos_url":"https://api.github.com/users/phpbb/repos","events_url":"https://api.github.com/users/phpbb/events{/privacy}","received_events_url":"https://api.github.com/users/phpbb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/phpbb/phpbb","description":" phpBB 3 Development: phpBB is a popular open-source bulletin board written in PHP. This repository also contains the history of version 2.","fork":false,"url":"https://api.github.com/repos/phpbb/phpbb","forks_url":"https://api.github.com/repos/phpbb/phpbb/forks","keys_url":"https://api.github.com/repos/phpbb/phpbb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phpbb/phpbb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phpbb/phpbb/teams","hooks_url":"https://api.github.com/repos/phpbb/phpbb/hooks","issue_events_url":"https://api.github.com/repos/phpbb/phpbb/issues/events{/number}","events_url":"https://api.github.com/repos/phpbb/phpbb/events","assignees_url":"https://api.github.com/repos/phpbb/phpbb/assignees{/user}","branches_url":"https://api.github.com/repos/phpbb/phpbb/branches{/branch}","tags_url":"https://api.github.com/repos/phpbb/phpbb/tags","blobs_url":"https://api.github.com/repos/phpbb/phpbb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phpbb/phpbb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phpbb/phpbb/git/refs{/sha}","trees_url":"https://api.github.com/repos/phpbb/phpbb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phpbb/phpbb/statuses/{sha}","languages_url":"https://api.github.com/repos/phpbb/phpbb/languages","stargazers_url":"https://api.github.com/repos/phpbb/phpbb/stargazers","contributors_url":"https://api.github.com/repos/phpbb/phpbb/contributors","subscribers_url":"https://api.github.com/repos/phpbb/phpbb/subscribers","subscription_url":"https://api.github.com/repos/phpbb/phpbb/subscription","commits_url":"https://api.github.com/repos/phpbb/phpbb/commits{/sha}","git_commits_url":"https://api.github.com/repos/phpbb/phpbb/git/commits{/sha}","comments_url":"https://api.github.com/repos/phpbb/phpbb/comments{/number}","issue_comment_url":"https://api.github.com/repos/phpbb/phpbb/issues/comments{/number}","contents_url":"https://api.github.com/repos/phpbb/phpbb/contents/{+path}","compare_url":"https://api.github.com/repos/phpbb/phpbb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phpbb/phpbb/merges","archive_url":"https://api.github.com/repos/phpbb/phpbb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phpbb/phpbb/downloads","issues_url":"https://api.github.com/repos/phpbb/phpbb/issues{/number}","pulls_url":"https://api.github.com/repos/phpbb/phpbb/pulls{/number}","milestones_url":"https://api.github.com/repos/phpbb/phpbb/milestones{/number}","notifications_url":"https://api.github.com/repos/phpbb/phpbb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phpbb/phpbb/labels{/name}","releases_url":"https://api.github.com/repos/phpbb/phpbb/releases{/id}","created_at":"2010-03-01T22:33:17Z","updated_at":"2015-05-17T20:56:40Z","pushed_at":"2015-05-19T20:01:54Z","git_url":"git://github.com/phpbb/phpbb.git","ssh_url":"git@github.com:phpbb/phpbb.git","clone_url":"https://github.com/phpbb/phpbb.git","svn_url":"https://github.com/phpbb/phpbb","homepage":"http://www.phpbb.com","size":193915,"stargazers_count":733,"watchers_count":733,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":464,"mirror_url":null,"open_issues_count":96,"forks":464,"open_issues":96,"watchers":733,"default_branch":"3.1.x"}},"_links":{"self":{"href":"https://api.github.com/repos/phpbb/phpbb/pulls/3560"},"html":{"href":"https://github.com/phpbb/phpbb/pull/3560"},"issue":{"href":"https://api.github.com/repos/phpbb/phpbb/issues/3560"},"comments":{"href":"https://api.github.com/repos/phpbb/phpbb/issues/3560/comments"},"review_comments":{"href":"https://api.github.com/repos/phpbb/phpbb/pulls/3560/comments"},"review_comment":{"href":"https://api.github.com/repos/phpbb/phpbb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/phpbb/phpbb/pulls/3560/commits"},"statuses":{"href":"https://api.github.com/repos/phpbb/phpbb/statuses/a462f14aa367e9b8f94c4d2da35458353bad8c0f"}}}}