{"action":"created","comment":{"url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/pulls/comments/132210225","pull_request_review_id":55265882,"id":132210225,"diff_hunk":"@@ -0,0 +1,72 @@\n+<?php\n+\n+/*\n+ * This file is part of the Integrated package.\n+ *\n+ * (c) e-Active B.V. <integrated@e-active.nl>\n+ *\n+ * For the full copyright and license information, please view the LICENSE\n+ * file that was distributed with this source code.\n+ */\n+\n+namespace Integrated\\Bundle\\PollBundle\\Form\\Type;\n+\n+use Integrated\\Bundle\\PollBundle\\Document\\Embedded\\Option;\n+use Integrated\\Bundle\\PollBundle\\Document\\Poll;\n+\n+use Symfony\\Component\\Form\\AbstractType;\n+use Symfony\\Component\\Form\\Extension\\Core\\Type\\ChoiceType;\n+use Symfony\\Component\\Form\\FormBuilderInterface;\n+use Symfony\\Component\\OptionsResolver\\OptionsResolver;\n+\n+/**\n+ * @author Michael Jongman <michael@e-active.nl>\n+ */\n+class PollType extends AbstractType\n+{\n+    /**\n+     * {@inheritdoc}\n+     */\n+    public function buildForm(FormBuilderInterface $builder, array $options)\n+    {\n+        /** @var Poll $poll */\n+        $poll = $options['poll'];\n+\n+        $choices = [];\n+        /** @var Option $option */\n+        foreach ($poll->getOptions() as $option) {\n+            $choices[$option->getName()] = $option->getName();\n+        }\n+\n+        $choices = array_filter($choices, function ($value) {","path":"Form/Type/PollType.php","position":41,"original_position":41,"commit_id":"0663cc1864231f8d64a36fe4b280a9f6e668505a","original_commit_id":"0663cc1864231f8d64a36fe4b280a9f6e668505a","user":{"login":"psat01","id":27204171,"avatar_url":"https://avatars3.githubusercontent.com/u/27204171?v=4","gravatar_id":"","url":"https://api.github.com/users/psat01","html_url":"https://github.com/psat01","followers_url":"https://api.github.com/users/psat01/followers","following_url":"https://api.github.com/users/psat01/following{/other_user}","gists_url":"https://api.github.com/users/psat01/gists{/gist_id}","starred_url":"https://api.github.com/users/psat01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/psat01/subscriptions","organizations_url":"https://api.github.com/users/psat01/orgs","repos_url":"https://api.github.com/users/psat01/repos","events_url":"https://api.github.com/users/psat01/events{/privacy}","received_events_url":"https://api.github.com/users/psat01/received_events","type":"User","site_admin":false},"body":"`$choices = array_filter($choices);` will do the same and is shorter :)\r\n","created_at":"2017-08-09T15:00:07Z","updated_at":"2017-08-09T15:00:07Z","html_url":"https://github.com/integratedfordevelopers/integrated-poll-bundle/pull/2#discussion_r132210225","pull_request_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/pulls/comments/132210225"},"html":{"href":"https://github.com/integratedfordevelopers/integrated-poll-bundle/pull/2#discussion_r132210225"},"pull_request":{"href":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/pulls/2","id":134890867,"html_url":"https://github.com/integratedfordevelopers/integrated-poll-bundle/pull/2","diff_url":"https://github.com/integratedfordevelopers/integrated-poll-bundle/pull/2.diff","patch_url":"https://github.com/integratedfordevelopers/integrated-poll-bundle/pull/2.patch","issue_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/issues/2","number":2,"state":"open","locked":false,"title":"INTEGRATED-1222 - Added Poll Block to the front end with the latest p…","user":{"login":"pappi1987","id":3527242,"avatar_url":"https://avatars2.githubusercontent.com/u/3527242?v=4","gravatar_id":"","url":"https://api.github.com/users/pappi1987","html_url":"https://github.com/pappi1987","followers_url":"https://api.github.com/users/pappi1987/followers","following_url":"https://api.github.com/users/pappi1987/following{/other_user}","gists_url":"https://api.github.com/users/pappi1987/gists{/gist_id}","starred_url":"https://api.github.com/users/pappi1987/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pappi1987/subscriptions","organizations_url":"https://api.github.com/users/pappi1987/orgs","repos_url":"https://api.github.com/users/pappi1987/repos","events_url":"https://api.github.com/users/pappi1987/events{/privacy}","received_events_url":"https://api.github.com/users/pappi1987/received_events","type":"User","site_admin":false},"body":"…oll.","created_at":"2017-08-09T13:19:54Z","updated_at":"2017-08-09T15:00:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f75ed57fc899b1e3d6b6907fe22481b8899b9b9d","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/pulls/2/commits","review_comments_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/pulls/2/comments","review_comment_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/issues/2/comments","statuses_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/statuses/0663cc1864231f8d64a36fe4b280a9f6e668505a","head":{"label":"integratedfordevelopers:INTEGRATED-1222-poll-bundle-block","ref":"INTEGRATED-1222-poll-bundle-block","sha":"0663cc1864231f8d64a36fe4b280a9f6e668505a","user":{"login":"integratedfordevelopers","id":16450317,"avatar_url":"https://avatars1.githubusercontent.com/u/16450317?v=4","gravatar_id":"","url":"https://api.github.com/users/integratedfordevelopers","html_url":"https://github.com/integratedfordevelopers","followers_url":"https://api.github.com/users/integratedfordevelopers/followers","following_url":"https://api.github.com/users/integratedfordevelopers/following{/other_user}","gists_url":"https://api.github.com/users/integratedfordevelopers/gists{/gist_id}","starred_url":"https://api.github.com/users/integratedfordevelopers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/integratedfordevelopers/subscriptions","organizations_url":"https://api.github.com/users/integratedfordevelopers/orgs","repos_url":"https://api.github.com/users/integratedfordevelopers/repos","events_url":"https://api.github.com/users/integratedfordevelopers/events{/privacy}","received_events_url":"https://api.github.com/users/integratedfordevelopers/received_events","type":"Organization","site_admin":false},"repo":{"id":99342060,"name":"integrated-poll-bundle","full_name":"integratedfordevelopers/integrated-poll-bundle","owner":{"login":"integratedfordevelopers","id":16450317,"avatar_url":"https://avatars1.githubusercontent.com/u/16450317?v=4","gravatar_id":"","url":"https://api.github.com/users/integratedfordevelopers","html_url":"https://github.com/integratedfordevelopers","followers_url":"https://api.github.com/users/integratedfordevelopers/followers","following_url":"https://api.github.com/users/integratedfordevelopers/following{/other_user}","gists_url":"https://api.github.com/users/integratedfordevelopers/gists{/gist_id}","starred_url":"https://api.github.com/users/integratedfordevelopers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/integratedfordevelopers/subscriptions","organizations_url":"https://api.github.com/users/integratedfordevelopers/orgs","repos_url":"https://api.github.com/users/integratedfordevelopers/repos","events_url":"https://api.github.com/users/integratedfordevelopers/events{/privacy}","received_events_url":"https://api.github.com/users/integratedfordevelopers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/integratedfordevelopers/integrated-poll-bundle","description":null,"fork":false,"url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle","forks_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/forks","keys_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/teams","hooks_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/hooks","issue_events_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/issues/events{/number}","events_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/events","assignees_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/assignees{/user}","branches_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/branches{/branch}","tags_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/tags","blobs_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/statuses/{sha}","languages_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/languages","stargazers_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/stargazers","contributors_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/contributors","subscribers_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/subscribers","subscription_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/subscription","commits_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/contents/{+path}","compare_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/merges","archive_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/downloads","issues_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/issues{/number}","pulls_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/pulls{/number}","milestones_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/milestones{/number}","notifications_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/labels{/name}","releases_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/releases{/id}","deployments_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/deployments","created_at":"2017-08-04T12:46:03Z","updated_at":"2017-08-04T12:46:03Z","pushed_at":"2017-08-09T13:22:08Z","git_url":"git://github.com/integratedfordevelopers/integrated-poll-bundle.git","ssh_url":"git@github.com:integratedfordevelopers/integrated-poll-bundle.git","clone_url":"https://github.com/integratedfordevelopers/integrated-poll-bundle.git","svn_url":"https://github.com/integratedfordevelopers/integrated-poll-bundle","homepage":null,"size":1326,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"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":"integratedfordevelopers:0.7","ref":"0.7","sha":"31258cc4d09d1e421317e3f1e7ac11208dabeac1","user":{"login":"integratedfordevelopers","id":16450317,"avatar_url":"https://avatars1.githubusercontent.com/u/16450317?v=4","gravatar_id":"","url":"https://api.github.com/users/integratedfordevelopers","html_url":"https://github.com/integratedfordevelopers","followers_url":"https://api.github.com/users/integratedfordevelopers/followers","following_url":"https://api.github.com/users/integratedfordevelopers/following{/other_user}","gists_url":"https://api.github.com/users/integratedfordevelopers/gists{/gist_id}","starred_url":"https://api.github.com/users/integratedfordevelopers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/integratedfordevelopers/subscriptions","organizations_url":"https://api.github.com/users/integratedfordevelopers/orgs","repos_url":"https://api.github.com/users/integratedfordevelopers/repos","events_url":"https://api.github.com/users/integratedfordevelopers/events{/privacy}","received_events_url":"https://api.github.com/users/integratedfordevelopers/received_events","type":"Organization","site_admin":false},"repo":{"id":99342060,"name":"integrated-poll-bundle","full_name":"integratedfordevelopers/integrated-poll-bundle","owner":{"login":"integratedfordevelopers","id":16450317,"avatar_url":"https://avatars1.githubusercontent.com/u/16450317?v=4","gravatar_id":"","url":"https://api.github.com/users/integratedfordevelopers","html_url":"https://github.com/integratedfordevelopers","followers_url":"https://api.github.com/users/integratedfordevelopers/followers","following_url":"https://api.github.com/users/integratedfordevelopers/following{/other_user}","gists_url":"https://api.github.com/users/integratedfordevelopers/gists{/gist_id}","starred_url":"https://api.github.com/users/integratedfordevelopers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/integratedfordevelopers/subscriptions","organizations_url":"https://api.github.com/users/integratedfordevelopers/orgs","repos_url":"https://api.github.com/users/integratedfordevelopers/repos","events_url":"https://api.github.com/users/integratedfordevelopers/events{/privacy}","received_events_url":"https://api.github.com/users/integratedfordevelopers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/integratedfordevelopers/integrated-poll-bundle","description":null,"fork":false,"url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle","forks_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/forks","keys_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/teams","hooks_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/hooks","issue_events_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/issues/events{/number}","events_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/events","assignees_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/assignees{/user}","branches_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/branches{/branch}","tags_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/tags","blobs_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/git/refs{/sha}","trees_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/statuses/{sha}","languages_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/languages","stargazers_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/stargazers","contributors_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/contributors","subscribers_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/subscribers","subscription_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/subscription","commits_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/commits{/sha}","git_commits_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/git/commits{/sha}","comments_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/comments{/number}","issue_comment_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/issues/comments{/number}","contents_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/contents/{+path}","compare_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/merges","archive_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/downloads","issues_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/issues{/number}","pulls_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/pulls{/number}","milestones_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/milestones{/number}","notifications_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/labels{/name}","releases_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/releases{/id}","deployments_url":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/deployments","created_at":"2017-08-04T12:46:03Z","updated_at":"2017-08-04T12:46:03Z","pushed_at":"2017-08-09T13:22:08Z","git_url":"git://github.com/integratedfordevelopers/integrated-poll-bundle.git","ssh_url":"git@github.com:integratedfordevelopers/integrated-poll-bundle.git","clone_url":"https://github.com/integratedfordevelopers/integrated-poll-bundle.git","svn_url":"https://github.com/integratedfordevelopers/integrated-poll-bundle","homepage":null,"size":1326,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"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/integratedfordevelopers/integrated-poll-bundle/pulls/2"},"html":{"href":"https://github.com/integratedfordevelopers/integrated-poll-bundle/pull/2"},"issue":{"href":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/issues/2"},"comments":{"href":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/integratedfordevelopers/integrated-poll-bundle/statuses/0663cc1864231f8d64a36fe4b280a9f6e668505a"}}}}
{"actor":{"display_login":"psat01"}}