{"action":"created","comment":{"url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/pulls/comments/169594640","pull_request_review_id":98143203,"id":169594640,"diff_hunk":"@@ -215,6 +219,10 @@ private function nextElementAcceptsDoctrineAnnotations(PhpTokens $tokens, $index\n \n         while ($tokens[$index]->isGivenKind(array(T_PUBLIC, T_PROTECTED, T_PRIVATE, T_FINAL, T_ABSTRACT))) {\n             $index = $tokens->getNextMeaningfulToken($index);\n+\n+            if (null === $index) {","path":"src/AbstractDoctrineAnnotationFixer.php","position":16,"original_position":16,"commit_id":"7581efd48a980d21669318c90285610910c5c9f8","original_commit_id":"7581efd48a980d21669318c90285610910c5c9f8","user":{"login":"Slamdunk","id":152236,"avatar_url":"https://avatars0.githubusercontent.com/u/152236?v=4","gravatar_id":"","url":"https://api.github.com/users/Slamdunk","html_url":"https://github.com/Slamdunk","followers_url":"https://api.github.com/users/Slamdunk/followers","following_url":"https://api.github.com/users/Slamdunk/following{/other_user}","gists_url":"https://api.github.com/users/Slamdunk/gists{/gist_id}","starred_url":"https://api.github.com/users/Slamdunk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Slamdunk/subscriptions","organizations_url":"https://api.github.com/users/Slamdunk/orgs","repos_url":"https://api.github.com/users/Slamdunk/repos","events_url":"https://api.github.com/users/Slamdunk/events{/privacy}","received_events_url":"https://api.github.com/users/Slamdunk/received_events","type":"User","site_admin":false},"body":"I added this second change only to be safe, but not covered by any test (this specific addition).","created_at":"2018-02-21T10:37:43Z","updated_at":"2018-02-21T10:37:43Z","html_url":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/3557#discussion_r169594640","pull_request_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/pulls/3557","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/pulls/comments/169594640"},"html":{"href":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/3557#discussion_r169594640"},"pull_request":{"href":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/pulls/3557"}},"in_reply_to_id":169589961},"pull_request":{"url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/pulls/3557","id":170418635,"html_url":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/3557","diff_url":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/3557.diff","patch_url":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/3557.patch","issue_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/3557","number":3557,"state":"open","locked":false,"title":"AbstractDoctrineAnnotationFixer: edge case bugfix","user":{"login":"Slamdunk","id":152236,"avatar_url":"https://avatars0.githubusercontent.com/u/152236?v=4","gravatar_id":"","url":"https://api.github.com/users/Slamdunk","html_url":"https://github.com/Slamdunk","followers_url":"https://api.github.com/users/Slamdunk/followers","following_url":"https://api.github.com/users/Slamdunk/following{/other_user}","gists_url":"https://api.github.com/users/Slamdunk/gists{/gist_id}","starred_url":"https://api.github.com/users/Slamdunk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Slamdunk/subscriptions","organizations_url":"https://api.github.com/users/Slamdunk/orgs","repos_url":"https://api.github.com/users/Slamdunk/repos","events_url":"https://api.github.com/users/Slamdunk/events{/privacy}","received_events_url":"https://api.github.com/users/Slamdunk/received_events","type":"User","site_admin":false},"body":"```\r\n    [RuntimeException]\r\n    Index invalid or out of range\r\n\r\n  PhpCsFixer\\AbstractDoctrineAnnotationFixer->nextElementAcceptsDoctrineAnnotations()\r\n    in ./vendor/friendsofphp/php-cs-fixer/src/AbstractDoctrineAnnotationFixer.php at line 52\r\n  PhpCsFixer\\AbstractDoctrineAnnotationFixer->applyFix()\r\n    in ./vendor/friendsofphp/php-cs-fixer/src/AbstractFixer.php at line 73\r\n  PhpCsFixer\\AbstractFixer->fix()\r\n    in ./vendor/friendsofphp/php-cs-fixer/src/Runner/Runner.php at line 190\r\n  PhpCsFixer\\Runner\\Runner->fixFile()\r\n    in ./vendor/friendsofphp/php-cs-fixer/src/Runner/Runner.php at line 132\r\n  PhpCsFixer\\Runner\\Runner->fix()\r\n    in ./vendor/friendsofphp/php-cs-fixer/src/Console/Command/FixCommand.php at line 219\r\n  PhpCsFixer\\Console\\Command\\FixCommand->execute()\r\n    in ./vendor/symfony/console/Command/Command.php at line 252\r\n  [ ... ]\r\n```","created_at":"2018-02-21T09:44:11Z","updated_at":"2018-02-21T10:37:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"94948aba900504aeb3bfef19364c29864939f2a3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":5114728,"url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/labels/bug","name":"bug","color":"fc2929","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/pulls/3557/commits","review_comments_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/pulls/3557/comments","review_comment_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/3557/comments","statuses_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/statuses/7581efd48a980d21669318c90285610910c5c9f8","head":{"label":"Slamdunk:doctrine_bug","ref":"doctrine_bug","sha":"7581efd48a980d21669318c90285610910c5c9f8","user":{"login":"Slamdunk","id":152236,"avatar_url":"https://avatars0.githubusercontent.com/u/152236?v=4","gravatar_id":"","url":"https://api.github.com/users/Slamdunk","html_url":"https://github.com/Slamdunk","followers_url":"https://api.github.com/users/Slamdunk/followers","following_url":"https://api.github.com/users/Slamdunk/following{/other_user}","gists_url":"https://api.github.com/users/Slamdunk/gists{/gist_id}","starred_url":"https://api.github.com/users/Slamdunk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Slamdunk/subscriptions","organizations_url":"https://api.github.com/users/Slamdunk/orgs","repos_url":"https://api.github.com/users/Slamdunk/repos","events_url":"https://api.github.com/users/Slamdunk/events{/privacy}","received_events_url":"https://api.github.com/users/Slamdunk/received_events","type":"User","site_admin":false},"repo":{"id":26592681,"name":"PHP-CS-Fixer","full_name":"Slamdunk/PHP-CS-Fixer","owner":{"login":"Slamdunk","id":152236,"avatar_url":"https://avatars0.githubusercontent.com/u/152236?v=4","gravatar_id":"","url":"https://api.github.com/users/Slamdunk","html_url":"https://github.com/Slamdunk","followers_url":"https://api.github.com/users/Slamdunk/followers","following_url":"https://api.github.com/users/Slamdunk/following{/other_user}","gists_url":"https://api.github.com/users/Slamdunk/gists{/gist_id}","starred_url":"https://api.github.com/users/Slamdunk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Slamdunk/subscriptions","organizations_url":"https://api.github.com/users/Slamdunk/orgs","repos_url":"https://api.github.com/users/Slamdunk/repos","events_url":"https://api.github.com/users/Slamdunk/events{/privacy}","received_events_url":"https://api.github.com/users/Slamdunk/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Slamdunk/PHP-CS-Fixer","description":"Analyzes some PHP source code and tries to fix coding standards issues (PSR-1 and PSR-2 compatible)","fork":true,"url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer","forks_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/forks","keys_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/teams","hooks_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/hooks","issue_events_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/issues/events{/number}","events_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/events","assignees_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/assignees{/user}","branches_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/branches{/branch}","tags_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/tags","blobs_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/git/refs{/sha}","trees_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/statuses/{sha}","languages_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/languages","stargazers_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/stargazers","contributors_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/contributors","subscribers_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/subscribers","subscription_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/subscription","commits_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/commits{/sha}","git_commits_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/git/commits{/sha}","comments_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/comments{/number}","issue_comment_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/issues/comments{/number}","contents_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/contents/{+path}","compare_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/merges","archive_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/downloads","issues_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/issues{/number}","pulls_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/pulls{/number}","milestones_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/milestones{/number}","notifications_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/labels{/name}","releases_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/releases{/id}","deployments_url":"https://api.github.com/repos/Slamdunk/PHP-CS-Fixer/deployments","created_at":"2014-11-13T14:56:30Z","updated_at":"2016-02-15T10:38:35Z","pushed_at":"2018-02-21T09:42:10Z","git_url":"git://github.com/Slamdunk/PHP-CS-Fixer.git","ssh_url":"git@github.com:Slamdunk/PHP-CS-Fixer.git","clone_url":"https://github.com/Slamdunk/PHP-CS-Fixer.git","svn_url":"https://github.com/Slamdunk/PHP-CS-Fixer","homepage":"cs.sensiolabs.org","size":11262,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"FriendsOfPHP:2.2","ref":"2.2","sha":"7ade9cf167c5d247dac87418654db50a20c46f49","user":{"login":"FriendsOfPHP","id":5947812,"avatar_url":"https://avatars0.githubusercontent.com/u/5947812?v=4","gravatar_id":"","url":"https://api.github.com/users/FriendsOfPHP","html_url":"https://github.com/FriendsOfPHP","followers_url":"https://api.github.com/users/FriendsOfPHP/followers","following_url":"https://api.github.com/users/FriendsOfPHP/following{/other_user}","gists_url":"https://api.github.com/users/FriendsOfPHP/gists{/gist_id}","starred_url":"https://api.github.com/users/FriendsOfPHP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FriendsOfPHP/subscriptions","organizations_url":"https://api.github.com/users/FriendsOfPHP/orgs","repos_url":"https://api.github.com/users/FriendsOfPHP/repos","events_url":"https://api.github.com/users/FriendsOfPHP/events{/privacy}","received_events_url":"https://api.github.com/users/FriendsOfPHP/received_events","type":"Organization","site_admin":false},"repo":{"id":4344257,"name":"PHP-CS-Fixer","full_name":"FriendsOfPHP/PHP-CS-Fixer","owner":{"login":"FriendsOfPHP","id":5947812,"avatar_url":"https://avatars0.githubusercontent.com/u/5947812?v=4","gravatar_id":"","url":"https://api.github.com/users/FriendsOfPHP","html_url":"https://github.com/FriendsOfPHP","followers_url":"https://api.github.com/users/FriendsOfPHP/followers","following_url":"https://api.github.com/users/FriendsOfPHP/following{/other_user}","gists_url":"https://api.github.com/users/FriendsOfPHP/gists{/gist_id}","starred_url":"https://api.github.com/users/FriendsOfPHP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FriendsOfPHP/subscriptions","organizations_url":"https://api.github.com/users/FriendsOfPHP/orgs","repos_url":"https://api.github.com/users/FriendsOfPHP/repos","events_url":"https://api.github.com/users/FriendsOfPHP/events{/privacy}","received_events_url":"https://api.github.com/users/FriendsOfPHP/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/FriendsOfPHP/PHP-CS-Fixer","description":"A tool to automatically fix PHP coding standards issues","fork":false,"url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer","forks_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/forks","keys_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/teams","hooks_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/hooks","issue_events_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/events{/number}","events_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/events","assignees_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/assignees{/user}","branches_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/branches{/branch}","tags_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/tags","blobs_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/git/refs{/sha}","trees_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/statuses/{sha}","languages_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/languages","stargazers_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/stargazers","contributors_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/contributors","subscribers_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/subscribers","subscription_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/subscription","commits_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/commits{/sha}","git_commits_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/git/commits{/sha}","comments_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/comments{/number}","issue_comment_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/comments{/number}","contents_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/contents/{+path}","compare_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/merges","archive_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/downloads","issues_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues{/number}","pulls_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/pulls{/number}","milestones_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/milestones{/number}","notifications_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/labels{/name}","releases_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/releases{/id}","deployments_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/deployments","created_at":"2012-05-16T06:42:23Z","updated_at":"2018-02-21T03:45:03Z","pushed_at":"2018-02-21T09:44:12Z","git_url":"git://github.com/FriendsOfPHP/PHP-CS-Fixer.git","ssh_url":"git@github.com:FriendsOfPHP/PHP-CS-Fixer.git","clone_url":"https://github.com/FriendsOfPHP/PHP-CS-Fixer.git","svn_url":"https://github.com/FriendsOfPHP/PHP-CS-Fixer","homepage":"http://cs.sensiolabs.org","size":12341,"stargazers_count":5533,"watchers_count":5533,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":798,"mirror_url":null,"archived":false,"open_issues_count":206,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":798,"open_issues":206,"watchers":5533,"default_branch":"2.10"}},"_links":{"self":{"href":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/pulls/3557"},"html":{"href":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/3557"},"issue":{"href":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/3557"},"comments":{"href":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/3557/comments"},"review_comments":{"href":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/pulls/3557/comments"},"review_comment":{"href":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/pulls/3557/commits"},"statuses":{"href":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/statuses/7581efd48a980d21669318c90285610910c5c9f8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Slamdunk"}}