{"action":"created","comment":{"url":"https://api.github.com/repos/GEWIS/gewisweb/pulls/comments/30345622","id":30345622,"diff_hunk":"@@ -0,0 +1,68 @@\n+<?php\n+\n+namespace Activity\\Mapper;\n+\n+use Doctrine\\ORM\\EntityManager;\n+\n+class Activity\n+{\n+\n+    /**\n+     * Doctrine entity manager.\n+     *\n+     * @var EntityManager\n+     */\n+    protected $em;\n+\n+    /**\n+     * Constructor\n+     *\n+     * @param EntityManager $em\n+     */\n+    public function __construct(EntityManager $em)\n+    {\n+        $this->em = $em;\n+    }\n+\n+    /**\n+     * @param $id\n+     *\n+     * @return array\n+     */\n+    public function getActivityById($id)\n+    {\n+        $qb = $this->em->createQueryBuilder();\n+        $qb->select('a')\n+            ->from('Activity\\Model\\Activity', 'a')\n+            ->where('a.id = :id')\n+            ->setParameter('id', $id);\n+        $result = $qb->getQuery()->getResult();\n+        return count($result) > 0 ? $result[0]: null ;","path":"module/Activity/src/Activity/Mapper/Activity.php","position":40,"original_position":40,"commit_id":"c647a7ef31962dd8b410fb5f583673dbb51beb14","original_commit_id":"c647a7ef31962dd8b410fb5f583673dbb51beb14","user":{"login":"kokx","id":138556,"avatar_url":"https://avatars.githubusercontent.com/u/138556?v=3","gravatar_id":"","url":"https://api.github.com/users/kokx","html_url":"https://github.com/kokx","followers_url":"https://api.github.com/users/kokx/followers","following_url":"https://api.github.com/users/kokx/following{/other_user}","gists_url":"https://api.github.com/users/kokx/gists{/gist_id}","starred_url":"https://api.github.com/users/kokx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kokx/subscriptions","organizations_url":"https://api.github.com/users/kokx/orgs","repos_url":"https://api.github.com/users/kokx/repos","events_url":"https://api.github.com/users/kokx/events{/privacy}","received_events_url":"https://api.github.com/users/kokx/received_events","type":"User","site_admin":false},"body":"`empty($result)` lijkt me hier duidelijker te zijn.","created_at":"2015-05-14T18:05:22Z","updated_at":"2015-05-14T18:05:22Z","html_url":"https://github.com/GEWIS/gewisweb/pull/108#discussion_r30345622","pull_request_url":"https://api.github.com/repos/GEWIS/gewisweb/pulls/108","_links":{"self":{"href":"https://api.github.com/repos/GEWIS/gewisweb/pulls/comments/30345622"},"html":{"href":"https://github.com/GEWIS/gewisweb/pull/108#discussion_r30345622"},"pull_request":{"href":"https://api.github.com/repos/GEWIS/gewisweb/pulls/108"}}},"pull_request":{"url":"https://api.github.com/repos/GEWIS/gewisweb/pulls/108","id":35084669,"html_url":"https://github.com/GEWIS/gewisweb/pull/108","diff_url":"https://github.com/GEWIS/gewisweb/pull/108.diff","patch_url":"https://github.com/GEWIS/gewisweb/pull/108.patch","issue_url":"https://api.github.com/repos/GEWIS/gewisweb/issues/108","number":108,"state":"open","locked":false,"title":"Activity update","user":{"login":"choutha","id":6672220,"avatar_url":"https://avatars.githubusercontent.com/u/6672220?v=3","gravatar_id":"","url":"https://api.github.com/users/choutha","html_url":"https://github.com/choutha","followers_url":"https://api.github.com/users/choutha/followers","following_url":"https://api.github.com/users/choutha/following{/other_user}","gists_url":"https://api.github.com/users/choutha/gists{/gist_id}","starred_url":"https://api.github.com/users/choutha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choutha/subscriptions","organizations_url":"https://api.github.com/users/choutha/orgs","repos_url":"https://api.github.com/users/choutha/repos","events_url":"https://api.github.com/users/choutha/events{/privacy}","received_events_url":"https://api.github.com/users/choutha/received_events","type":"User","site_admin":false},"body":"Left out all ACL of last pull request and added barebone of activity calendar.","created_at":"2015-05-10T16:10:24Z","updated_at":"2015-05-14T18:05:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d796fb6b64f8b68493bd03e48ddf16415b2fea1e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/GEWIS/gewisweb/pulls/108/commits","review_comments_url":"https://api.github.com/repos/GEWIS/gewisweb/pulls/108/comments","review_comment_url":"https://api.github.com/repos/GEWIS/gewisweb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GEWIS/gewisweb/issues/108/comments","statuses_url":"https://api.github.com/repos/GEWIS/gewisweb/statuses/c647a7ef31962dd8b410fb5f583673dbb51beb14","head":{"label":"choutha:master","ref":"master","sha":"c647a7ef31962dd8b410fb5f583673dbb51beb14","user":{"login":"choutha","id":6672220,"avatar_url":"https://avatars.githubusercontent.com/u/6672220?v=3","gravatar_id":"","url":"https://api.github.com/users/choutha","html_url":"https://github.com/choutha","followers_url":"https://api.github.com/users/choutha/followers","following_url":"https://api.github.com/users/choutha/following{/other_user}","gists_url":"https://api.github.com/users/choutha/gists{/gist_id}","starred_url":"https://api.github.com/users/choutha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choutha/subscriptions","organizations_url":"https://api.github.com/users/choutha/orgs","repos_url":"https://api.github.com/users/choutha/repos","events_url":"https://api.github.com/users/choutha/events{/privacy}","received_events_url":"https://api.github.com/users/choutha/received_events","type":"User","site_admin":false},"repo":{"id":16803233,"name":"gewisweb","full_name":"choutha/gewisweb","owner":{"login":"choutha","id":6672220,"avatar_url":"https://avatars.githubusercontent.com/u/6672220?v=3","gravatar_id":"","url":"https://api.github.com/users/choutha","html_url":"https://github.com/choutha","followers_url":"https://api.github.com/users/choutha/followers","following_url":"https://api.github.com/users/choutha/following{/other_user}","gists_url":"https://api.github.com/users/choutha/gists{/gist_id}","starred_url":"https://api.github.com/users/choutha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/choutha/subscriptions","organizations_url":"https://api.github.com/users/choutha/orgs","repos_url":"https://api.github.com/users/choutha/repos","events_url":"https://api.github.com/users/choutha/events{/privacy}","received_events_url":"https://api.github.com/users/choutha/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/choutha/gewisweb","description":"GEWIS Website","fork":true,"url":"https://api.github.com/repos/choutha/gewisweb","forks_url":"https://api.github.com/repos/choutha/gewisweb/forks","keys_url":"https://api.github.com/repos/choutha/gewisweb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/choutha/gewisweb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/choutha/gewisweb/teams","hooks_url":"https://api.github.com/repos/choutha/gewisweb/hooks","issue_events_url":"https://api.github.com/repos/choutha/gewisweb/issues/events{/number}","events_url":"https://api.github.com/repos/choutha/gewisweb/events","assignees_url":"https://api.github.com/repos/choutha/gewisweb/assignees{/user}","branches_url":"https://api.github.com/repos/choutha/gewisweb/branches{/branch}","tags_url":"https://api.github.com/repos/choutha/gewisweb/tags","blobs_url":"https://api.github.com/repos/choutha/gewisweb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/choutha/gewisweb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/choutha/gewisweb/git/refs{/sha}","trees_url":"https://api.github.com/repos/choutha/gewisweb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/choutha/gewisweb/statuses/{sha}","languages_url":"https://api.github.com/repos/choutha/gewisweb/languages","stargazers_url":"https://api.github.com/repos/choutha/gewisweb/stargazers","contributors_url":"https://api.github.com/repos/choutha/gewisweb/contributors","subscribers_url":"https://api.github.com/repos/choutha/gewisweb/subscribers","subscription_url":"https://api.github.com/repos/choutha/gewisweb/subscription","commits_url":"https://api.github.com/repos/choutha/gewisweb/commits{/sha}","git_commits_url":"https://api.github.com/repos/choutha/gewisweb/git/commits{/sha}","comments_url":"https://api.github.com/repos/choutha/gewisweb/comments{/number}","issue_comment_url":"https://api.github.com/repos/choutha/gewisweb/issues/comments{/number}","contents_url":"https://api.github.com/repos/choutha/gewisweb/contents/{+path}","compare_url":"https://api.github.com/repos/choutha/gewisweb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/choutha/gewisweb/merges","archive_url":"https://api.github.com/repos/choutha/gewisweb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/choutha/gewisweb/downloads","issues_url":"https://api.github.com/repos/choutha/gewisweb/issues{/number}","pulls_url":"https://api.github.com/repos/choutha/gewisweb/pulls{/number}","milestones_url":"https://api.github.com/repos/choutha/gewisweb/milestones{/number}","notifications_url":"https://api.github.com/repos/choutha/gewisweb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/choutha/gewisweb/labels{/name}","releases_url":"https://api.github.com/repos/choutha/gewisweb/releases{/id}","created_at":"2014-02-13T13:12:35Z","updated_at":"2015-02-23T14:55:03Z","pushed_at":"2015-05-10T15:42:57Z","git_url":"git://github.com/choutha/gewisweb.git","ssh_url":"git@github.com:choutha/gewisweb.git","clone_url":"https://github.com/choutha/gewisweb.git","svn_url":"https://github.com/choutha/gewisweb","homepage":null,"size":1614,"stargazers_count":0,"watchers_count":0,"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":0,"default_branch":"master"}},"base":{"label":"GEWIS:master","ref":"master","sha":"cf33cb8e27069b5cd52062d70b69ec64000bc4c9","user":{"login":"GEWIS","id":1815510,"avatar_url":"https://avatars.githubusercontent.com/u/1815510?v=3","gravatar_id":"","url":"https://api.github.com/users/GEWIS","html_url":"https://github.com/GEWIS","followers_url":"https://api.github.com/users/GEWIS/followers","following_url":"https://api.github.com/users/GEWIS/following{/other_user}","gists_url":"https://api.github.com/users/GEWIS/gists{/gist_id}","starred_url":"https://api.github.com/users/GEWIS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GEWIS/subscriptions","organizations_url":"https://api.github.com/users/GEWIS/orgs","repos_url":"https://api.github.com/users/GEWIS/repos","events_url":"https://api.github.com/users/GEWIS/events{/privacy}","received_events_url":"https://api.github.com/users/GEWIS/received_events","type":"Organization","site_admin":false},"repo":{"id":16512277,"name":"gewisweb","full_name":"GEWIS/gewisweb","owner":{"login":"GEWIS","id":1815510,"avatar_url":"https://avatars.githubusercontent.com/u/1815510?v=3","gravatar_id":"","url":"https://api.github.com/users/GEWIS","html_url":"https://github.com/GEWIS","followers_url":"https://api.github.com/users/GEWIS/followers","following_url":"https://api.github.com/users/GEWIS/following{/other_user}","gists_url":"https://api.github.com/users/GEWIS/gists{/gist_id}","starred_url":"https://api.github.com/users/GEWIS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GEWIS/subscriptions","organizations_url":"https://api.github.com/users/GEWIS/orgs","repos_url":"https://api.github.com/users/GEWIS/repos","events_url":"https://api.github.com/users/GEWIS/events{/privacy}","received_events_url":"https://api.github.com/users/GEWIS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/GEWIS/gewisweb","description":"GEWIS Website","fork":false,"url":"https://api.github.com/repos/GEWIS/gewisweb","forks_url":"https://api.github.com/repos/GEWIS/gewisweb/forks","keys_url":"https://api.github.com/repos/GEWIS/gewisweb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GEWIS/gewisweb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GEWIS/gewisweb/teams","hooks_url":"https://api.github.com/repos/GEWIS/gewisweb/hooks","issue_events_url":"https://api.github.com/repos/GEWIS/gewisweb/issues/events{/number}","events_url":"https://api.github.com/repos/GEWIS/gewisweb/events","assignees_url":"https://api.github.com/repos/GEWIS/gewisweb/assignees{/user}","branches_url":"https://api.github.com/repos/GEWIS/gewisweb/branches{/branch}","tags_url":"https://api.github.com/repos/GEWIS/gewisweb/tags","blobs_url":"https://api.github.com/repos/GEWIS/gewisweb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GEWIS/gewisweb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GEWIS/gewisweb/git/refs{/sha}","trees_url":"https://api.github.com/repos/GEWIS/gewisweb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GEWIS/gewisweb/statuses/{sha}","languages_url":"https://api.github.com/repos/GEWIS/gewisweb/languages","stargazers_url":"https://api.github.com/repos/GEWIS/gewisweb/stargazers","contributors_url":"https://api.github.com/repos/GEWIS/gewisweb/contributors","subscribers_url":"https://api.github.com/repos/GEWIS/gewisweb/subscribers","subscription_url":"https://api.github.com/repos/GEWIS/gewisweb/subscription","commits_url":"https://api.github.com/repos/GEWIS/gewisweb/commits{/sha}","git_commits_url":"https://api.github.com/repos/GEWIS/gewisweb/git/commits{/sha}","comments_url":"https://api.github.com/repos/GEWIS/gewisweb/comments{/number}","issue_comment_url":"https://api.github.com/repos/GEWIS/gewisweb/issues/comments{/number}","contents_url":"https://api.github.com/repos/GEWIS/gewisweb/contents/{+path}","compare_url":"https://api.github.com/repos/GEWIS/gewisweb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GEWIS/gewisweb/merges","archive_url":"https://api.github.com/repos/GEWIS/gewisweb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GEWIS/gewisweb/downloads","issues_url":"https://api.github.com/repos/GEWIS/gewisweb/issues{/number}","pulls_url":"https://api.github.com/repos/GEWIS/gewisweb/pulls{/number}","milestones_url":"https://api.github.com/repos/GEWIS/gewisweb/milestones{/number}","notifications_url":"https://api.github.com/repos/GEWIS/gewisweb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GEWIS/gewisweb/labels{/name}","releases_url":"https://api.github.com/repos/GEWIS/gewisweb/releases{/id}","created_at":"2014-02-04T13:22:05Z","updated_at":"2015-05-06T10:10:51Z","pushed_at":"2015-05-10T16:10:24Z","git_url":"git://github.com/GEWIS/gewisweb.git","ssh_url":"git@github.com:GEWIS/gewisweb.git","clone_url":"https://github.com/GEWIS/gewisweb.git","svn_url":"https://github.com/GEWIS/gewisweb","homepage":null,"size":2748,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":48,"forks":10,"open_issues":48,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GEWIS/gewisweb/pulls/108"},"html":{"href":"https://github.com/GEWIS/gewisweb/pull/108"},"issue":{"href":"https://api.github.com/repos/GEWIS/gewisweb/issues/108"},"comments":{"href":"https://api.github.com/repos/GEWIS/gewisweb/issues/108/comments"},"review_comments":{"href":"https://api.github.com/repos/GEWIS/gewisweb/pulls/108/comments"},"review_comment":{"href":"https://api.github.com/repos/GEWIS/gewisweb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GEWIS/gewisweb/pulls/108/commits"},"statuses":{"href":"https://api.github.com/repos/GEWIS/gewisweb/statuses/c647a7ef31962dd8b410fb5f583673dbb51beb14"}}}}