{"action":"created","comment":{"url":"https://api.github.com/repos/K-Phoen/regis/pulls/comments/66706345","id":66706345,"diff_hunk":"@@ -66,4 +67,23 @@ public function getChanges(): array\n     {\n         return $this->changes;\n     }\n+\n+    public function findPositionForLine(int $line): int\n+    {\n+        $changes = $this->getChanges();\n+\n+        /** @var Change $change */\n+        foreach ($changes as $change) {\n+            $rangeStart = $change->getRangeNewStart() - 1;\n+\n+            /** @var Line $diffLine */","path":"src/Regis/Application/Model/Git/Diff/File.php","position":21,"original_position":21,"commit_id":"0c8769c1cdbd523ecc19e9bcbbf38a1007f0c012","original_commit_id":"0c8769c1cdbd523ecc19e9bcbbf38a1007f0c012","user":{"login":"K-Phoen","id":66958,"avatar_url":"https://avatars.githubusercontent.com/u/66958?v=3","gravatar_id":"","url":"https://api.github.com/users/K-Phoen","html_url":"https://github.com/K-Phoen","followers_url":"https://api.github.com/users/K-Phoen/followers","following_url":"https://api.github.com/users/K-Phoen/following{/other_user}","gists_url":"https://api.github.com/users/K-Phoen/gists{/gist_id}","starred_url":"https://api.github.com/users/K-Phoen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/K-Phoen/subscriptions","organizations_url":"https://api.github.com/users/K-Phoen/orgs","repos_url":"https://api.github.com/users/K-Phoen/repos","events_url":"https://api.github.com/users/K-Phoen/events{/privacy}","received_events_url":"https://api.github.com/users/K-Phoen/received_events","type":"User","site_admin":false},"body":"Avoid using static access to class '\\Regis\\Application\\Inspection\\Exception\\LineNotInDiff' in method 'findPositionForLine'.","created_at":"2016-06-11T14:06:36Z","updated_at":"2016-06-11T14:06:36Z","html_url":"https://github.com/K-Phoen/regis/pull/1#discussion_r66706345","pull_request_url":"https://api.github.com/repos/K-Phoen/regis/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/K-Phoen/regis/pulls/comments/66706345"},"html":{"href":"https://github.com/K-Phoen/regis/pull/1#discussion_r66706345"},"pull_request":{"href":"https://api.github.com/repos/K-Phoen/regis/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/K-Phoen/regis/pulls/1","id":73468501,"html_url":"https://github.com/K-Phoen/regis/pull/1","diff_url":"https://github.com/K-Phoen/regis/pull/1.diff","patch_url":"https://github.com/K-Phoen/regis/pull/1.patch","issue_url":"https://api.github.com/repos/K-Phoen/regis/issues/1","number":1,"state":"open","locked":false,"title":"Start to work on a PHPMD inspection","user":{"login":"K-Phoen","id":66958,"avatar_url":"https://avatars.githubusercontent.com/u/66958?v=3","gravatar_id":"","url":"https://api.github.com/users/K-Phoen","html_url":"https://github.com/K-Phoen","followers_url":"https://api.github.com/users/K-Phoen/followers","following_url":"https://api.github.com/users/K-Phoen/following{/other_user}","gists_url":"https://api.github.com/users/K-Phoen/gists{/gist_id}","starred_url":"https://api.github.com/users/K-Phoen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/K-Phoen/subscriptions","organizations_url":"https://api.github.com/users/K-Phoen/orgs","repos_url":"https://api.github.com/users/K-Phoen/repos","events_url":"https://api.github.com/users/K-Phoen/events{/privacy}","received_events_url":"https://api.github.com/users/K-Phoen/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-11T13:45:42Z","updated_at":"2016-06-11T14:06:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4466837c034e1320f219ffb4dea0b2e3caf62df0","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/K-Phoen/regis/pulls/1/commits","review_comments_url":"https://api.github.com/repos/K-Phoen/regis/pulls/1/comments","review_comment_url":"https://api.github.com/repos/K-Phoen/regis/pulls/comments{/number}","comments_url":"https://api.github.com/repos/K-Phoen/regis/issues/1/comments","statuses_url":"https://api.github.com/repos/K-Phoen/regis/statuses/0c8769c1cdbd523ecc19e9bcbbf38a1007f0c012","head":{"label":"K-Phoen:phpmd-inspection","ref":"phpmd-inspection","sha":"0c8769c1cdbd523ecc19e9bcbbf38a1007f0c012","user":{"login":"K-Phoen","id":66958,"avatar_url":"https://avatars.githubusercontent.com/u/66958?v=3","gravatar_id":"","url":"https://api.github.com/users/K-Phoen","html_url":"https://github.com/K-Phoen","followers_url":"https://api.github.com/users/K-Phoen/followers","following_url":"https://api.github.com/users/K-Phoen/following{/other_user}","gists_url":"https://api.github.com/users/K-Phoen/gists{/gist_id}","starred_url":"https://api.github.com/users/K-Phoen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/K-Phoen/subscriptions","organizations_url":"https://api.github.com/users/K-Phoen/orgs","repos_url":"https://api.github.com/users/K-Phoen/repos","events_url":"https://api.github.com/users/K-Phoen/events{/privacy}","received_events_url":"https://api.github.com/users/K-Phoen/received_events","type":"User","site_admin":false},"repo":{"id":60429423,"name":"regis","full_name":"K-Phoen/regis","owner":{"login":"K-Phoen","id":66958,"avatar_url":"https://avatars.githubusercontent.com/u/66958?v=3","gravatar_id":"","url":"https://api.github.com/users/K-Phoen","html_url":"https://github.com/K-Phoen","followers_url":"https://api.github.com/users/K-Phoen/followers","following_url":"https://api.github.com/users/K-Phoen/following{/other_user}","gists_url":"https://api.github.com/users/K-Phoen/gists{/gist_id}","starred_url":"https://api.github.com/users/K-Phoen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/K-Phoen/subscriptions","organizations_url":"https://api.github.com/users/K-Phoen/orgs","repos_url":"https://api.github.com/users/K-Phoen/repos","events_url":"https://api.github.com/users/K-Phoen/events{/privacy}","received_events_url":"https://api.github.com/users/K-Phoen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/K-Phoen/regis","description":"","fork":false,"url":"https://api.github.com/repos/K-Phoen/regis","forks_url":"https://api.github.com/repos/K-Phoen/regis/forks","keys_url":"https://api.github.com/repos/K-Phoen/regis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/K-Phoen/regis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/K-Phoen/regis/teams","hooks_url":"https://api.github.com/repos/K-Phoen/regis/hooks","issue_events_url":"https://api.github.com/repos/K-Phoen/regis/issues/events{/number}","events_url":"https://api.github.com/repos/K-Phoen/regis/events","assignees_url":"https://api.github.com/repos/K-Phoen/regis/assignees{/user}","branches_url":"https://api.github.com/repos/K-Phoen/regis/branches{/branch}","tags_url":"https://api.github.com/repos/K-Phoen/regis/tags","blobs_url":"https://api.github.com/repos/K-Phoen/regis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/K-Phoen/regis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/K-Phoen/regis/git/refs{/sha}","trees_url":"https://api.github.com/repos/K-Phoen/regis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/K-Phoen/regis/statuses/{sha}","languages_url":"https://api.github.com/repos/K-Phoen/regis/languages","stargazers_url":"https://api.github.com/repos/K-Phoen/regis/stargazers","contributors_url":"https://api.github.com/repos/K-Phoen/regis/contributors","subscribers_url":"https://api.github.com/repos/K-Phoen/regis/subscribers","subscription_url":"https://api.github.com/repos/K-Phoen/regis/subscription","commits_url":"https://api.github.com/repos/K-Phoen/regis/commits{/sha}","git_commits_url":"https://api.github.com/repos/K-Phoen/regis/git/commits{/sha}","comments_url":"https://api.github.com/repos/K-Phoen/regis/comments{/number}","issue_comment_url":"https://api.github.com/repos/K-Phoen/regis/issues/comments{/number}","contents_url":"https://api.github.com/repos/K-Phoen/regis/contents/{+path}","compare_url":"https://api.github.com/repos/K-Phoen/regis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/K-Phoen/regis/merges","archive_url":"https://api.github.com/repos/K-Phoen/regis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/K-Phoen/regis/downloads","issues_url":"https://api.github.com/repos/K-Phoen/regis/issues{/number}","pulls_url":"https://api.github.com/repos/K-Phoen/regis/pulls{/number}","milestones_url":"https://api.github.com/repos/K-Phoen/regis/milestones{/number}","notifications_url":"https://api.github.com/repos/K-Phoen/regis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/K-Phoen/regis/labels{/name}","releases_url":"https://api.github.com/repos/K-Phoen/regis/releases{/id}","deployments_url":"https://api.github.com/repos/K-Phoen/regis/deployments","created_at":"2016-06-04T20:40:51Z","updated_at":"2016-06-04T20:41:42Z","pushed_at":"2016-06-11T13:45:42Z","git_url":"git://github.com/K-Phoen/regis.git","ssh_url":"git@github.com:K-Phoen/regis.git","clone_url":"https://github.com/K-Phoen/regis.git","svn_url":"https://github.com/K-Phoen/regis","homepage":null,"size":163,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"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":"K-Phoen:master","ref":"master","sha":"91e41e893ce495596160638427d365819078b950","user":{"login":"K-Phoen","id":66958,"avatar_url":"https://avatars.githubusercontent.com/u/66958?v=3","gravatar_id":"","url":"https://api.github.com/users/K-Phoen","html_url":"https://github.com/K-Phoen","followers_url":"https://api.github.com/users/K-Phoen/followers","following_url":"https://api.github.com/users/K-Phoen/following{/other_user}","gists_url":"https://api.github.com/users/K-Phoen/gists{/gist_id}","starred_url":"https://api.github.com/users/K-Phoen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/K-Phoen/subscriptions","organizations_url":"https://api.github.com/users/K-Phoen/orgs","repos_url":"https://api.github.com/users/K-Phoen/repos","events_url":"https://api.github.com/users/K-Phoen/events{/privacy}","received_events_url":"https://api.github.com/users/K-Phoen/received_events","type":"User","site_admin":false},"repo":{"id":60429423,"name":"regis","full_name":"K-Phoen/regis","owner":{"login":"K-Phoen","id":66958,"avatar_url":"https://avatars.githubusercontent.com/u/66958?v=3","gravatar_id":"","url":"https://api.github.com/users/K-Phoen","html_url":"https://github.com/K-Phoen","followers_url":"https://api.github.com/users/K-Phoen/followers","following_url":"https://api.github.com/users/K-Phoen/following{/other_user}","gists_url":"https://api.github.com/users/K-Phoen/gists{/gist_id}","starred_url":"https://api.github.com/users/K-Phoen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/K-Phoen/subscriptions","organizations_url":"https://api.github.com/users/K-Phoen/orgs","repos_url":"https://api.github.com/users/K-Phoen/repos","events_url":"https://api.github.com/users/K-Phoen/events{/privacy}","received_events_url":"https://api.github.com/users/K-Phoen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/K-Phoen/regis","description":"","fork":false,"url":"https://api.github.com/repos/K-Phoen/regis","forks_url":"https://api.github.com/repos/K-Phoen/regis/forks","keys_url":"https://api.github.com/repos/K-Phoen/regis/keys{/key_id}","collaborators_url":"https://api.github.com/repos/K-Phoen/regis/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/K-Phoen/regis/teams","hooks_url":"https://api.github.com/repos/K-Phoen/regis/hooks","issue_events_url":"https://api.github.com/repos/K-Phoen/regis/issues/events{/number}","events_url":"https://api.github.com/repos/K-Phoen/regis/events","assignees_url":"https://api.github.com/repos/K-Phoen/regis/assignees{/user}","branches_url":"https://api.github.com/repos/K-Phoen/regis/branches{/branch}","tags_url":"https://api.github.com/repos/K-Phoen/regis/tags","blobs_url":"https://api.github.com/repos/K-Phoen/regis/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/K-Phoen/regis/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/K-Phoen/regis/git/refs{/sha}","trees_url":"https://api.github.com/repos/K-Phoen/regis/git/trees{/sha}","statuses_url":"https://api.github.com/repos/K-Phoen/regis/statuses/{sha}","languages_url":"https://api.github.com/repos/K-Phoen/regis/languages","stargazers_url":"https://api.github.com/repos/K-Phoen/regis/stargazers","contributors_url":"https://api.github.com/repos/K-Phoen/regis/contributors","subscribers_url":"https://api.github.com/repos/K-Phoen/regis/subscribers","subscription_url":"https://api.github.com/repos/K-Phoen/regis/subscription","commits_url":"https://api.github.com/repos/K-Phoen/regis/commits{/sha}","git_commits_url":"https://api.github.com/repos/K-Phoen/regis/git/commits{/sha}","comments_url":"https://api.github.com/repos/K-Phoen/regis/comments{/number}","issue_comment_url":"https://api.github.com/repos/K-Phoen/regis/issues/comments{/number}","contents_url":"https://api.github.com/repos/K-Phoen/regis/contents/{+path}","compare_url":"https://api.github.com/repos/K-Phoen/regis/compare/{base}...{head}","merges_url":"https://api.github.com/repos/K-Phoen/regis/merges","archive_url":"https://api.github.com/repos/K-Phoen/regis/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/K-Phoen/regis/downloads","issues_url":"https://api.github.com/repos/K-Phoen/regis/issues{/number}","pulls_url":"https://api.github.com/repos/K-Phoen/regis/pulls{/number}","milestones_url":"https://api.github.com/repos/K-Phoen/regis/milestones{/number}","notifications_url":"https://api.github.com/repos/K-Phoen/regis/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/K-Phoen/regis/labels{/name}","releases_url":"https://api.github.com/repos/K-Phoen/regis/releases{/id}","deployments_url":"https://api.github.com/repos/K-Phoen/regis/deployments","created_at":"2016-06-04T20:40:51Z","updated_at":"2016-06-04T20:41:42Z","pushed_at":"2016-06-11T13:45:42Z","git_url":"git://github.com/K-Phoen/regis.git","ssh_url":"git@github.com:K-Phoen/regis.git","clone_url":"https://github.com/K-Phoen/regis.git","svn_url":"https://github.com/K-Phoen/regis","homepage":null,"size":163,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"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"}},"_links":{"self":{"href":"https://api.github.com/repos/K-Phoen/regis/pulls/1"},"html":{"href":"https://github.com/K-Phoen/regis/pull/1"},"issue":{"href":"https://api.github.com/repos/K-Phoen/regis/issues/1"},"comments":{"href":"https://api.github.com/repos/K-Phoen/regis/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/K-Phoen/regis/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/K-Phoen/regis/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/K-Phoen/regis/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/K-Phoen/regis/statuses/0c8769c1cdbd523ecc19e9bcbbf38a1007f0c012"}}}}
{"actor":{"display_login":"K-Phoen"}}