{"action":"created","comment":{"url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/pulls/comments/168933125","pull_request_review_id":97385324,"id":168933125,"diff_hunk":"@@ -138,48 +138,48 @@ public function process(File $phpcsFile, $stackPtr)\n         }\n \n         $end = $phpcsFile->findNext(T_SEMICOLON, ($stackPtr + 1));\n-        $candidateComment = $end;\n-\n-        do {\n-            $nextComment      = $candidateComment;\n-            $candidateComment = $phpcsFile->findNext(Tokens::$emptyTokens, ($nextComment + 1));\n-        } while ($candidateComment !== false && $tokens[$candidateComment]['line'] === $tokens[$end]['line']);\n-\n-        $end = $nextComment;\n-\n         if ($end === false) {\n             return;\n         }\n \n-        $next = $phpcsFile->findNext(T_WHITESPACE, ($end + 1), null, true);\n+        // Find either the start of the next line or the beginning of the next statement,\n+        // whichever comes first.\n+        for ($end = ++$end; $end < $phpcsFile->numTokens; $end++) {\n+            if (isset(Tokens::$emptyTokens[$tokens[$end]['code']]) === false) {","path":"src/Standards/PSR2/Sniffs/Namespaces/UseDeclarationSniff.php","position":21,"original_position":21,"commit_id":"e35e5594338eb4f4293eb08135e5b20c9b573cdf","original_commit_id":"e35e5594338eb4f4293eb08135e5b20c9b573cdf","user":{"login":"iammattcoleman","id":6289033,"avatar_url":"https://avatars0.githubusercontent.com/u/6289033?v=4","gravatar_id":"","url":"https://api.github.com/users/iammattcoleman","html_url":"https://github.com/iammattcoleman","followers_url":"https://api.github.com/users/iammattcoleman/followers","following_url":"https://api.github.com/users/iammattcoleman/following{/other_user}","gists_url":"https://api.github.com/users/iammattcoleman/gists{/gist_id}","starred_url":"https://api.github.com/users/iammattcoleman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iammattcoleman/subscriptions","organizations_url":"https://api.github.com/users/iammattcoleman/orgs","repos_url":"https://api.github.com/users/iammattcoleman/repos","events_url":"https://api.github.com/users/iammattcoleman/events{/privacy}","received_events_url":"https://api.github.com/users/iammattcoleman/received_events","type":"User","site_admin":false},"body":"@jrfnl I'll admit I didn't test it. Sorry! I hadn't realized there wasn't a separate token for inline comments.","created_at":"2018-02-17T21:17:05Z","updated_at":"2018-02-17T21:17:05Z","html_url":"https://github.com/dhensby/PHP_CodeSniffer/pull/1#discussion_r168933125","pull_request_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/pulls/1","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/pulls/comments/168933125"},"html":{"href":"https://github.com/dhensby/PHP_CodeSniffer/pull/1#discussion_r168933125"},"pull_request":{"href":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/pulls/1"}},"in_reply_to_id":168930973},"pull_request":{"url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/pulls/1","id":169554214,"html_url":"https://github.com/dhensby/PHP_CodeSniffer/pull/1","diff_url":"https://github.com/dhensby/PHP_CodeSniffer/pull/1.diff","patch_url":"https://github.com/dhensby/PHP_CodeSniffer/pull/1.patch","issue_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/issues/1","number":1,"state":"open","locked":false,"title":"PSR2/UseDeclaration: simplify the fix","user":{"login":"jrfnl","id":663378,"avatar_url":"https://avatars1.githubusercontent.com/u/663378?v=4","gravatar_id":"","url":"https://api.github.com/users/jrfnl","html_url":"https://github.com/jrfnl","followers_url":"https://api.github.com/users/jrfnl/followers","following_url":"https://api.github.com/users/jrfnl/following{/other_user}","gists_url":"https://api.github.com/users/jrfnl/gists{/gist_id}","starred_url":"https://api.github.com/users/jrfnl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrfnl/subscriptions","organizations_url":"https://api.github.com/users/jrfnl/orgs","repos_url":"https://api.github.com/users/jrfnl/repos","events_url":"https://api.github.com/users/jrfnl/events{/privacy}","received_events_url":"https://api.github.com/users/jrfnl/received_events","type":"User","site_admin":false},"body":"Based on a review of upstream PR squizlabs/PHP_CodeSniffer#1893, please find this as an optional suggestion for simplifying the logic a little.\r\n\r\nAll unit tests - including the new ones - still pass with this change included.\r\nAdded one more unit test case which looked like it wasn't covered yet.","created_at":"2018-02-16T06:09:04Z","updated_at":"2018-02-17T21:17:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ca76b998fb8b5b666db54b61714d25b3cacf5307","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/pulls/1/commits","review_comments_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/pulls/1/comments","review_comment_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/issues/1/comments","statuses_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/statuses/e35e5594338eb4f4293eb08135e5b20c9b573cdf","head":{"label":"jrfnl:feature/test-is-bs-simplification","ref":"feature/test-is-bs-simplification","sha":"e35e5594338eb4f4293eb08135e5b20c9b573cdf","user":{"login":"jrfnl","id":663378,"avatar_url":"https://avatars1.githubusercontent.com/u/663378?v=4","gravatar_id":"","url":"https://api.github.com/users/jrfnl","html_url":"https://github.com/jrfnl","followers_url":"https://api.github.com/users/jrfnl/followers","following_url":"https://api.github.com/users/jrfnl/following{/other_user}","gists_url":"https://api.github.com/users/jrfnl/gists{/gist_id}","starred_url":"https://api.github.com/users/jrfnl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrfnl/subscriptions","organizations_url":"https://api.github.com/users/jrfnl/orgs","repos_url":"https://api.github.com/users/jrfnl/repos","events_url":"https://api.github.com/users/jrfnl/events{/privacy}","received_events_url":"https://api.github.com/users/jrfnl/received_events","type":"User","site_admin":false},"repo":{"id":32518231,"name":"PHP_CodeSniffer","full_name":"jrfnl/PHP_CodeSniffer","owner":{"login":"jrfnl","id":663378,"avatar_url":"https://avatars1.githubusercontent.com/u/663378?v=4","gravatar_id":"","url":"https://api.github.com/users/jrfnl","html_url":"https://github.com/jrfnl","followers_url":"https://api.github.com/users/jrfnl/followers","following_url":"https://api.github.com/users/jrfnl/following{/other_user}","gists_url":"https://api.github.com/users/jrfnl/gists{/gist_id}","starred_url":"https://api.github.com/users/jrfnl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrfnl/subscriptions","organizations_url":"https://api.github.com/users/jrfnl/orgs","repos_url":"https://api.github.com/users/jrfnl/repos","events_url":"https://api.github.com/users/jrfnl/events{/privacy}","received_events_url":"https://api.github.com/users/jrfnl/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jrfnl/PHP_CodeSniffer","description":"PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.","fork":true,"url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer","forks_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/forks","keys_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/teams","hooks_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/hooks","issue_events_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/issues/events{/number}","events_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/events","assignees_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/assignees{/user}","branches_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/branches{/branch}","tags_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/tags","blobs_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/git/refs{/sha}","trees_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/statuses/{sha}","languages_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/languages","stargazers_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/stargazers","contributors_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/contributors","subscribers_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/subscribers","subscription_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/subscription","commits_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/commits{/sha}","git_commits_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/git/commits{/sha}","comments_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/comments{/number}","issue_comment_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/issues/comments{/number}","contents_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/contents/{+path}","compare_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/merges","archive_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/downloads","issues_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/issues{/number}","pulls_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/pulls{/number}","milestones_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/milestones{/number}","notifications_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/labels{/name}","releases_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/releases{/id}","deployments_url":"https://api.github.com/repos/jrfnl/PHP_CodeSniffer/deployments","created_at":"2015-03-19T11:47:45Z","updated_at":"2017-03-13T00:55:35Z","pushed_at":"2018-02-17T18:35:25Z","git_url":"git://github.com/jrfnl/PHP_CodeSniffer.git","ssh_url":"git@github.com:jrfnl/PHP_CodeSniffer.git","clone_url":"https://github.com/jrfnl/PHP_CodeSniffer.git","svn_url":"https://github.com/jrfnl/PHP_CodeSniffer","homepage":"http://pear.php.net/package/PHP_CodeSniffer","size":96333,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dhensby:pulls/test-is-bs","ref":"pulls/test-is-bs","sha":"1f1e91936466e1feec5ae0cf161bdad613b15e44","user":{"login":"dhensby","id":563596,"avatar_url":"https://avatars1.githubusercontent.com/u/563596?v=4","gravatar_id":"","url":"https://api.github.com/users/dhensby","html_url":"https://github.com/dhensby","followers_url":"https://api.github.com/users/dhensby/followers","following_url":"https://api.github.com/users/dhensby/following{/other_user}","gists_url":"https://api.github.com/users/dhensby/gists{/gist_id}","starred_url":"https://api.github.com/users/dhensby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhensby/subscriptions","organizations_url":"https://api.github.com/users/dhensby/orgs","repos_url":"https://api.github.com/users/dhensby/repos","events_url":"https://api.github.com/users/dhensby/events{/privacy}","received_events_url":"https://api.github.com/users/dhensby/received_events","type":"User","site_admin":false},"repo":{"id":121628646,"name":"PHP_CodeSniffer","full_name":"dhensby/PHP_CodeSniffer","owner":{"login":"dhensby","id":563596,"avatar_url":"https://avatars1.githubusercontent.com/u/563596?v=4","gravatar_id":"","url":"https://api.github.com/users/dhensby","html_url":"https://github.com/dhensby","followers_url":"https://api.github.com/users/dhensby/followers","following_url":"https://api.github.com/users/dhensby/following{/other_user}","gists_url":"https://api.github.com/users/dhensby/gists{/gist_id}","starred_url":"https://api.github.com/users/dhensby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dhensby/subscriptions","organizations_url":"https://api.github.com/users/dhensby/orgs","repos_url":"https://api.github.com/users/dhensby/repos","events_url":"https://api.github.com/users/dhensby/events{/privacy}","received_events_url":"https://api.github.com/users/dhensby/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dhensby/PHP_CodeSniffer","description":"PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.","fork":true,"url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer","forks_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/forks","keys_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/teams","hooks_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/hooks","issue_events_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/issues/events{/number}","events_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/events","assignees_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/assignees{/user}","branches_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/branches{/branch}","tags_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/tags","blobs_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/git/refs{/sha}","trees_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/statuses/{sha}","languages_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/languages","stargazers_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/stargazers","contributors_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/contributors","subscribers_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/subscribers","subscription_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/subscription","commits_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/commits{/sha}","git_commits_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/git/commits{/sha}","comments_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/comments{/number}","issue_comment_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/issues/comments{/number}","contents_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/contents/{+path}","compare_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/merges","archive_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/downloads","issues_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/issues{/number}","pulls_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/pulls{/number}","milestones_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/milestones{/number}","notifications_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/labels{/name}","releases_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/releases{/id}","deployments_url":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/deployments","created_at":"2018-02-15T12:42:46Z","updated_at":"2018-02-15T12:42:51Z","pushed_at":"2018-02-16T06:31:35Z","git_url":"git://github.com/dhensby/PHP_CodeSniffer.git","ssh_url":"git@github.com:dhensby/PHP_CodeSniffer.git","clone_url":"https://github.com/dhensby/PHP_CodeSniffer.git","svn_url":"https://github.com/dhensby/PHP_CodeSniffer","homepage":"http://pear.php.net/package/PHP_CodeSniffer","size":171244,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/pulls/1"},"html":{"href":"https://github.com/dhensby/PHP_CodeSniffer/pull/1"},"issue":{"href":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/issues/1"},"comments":{"href":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/dhensby/PHP_CodeSniffer/statuses/e35e5594338eb4f4293eb08135e5b20c9b573cdf"}},"author_association":"NONE"}}
{"actor":{"display_login":"iammattcoleman"}}