{"action":"created","comment":{"url":"https://api.github.com/repos/ovr/phpsa/pulls/comments/78948104","id":78948104,"diff_hunk":"@@ -0,0 +1,78 @@\n+<?php\n+/**\n+ * @author Kévin Gomez https://github.com/K-Phoen <contact@kevingomez.fr>\n+ */\n+\n+namespace PHPSA\\Analyzer\\Pass\\Expression;\n+\n+use PhpParser\\Node\\Expr;\n+use PhpParser\\Node\\Scalar;\n+use PHPSA\\Analyzer\\Pass;\n+use PHPSA\\Context;\n+use Symfony\\Component\\Config\\Definition\\Builder\\TreeBuilder;\n+\n+class ArrayDuplicateKeys implements Pass\\AnalyzerPassInterface, Pass\\ConfigurablePassInterface\n+{\n+    /**\n+     * @param Expr\\Array_ $expr\n+     * @param Context $context\n+     * @return bool\n+     */\n+    public function pass(Expr\\Array_ $expr, Context $context)\n+    {\n+        $result = false;\n+        $keys = [];\n+\n+        /** @var Expr\\ArrayItem $item */\n+        foreach ($expr->items as $item) {\n+            $compiledKey = $context->getExpressionCompiler()->compile($item->key);\n+","path":"src/Analyzer/Pass/Expression/ArrayDuplicateKeys.php","position":29,"original_position":29,"commit_id":"f39fe099579d31da5fdd9314406be859a67796b9","original_commit_id":"f39fe099579d31da5fdd9314406be859a67796b9","user":{"login":"ovr","id":572096,"avatar_url":"https://avatars.githubusercontent.com/u/572096?v=3","gravatar_id":"","url":"https://api.github.com/users/ovr","html_url":"https://github.com/ovr","followers_url":"https://api.github.com/users/ovr/followers","following_url":"https://api.github.com/users/ovr/following{/other_user}","gists_url":"https://api.github.com/users/ovr/gists{/gist_id}","starred_url":"https://api.github.com/users/ovr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ovr/subscriptions","organizations_url":"https://api.github.com/users/ovr/orgs","repos_url":"https://api.github.com/users/ovr/repos","events_url":"https://api.github.com/users/ovr/events{/privacy}","received_events_url":"https://api.github.com/users/ovr/received_events","type":"User","site_admin":false},"body":"This space line is not needed","created_at":"2016-09-15T12:08:19Z","updated_at":"2016-09-15T12:08:19Z","html_url":"https://github.com/ovr/phpsa/pull/86#discussion_r78948104","pull_request_url":"https://api.github.com/repos/ovr/phpsa/pulls/86","_links":{"self":{"href":"https://api.github.com/repos/ovr/phpsa/pulls/comments/78948104"},"html":{"href":"https://github.com/ovr/phpsa/pull/86#discussion_r78948104"},"pull_request":{"href":"https://api.github.com/repos/ovr/phpsa/pulls/86"}}},"pull_request":{"url":"https://api.github.com/repos/ovr/phpsa/pulls/86","id":83925070,"html_url":"https://github.com/ovr/phpsa/pull/86","diff_url":"https://github.com/ovr/phpsa/pull/86.diff","patch_url":"https://github.com/ovr/phpsa/pull/86.patch","issue_url":"https://api.github.com/repos/ovr/phpsa/issues/86","number":86,"state":"open","locked":false,"title":"Detect duplicate array keys on array creation","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":"As described in #67","created_at":"2016-09-04T14:58:04Z","updated_at":"2016-09-15T12:12:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d60730066952b0cd5c6620957714b99b60dd692e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ovr/phpsa/pulls/86/commits","review_comments_url":"https://api.github.com/repos/ovr/phpsa/pulls/86/comments","review_comment_url":"https://api.github.com/repos/ovr/phpsa/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ovr/phpsa/issues/86/comments","statuses_url":"https://api.github.com/repos/ovr/phpsa/statuses/f39fe099579d31da5fdd9314406be859a67796b9","head":{"label":"K-Phoen:array-duplicate-keys-init","ref":"array-duplicate-keys-init","sha":"f39fe099579d31da5fdd9314406be859a67796b9","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":67347306,"name":"phpsa","full_name":"K-Phoen/phpsa","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/phpsa","description":"Smart Analysis for PHP :bowtie::neckbeard:","fork":true,"url":"https://api.github.com/repos/K-Phoen/phpsa","forks_url":"https://api.github.com/repos/K-Phoen/phpsa/forks","keys_url":"https://api.github.com/repos/K-Phoen/phpsa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/K-Phoen/phpsa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/K-Phoen/phpsa/teams","hooks_url":"https://api.github.com/repos/K-Phoen/phpsa/hooks","issue_events_url":"https://api.github.com/repos/K-Phoen/phpsa/issues/events{/number}","events_url":"https://api.github.com/repos/K-Phoen/phpsa/events","assignees_url":"https://api.github.com/repos/K-Phoen/phpsa/assignees{/user}","branches_url":"https://api.github.com/repos/K-Phoen/phpsa/branches{/branch}","tags_url":"https://api.github.com/repos/K-Phoen/phpsa/tags","blobs_url":"https://api.github.com/repos/K-Phoen/phpsa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/K-Phoen/phpsa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/K-Phoen/phpsa/git/refs{/sha}","trees_url":"https://api.github.com/repos/K-Phoen/phpsa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/K-Phoen/phpsa/statuses/{sha}","languages_url":"https://api.github.com/repos/K-Phoen/phpsa/languages","stargazers_url":"https://api.github.com/repos/K-Phoen/phpsa/stargazers","contributors_url":"https://api.github.com/repos/K-Phoen/phpsa/contributors","subscribers_url":"https://api.github.com/repos/K-Phoen/phpsa/subscribers","subscription_url":"https://api.github.com/repos/K-Phoen/phpsa/subscription","commits_url":"https://api.github.com/repos/K-Phoen/phpsa/commits{/sha}","git_commits_url":"https://api.github.com/repos/K-Phoen/phpsa/git/commits{/sha}","comments_url":"https://api.github.com/repos/K-Phoen/phpsa/comments{/number}","issue_comment_url":"https://api.github.com/repos/K-Phoen/phpsa/issues/comments{/number}","contents_url":"https://api.github.com/repos/K-Phoen/phpsa/contents/{+path}","compare_url":"https://api.github.com/repos/K-Phoen/phpsa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/K-Phoen/phpsa/merges","archive_url":"https://api.github.com/repos/K-Phoen/phpsa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/K-Phoen/phpsa/downloads","issues_url":"https://api.github.com/repos/K-Phoen/phpsa/issues{/number}","pulls_url":"https://api.github.com/repos/K-Phoen/phpsa/pulls{/number}","milestones_url":"https://api.github.com/repos/K-Phoen/phpsa/milestones{/number}","notifications_url":"https://api.github.com/repos/K-Phoen/phpsa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/K-Phoen/phpsa/labels{/name}","releases_url":"https://api.github.com/repos/K-Phoen/phpsa/releases{/id}","deployments_url":"https://api.github.com/repos/K-Phoen/phpsa/deployments","created_at":"2016-09-04T13:47:36Z","updated_at":"2016-09-06T07:38:52Z","pushed_at":"2016-09-15T11:28:14Z","git_url":"git://github.com/K-Phoen/phpsa.git","ssh_url":"git@github.com:K-Phoen/phpsa.git","clone_url":"https://github.com/K-Phoen/phpsa.git","svn_url":"https://github.com/K-Phoen/phpsa","homepage":"https://phpsa.dmtry.me/","size":1005,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"ovr:master","ref":"master","sha":"90421bfe950ed0249d8e8ad9981401361f64fdbd","user":{"login":"ovr","id":572096,"avatar_url":"https://avatars.githubusercontent.com/u/572096?v=3","gravatar_id":"","url":"https://api.github.com/users/ovr","html_url":"https://github.com/ovr","followers_url":"https://api.github.com/users/ovr/followers","following_url":"https://api.github.com/users/ovr/following{/other_user}","gists_url":"https://api.github.com/users/ovr/gists{/gist_id}","starred_url":"https://api.github.com/users/ovr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ovr/subscriptions","organizations_url":"https://api.github.com/users/ovr/orgs","repos_url":"https://api.github.com/users/ovr/repos","events_url":"https://api.github.com/users/ovr/events{/privacy}","received_events_url":"https://api.github.com/users/ovr/received_events","type":"User","site_admin":false},"repo":{"id":37760247,"name":"phpsa","full_name":"ovr/phpsa","owner":{"login":"ovr","id":572096,"avatar_url":"https://avatars.githubusercontent.com/u/572096?v=3","gravatar_id":"","url":"https://api.github.com/users/ovr","html_url":"https://github.com/ovr","followers_url":"https://api.github.com/users/ovr/followers","following_url":"https://api.github.com/users/ovr/following{/other_user}","gists_url":"https://api.github.com/users/ovr/gists{/gist_id}","starred_url":"https://api.github.com/users/ovr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ovr/subscriptions","organizations_url":"https://api.github.com/users/ovr/orgs","repos_url":"https://api.github.com/users/ovr/repos","events_url":"https://api.github.com/users/ovr/events{/privacy}","received_events_url":"https://api.github.com/users/ovr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ovr/phpsa","description":"Smart Analysis for PHP :bowtie::neckbeard:","fork":false,"url":"https://api.github.com/repos/ovr/phpsa","forks_url":"https://api.github.com/repos/ovr/phpsa/forks","keys_url":"https://api.github.com/repos/ovr/phpsa/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ovr/phpsa/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ovr/phpsa/teams","hooks_url":"https://api.github.com/repos/ovr/phpsa/hooks","issue_events_url":"https://api.github.com/repos/ovr/phpsa/issues/events{/number}","events_url":"https://api.github.com/repos/ovr/phpsa/events","assignees_url":"https://api.github.com/repos/ovr/phpsa/assignees{/user}","branches_url":"https://api.github.com/repos/ovr/phpsa/branches{/branch}","tags_url":"https://api.github.com/repos/ovr/phpsa/tags","blobs_url":"https://api.github.com/repos/ovr/phpsa/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ovr/phpsa/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ovr/phpsa/git/refs{/sha}","trees_url":"https://api.github.com/repos/ovr/phpsa/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ovr/phpsa/statuses/{sha}","languages_url":"https://api.github.com/repos/ovr/phpsa/languages","stargazers_url":"https://api.github.com/repos/ovr/phpsa/stargazers","contributors_url":"https://api.github.com/repos/ovr/phpsa/contributors","subscribers_url":"https://api.github.com/repos/ovr/phpsa/subscribers","subscription_url":"https://api.github.com/repos/ovr/phpsa/subscription","commits_url":"https://api.github.com/repos/ovr/phpsa/commits{/sha}","git_commits_url":"https://api.github.com/repos/ovr/phpsa/git/commits{/sha}","comments_url":"https://api.github.com/repos/ovr/phpsa/comments{/number}","issue_comment_url":"https://api.github.com/repos/ovr/phpsa/issues/comments{/number}","contents_url":"https://api.github.com/repos/ovr/phpsa/contents/{+path}","compare_url":"https://api.github.com/repos/ovr/phpsa/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ovr/phpsa/merges","archive_url":"https://api.github.com/repos/ovr/phpsa/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ovr/phpsa/downloads","issues_url":"https://api.github.com/repos/ovr/phpsa/issues{/number}","pulls_url":"https://api.github.com/repos/ovr/phpsa/pulls{/number}","milestones_url":"https://api.github.com/repos/ovr/phpsa/milestones{/number}","notifications_url":"https://api.github.com/repos/ovr/phpsa/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ovr/phpsa/labels{/name}","releases_url":"https://api.github.com/repos/ovr/phpsa/releases{/id}","deployments_url":"https://api.github.com/repos/ovr/phpsa/deployments","created_at":"2015-06-20T06:24:46Z","updated_at":"2016-09-14T18:48:32Z","pushed_at":"2016-09-15T11:28:14Z","git_url":"git://github.com/ovr/phpsa.git","ssh_url":"git@github.com:ovr/phpsa.git","clone_url":"https://github.com/ovr/phpsa.git","svn_url":"https://github.com/ovr/phpsa","homepage":"https://phpsa.dmtry.me/","size":1083,"stargazers_count":487,"watchers_count":487,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":54,"forks":16,"open_issues":54,"watchers":487,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ovr/phpsa/pulls/86"},"html":{"href":"https://github.com/ovr/phpsa/pull/86"},"issue":{"href":"https://api.github.com/repos/ovr/phpsa/issues/86"},"comments":{"href":"https://api.github.com/repos/ovr/phpsa/issues/86/comments"},"review_comments":{"href":"https://api.github.com/repos/ovr/phpsa/pulls/86/comments"},"review_comment":{"href":"https://api.github.com/repos/ovr/phpsa/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ovr/phpsa/pulls/86/commits"},"statuses":{"href":"https://api.github.com/repos/ovr/phpsa/statuses/f39fe099579d31da5fdd9314406be859a67796b9"}}}}
{"actor":{"display_login":"ovr"}}