{"action":"created","comment":{"url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/pulls/comments/46097164","id":46097164,"diff_hunk":"@@ -156,6 +159,42 @@ private function fixSpaceAboveMethod(Tokens $tokens, $classStart, $methodIndex)\n             }\n         }\n \n+        // deal with comments above a method\n+        if ($tokens[$nonWhiteAbove]->isGivenKind(T_COMMENT)) {\n+            if ($firstMethodAttrIndex - $nonWhiteAbove === 1) {\n+                // no white space found between comment and method start\n+                $this->correctLineBreaks($tokens, $nonWhiteAbove, $firstMethodAttrIndex, 1);\n+\n+                return;\n+            }\n+\n+            // $tokens[$nonWhiteAbove+1] is always a white space token here\n+            $lineBreakCount = substr_count($tokens[$nonWhiteAbove + 1]->getContent(), \"\\n\");\n+            if ($lineBreakCount > 1) {\n+                // more than one line break, always bring it back to 2 line breaks between the method start and what is above it\n+                $this->correctLineBreaks($tokens, $nonWhiteAbove, $firstMethodAttrIndex, 2);\n+\n+                return;","path":"Symfony/CS/Fixer/Symfony/MethodSeparationFixer.php","position":40,"original_position":40,"commit_id":"a2ef991856ae8529246651dc6a05b592a105ea3b","original_commit_id":"a2ef991856ae8529246651dc6a05b592a105ea3b","user":{"login":"GrahamCampbell","id":2829600,"avatar_url":"https://avatars.githubusercontent.com/u/2829600?v=3","gravatar_id":"","url":"https://api.github.com/users/GrahamCampbell","html_url":"https://github.com/GrahamCampbell","followers_url":"https://api.github.com/users/GrahamCampbell/followers","following_url":"https://api.github.com/users/GrahamCampbell/following{/other_user}","gists_url":"https://api.github.com/users/GrahamCampbell/gists{/gist_id}","starred_url":"https://api.github.com/users/GrahamCampbell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GrahamCampbell/subscriptions","organizations_url":"https://api.github.com/users/GrahamCampbell/orgs","repos_url":"https://api.github.com/users/GrahamCampbell/repos","events_url":"https://api.github.com/users/GrahamCampbell/events{/privacy}","received_events_url":"https://api.github.com/users/GrahamCampbell/received_events","type":"User","site_admin":false},"body":"No need for that else.","created_at":"2015-11-29T20:04:28Z","updated_at":"2015-11-29T20:04:28Z","html_url":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1426#discussion_r46097164","pull_request_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/pulls/1426","_links":{"self":{"href":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/pulls/comments/46097164"},"html":{"href":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1426#discussion_r46097164"},"pull_request":{"href":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/pulls/1426"}}},"pull_request":{"url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/pulls/1426","id":46109855,"html_url":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1426","diff_url":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1426.diff","patch_url":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1426.patch","issue_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/1426","number":1426,"state":"open","locked":false,"title":"[feature/rfc] Method separation fixer comments support (Master #1421)","user":{"login":"SpacePossum","id":10462973,"avatar_url":"https://avatars.githubusercontent.com/u/10462973?v=3","gravatar_id":"","url":"https://api.github.com/users/SpacePossum","html_url":"https://github.com/SpacePossum","followers_url":"https://api.github.com/users/SpacePossum/followers","following_url":"https://api.github.com/users/SpacePossum/following{/other_user}","gists_url":"https://api.github.com/users/SpacePossum/gists{/gist_id}","starred_url":"https://api.github.com/users/SpacePossum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpacePossum/subscriptions","organizations_url":"https://api.github.com/users/SpacePossum/orgs","repos_url":"https://api.github.com/users/SpacePossum/repos","events_url":"https://api.github.com/users/SpacePossum/events{/privacy}","received_events_url":"https://api.github.com/users/SpacePossum/received_events","type":"User","site_admin":false},"body":"RFC, at see: https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/1421 after https://github.com/symfony/symfony/pull/15890\r\n\r\nTargeting master because the fixer does not exists in the 1.x branches.","created_at":"2015-09-27T21:58:50Z","updated_at":"2015-11-29T20:04:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5d34eb2c2ce3f79b4fdaba9071c63fa5506f6165","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/pulls/1426/commits","review_comments_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/pulls/1426/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/1426/comments","statuses_url":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/statuses/a2ef991856ae8529246651dc6a05b592a105ea3b","head":{"label":"SpacePossum:master_1421_method_separation_tweaks","ref":"master_1421_method_separation_tweaks","sha":"a2ef991856ae8529246651dc6a05b592a105ea3b","user":{"login":"SpacePossum","id":10462973,"avatar_url":"https://avatars.githubusercontent.com/u/10462973?v=3","gravatar_id":"","url":"https://api.github.com/users/SpacePossum","html_url":"https://github.com/SpacePossum","followers_url":"https://api.github.com/users/SpacePossum/followers","following_url":"https://api.github.com/users/SpacePossum/following{/other_user}","gists_url":"https://api.github.com/users/SpacePossum/gists{/gist_id}","starred_url":"https://api.github.com/users/SpacePossum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpacePossum/subscriptions","organizations_url":"https://api.github.com/users/SpacePossum/orgs","repos_url":"https://api.github.com/users/SpacePossum/repos","events_url":"https://api.github.com/users/SpacePossum/events{/privacy}","received_events_url":"https://api.github.com/users/SpacePossum/received_events","type":"User","site_admin":false},"repo":{"id":29018102,"name":"PHP-CS-Fixer","full_name":"SpacePossum/PHP-CS-Fixer","owner":{"login":"SpacePossum","id":10462973,"avatar_url":"https://avatars.githubusercontent.com/u/10462973?v=3","gravatar_id":"","url":"https://api.github.com/users/SpacePossum","html_url":"https://github.com/SpacePossum","followers_url":"https://api.github.com/users/SpacePossum/followers","following_url":"https://api.github.com/users/SpacePossum/following{/other_user}","gists_url":"https://api.github.com/users/SpacePossum/gists{/gist_id}","starred_url":"https://api.github.com/users/SpacePossum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SpacePossum/subscriptions","organizations_url":"https://api.github.com/users/SpacePossum/orgs","repos_url":"https://api.github.com/users/SpacePossum/repos","events_url":"https://api.github.com/users/SpacePossum/events{/privacy}","received_events_url":"https://api.github.com/users/SpacePossum/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/SpacePossum/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/SpacePossum/PHP-CS-Fixer","forks_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/forks","keys_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/teams","hooks_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/hooks","issue_events_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/issues/events{/number}","events_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/events","assignees_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/assignees{/user}","branches_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/branches{/branch}","tags_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/tags","blobs_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/git/refs{/sha}","trees_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/statuses/{sha}","languages_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/languages","stargazers_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/stargazers","contributors_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/contributors","subscribers_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/subscribers","subscription_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/subscription","commits_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/commits{/sha}","git_commits_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/git/commits{/sha}","comments_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/comments{/number}","issue_comment_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/issues/comments{/number}","contents_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/contents/{+path}","compare_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/merges","archive_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/downloads","issues_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/issues{/number}","pulls_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/pulls{/number}","milestones_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/milestones{/number}","notifications_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/labels{/name}","releases_url":"https://api.github.com/repos/SpacePossum/PHP-CS-Fixer/releases{/id}","created_at":"2015-01-09T13:46:11Z","updated_at":"2015-04-14T09:59:34Z","pushed_at":"2015-11-29T18:26:57Z","git_url":"git://github.com/SpacePossum/PHP-CS-Fixer.git","ssh_url":"git@github.com:SpacePossum/PHP-CS-Fixer.git","clone_url":"https://github.com/SpacePossum/PHP-CS-Fixer.git","svn_url":"https://github.com/SpacePossum/PHP-CS-Fixer","homepage":"cs.sensiolabs.org","size":3674,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"FriendsOfPHP:master","ref":"master","sha":"2b605ba045bbeaacc2c305b644707f0be861104f","user":{"login":"FriendsOfPHP","id":5947812,"avatar_url":"https://avatars.githubusercontent.com/u/5947812?v=3","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://avatars.githubusercontent.com/u/5947812?v=3","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":"Analyzes some PHP source code and tries to fix coding standards issues (PSR-1 and PSR-2 compatible)","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}","created_at":"2012-05-16T06:42:23Z","updated_at":"2015-11-29T19:05:12Z","pushed_at":"2015-11-29T19:57:52Z","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":"cs.sensiolabs.org","size":6546,"stargazers_count":2714,"watchers_count":2714,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":431,"mirror_url":null,"open_issues_count":88,"forks":431,"open_issues":88,"watchers":2714,"default_branch":"1.11"}},"_links":{"self":{"href":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/pulls/1426"},"html":{"href":"https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1426"},"issue":{"href":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/1426"},"comments":{"href":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/issues/1426/comments"},"review_comments":{"href":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/pulls/1426/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/1426/commits"},"statuses":{"href":"https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/statuses/a2ef991856ae8529246651dc6a05b592a105ea3b"}}}}