{"action":"created","comment":{"url":"https://api.github.com/repos/onebip/bookclub/pulls/comments/54084616","id":54084616,"diff_hunk":"@@ -0,0 +1,49 @@\n+<?php\n+\n+class FizzBuzz\n+{\n+    private $rules = [];\n+\n+    public function __construct()\n+    {\n+        $this->rules[] = new MultipleOfThree();\n+        $this->rules[] = new MultipleOfFive();\n+    }\n+\n+    public function check($number)\n+    {\n+        $output = '';\n+        foreach ($this->rules as $rule) {\n+            $output .= $rule->output($number);\n+        }\n+\n+        if (strlen($output)) {\n+            return $output . PHP_EOL;\n+        }\n+        return $number . PHP_EOL;\n+    }\n+}\n+\n+abstract class Multiple\n+{\n+    abstract public function output($number);\n+}\n+\n+class MultipleOfThree extends Multiple\n+{\n+    public function output($number)\n+    {\n+        if ($number % 3 === 0) {\n+            return 'Fizz';\n+        }\n+    }\n+}\n+class MultipleOfFive extends Multiple","path":"fizzbuzz/FizzBuzz.php","position":41,"original_position":41,"commit_id":"87fded7648e75f20911eeb85d98de65d9d6fa5b3","original_commit_id":"87fded7648e75f20911eeb85d98de65d9d6fa5b3","user":{"login":"giorgiosironi","id":160299,"avatar_url":"https://avatars.githubusercontent.com/u/160299?v=3","gravatar_id":"","url":"https://api.github.com/users/giorgiosironi","html_url":"https://github.com/giorgiosironi","followers_url":"https://api.github.com/users/giorgiosironi/followers","following_url":"https://api.github.com/users/giorgiosironi/following{/other_user}","gists_url":"https://api.github.com/users/giorgiosironi/gists{/gist_id}","starred_url":"https://api.github.com/users/giorgiosironi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/giorgiosironi/subscriptions","organizations_url":"https://api.github.com/users/giorgiosironi/orgs","repos_url":"https://api.github.com/users/giorgiosironi/repos","events_url":"https://api.github.com/users/giorgiosironi/events{/privacy}","received_events_url":"https://api.github.com/users/giorgiosironi/received_events","type":"User","site_admin":false},"body":"There is duplication between the classes `MultipleOfThree` and `MultipleOfFive`, since they differ only on the number and word used. Therefore, try to unify them t a single class and configure it through its constructor, passing in these parameters","created_at":"2016-02-25T11:53:30Z","updated_at":"2016-02-25T11:53:30Z","html_url":"https://github.com/onebip/bookclub/pull/1#discussion_r54084616","pull_request_url":"https://api.github.com/repos/onebip/bookclub/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/onebip/bookclub/pulls/comments/54084616"},"html":{"href":"https://github.com/onebip/bookclub/pull/1#discussion_r54084616"},"pull_request":{"href":"https://api.github.com/repos/onebip/bookclub/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/onebip/bookclub/pulls/1","id":60589156,"html_url":"https://github.com/onebip/bookclub/pull/1","diff_url":"https://github.com/onebip/bookclub/pull/1.diff","patch_url":"https://github.com/onebip/bookclub/pull/1.patch","issue_url":"https://api.github.com/repos/onebip/bookclub/issues/1","number":1,"state":"open","locked":false,"title":"kata: implementing fizzbuzz","user":{"login":"aurelienlair","id":2820749,"avatar_url":"https://avatars.githubusercontent.com/u/2820749?v=3","gravatar_id":"","url":"https://api.github.com/users/aurelienlair","html_url":"https://github.com/aurelienlair","followers_url":"https://api.github.com/users/aurelienlair/followers","following_url":"https://api.github.com/users/aurelienlair/following{/other_user}","gists_url":"https://api.github.com/users/aurelienlair/gists{/gist_id}","starred_url":"https://api.github.com/users/aurelienlair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aurelienlair/subscriptions","organizations_url":"https://api.github.com/users/aurelienlair/orgs","repos_url":"https://api.github.com/users/aurelienlair/repos","events_url":"https://api.github.com/users/aurelienlair/events{/privacy}","received_events_url":"https://api.github.com/users/aurelienlair/received_events","type":"User","site_admin":false},"body":"@giorgiosironi @MirkoBonadei could you tell me your opinions please?","created_at":"2016-02-24T22:20:29Z","updated_at":"2016-02-25T11:53:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9b2a3a577d1da720955d4810d09cbcd0db9aaa90","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/onebip/bookclub/pulls/1/commits","review_comments_url":"https://api.github.com/repos/onebip/bookclub/pulls/1/comments","review_comment_url":"https://api.github.com/repos/onebip/bookclub/pulls/comments{/number}","comments_url":"https://api.github.com/repos/onebip/bookclub/issues/1/comments","statuses_url":"https://api.github.com/repos/onebip/bookclub/statuses/87fded7648e75f20911eeb85d98de65d9d6fa5b3","head":{"label":"onebip:fizzbuzz","ref":"fizzbuzz","sha":"87fded7648e75f20911eeb85d98de65d9d6fa5b3","user":{"login":"onebip","id":2734576,"avatar_url":"https://avatars.githubusercontent.com/u/2734576?v=3","gravatar_id":"","url":"https://api.github.com/users/onebip","html_url":"https://github.com/onebip","followers_url":"https://api.github.com/users/onebip/followers","following_url":"https://api.github.com/users/onebip/following{/other_user}","gists_url":"https://api.github.com/users/onebip/gists{/gist_id}","starred_url":"https://api.github.com/users/onebip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onebip/subscriptions","organizations_url":"https://api.github.com/users/onebip/orgs","repos_url":"https://api.github.com/users/onebip/repos","events_url":"https://api.github.com/users/onebip/events{/privacy}","received_events_url":"https://api.github.com/users/onebip/received_events","type":"Organization","site_admin":false},"repo":{"id":16944940,"name":"bookclub","full_name":"onebip/bookclub","owner":{"login":"onebip","id":2734576,"avatar_url":"https://avatars.githubusercontent.com/u/2734576?v=3","gravatar_id":"","url":"https://api.github.com/users/onebip","html_url":"https://github.com/onebip","followers_url":"https://api.github.com/users/onebip/followers","following_url":"https://api.github.com/users/onebip/following{/other_user}","gists_url":"https://api.github.com/users/onebip/gists{/gist_id}","starred_url":"https://api.github.com/users/onebip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onebip/subscriptions","organizations_url":"https://api.github.com/users/onebip/orgs","repos_url":"https://api.github.com/users/onebip/repos","events_url":"https://api.github.com/users/onebip/events{/privacy}","received_events_url":"https://api.github.com/users/onebip/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/onebip/bookclub","description":"Repository where we will put our work during book club (katas, scripts...).","fork":false,"url":"https://api.github.com/repos/onebip/bookclub","forks_url":"https://api.github.com/repos/onebip/bookclub/forks","keys_url":"https://api.github.com/repos/onebip/bookclub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/onebip/bookclub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/onebip/bookclub/teams","hooks_url":"https://api.github.com/repos/onebip/bookclub/hooks","issue_events_url":"https://api.github.com/repos/onebip/bookclub/issues/events{/number}","events_url":"https://api.github.com/repos/onebip/bookclub/events","assignees_url":"https://api.github.com/repos/onebip/bookclub/assignees{/user}","branches_url":"https://api.github.com/repos/onebip/bookclub/branches{/branch}","tags_url":"https://api.github.com/repos/onebip/bookclub/tags","blobs_url":"https://api.github.com/repos/onebip/bookclub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/onebip/bookclub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/onebip/bookclub/git/refs{/sha}","trees_url":"https://api.github.com/repos/onebip/bookclub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/onebip/bookclub/statuses/{sha}","languages_url":"https://api.github.com/repos/onebip/bookclub/languages","stargazers_url":"https://api.github.com/repos/onebip/bookclub/stargazers","contributors_url":"https://api.github.com/repos/onebip/bookclub/contributors","subscribers_url":"https://api.github.com/repos/onebip/bookclub/subscribers","subscription_url":"https://api.github.com/repos/onebip/bookclub/subscription","commits_url":"https://api.github.com/repos/onebip/bookclub/commits{/sha}","git_commits_url":"https://api.github.com/repos/onebip/bookclub/git/commits{/sha}","comments_url":"https://api.github.com/repos/onebip/bookclub/comments{/number}","issue_comment_url":"https://api.github.com/repos/onebip/bookclub/issues/comments{/number}","contents_url":"https://api.github.com/repos/onebip/bookclub/contents/{+path}","compare_url":"https://api.github.com/repos/onebip/bookclub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/onebip/bookclub/merges","archive_url":"https://api.github.com/repos/onebip/bookclub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/onebip/bookclub/downloads","issues_url":"https://api.github.com/repos/onebip/bookclub/issues{/number}","pulls_url":"https://api.github.com/repos/onebip/bookclub/pulls{/number}","milestones_url":"https://api.github.com/repos/onebip/bookclub/milestones{/number}","notifications_url":"https://api.github.com/repos/onebip/bookclub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/onebip/bookclub/labels{/name}","releases_url":"https://api.github.com/repos/onebip/bookclub/releases{/id}","deployments_url":"https://api.github.com/repos/onebip/bookclub/deployments","created_at":"2014-02-18T10:19:05Z","updated_at":"2016-02-23T22:20:02Z","pushed_at":"2016-02-24T22:25:00Z","git_url":"git://github.com/onebip/bookclub.git","ssh_url":"git@github.com:onebip/bookclub.git","clone_url":"https://github.com/onebip/bookclub.git","svn_url":"https://github.com/onebip/bookclub","homepage":null,"size":3007,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":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":1,"default_branch":"master"}},"base":{"label":"onebip:master","ref":"master","sha":"817964f0f39a6d82906dacbd9e07fcaac39f014d","user":{"login":"onebip","id":2734576,"avatar_url":"https://avatars.githubusercontent.com/u/2734576?v=3","gravatar_id":"","url":"https://api.github.com/users/onebip","html_url":"https://github.com/onebip","followers_url":"https://api.github.com/users/onebip/followers","following_url":"https://api.github.com/users/onebip/following{/other_user}","gists_url":"https://api.github.com/users/onebip/gists{/gist_id}","starred_url":"https://api.github.com/users/onebip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onebip/subscriptions","organizations_url":"https://api.github.com/users/onebip/orgs","repos_url":"https://api.github.com/users/onebip/repos","events_url":"https://api.github.com/users/onebip/events{/privacy}","received_events_url":"https://api.github.com/users/onebip/received_events","type":"Organization","site_admin":false},"repo":{"id":16944940,"name":"bookclub","full_name":"onebip/bookclub","owner":{"login":"onebip","id":2734576,"avatar_url":"https://avatars.githubusercontent.com/u/2734576?v=3","gravatar_id":"","url":"https://api.github.com/users/onebip","html_url":"https://github.com/onebip","followers_url":"https://api.github.com/users/onebip/followers","following_url":"https://api.github.com/users/onebip/following{/other_user}","gists_url":"https://api.github.com/users/onebip/gists{/gist_id}","starred_url":"https://api.github.com/users/onebip/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/onebip/subscriptions","organizations_url":"https://api.github.com/users/onebip/orgs","repos_url":"https://api.github.com/users/onebip/repos","events_url":"https://api.github.com/users/onebip/events{/privacy}","received_events_url":"https://api.github.com/users/onebip/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/onebip/bookclub","description":"Repository where we will put our work during book club (katas, scripts...).","fork":false,"url":"https://api.github.com/repos/onebip/bookclub","forks_url":"https://api.github.com/repos/onebip/bookclub/forks","keys_url":"https://api.github.com/repos/onebip/bookclub/keys{/key_id}","collaborators_url":"https://api.github.com/repos/onebip/bookclub/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/onebip/bookclub/teams","hooks_url":"https://api.github.com/repos/onebip/bookclub/hooks","issue_events_url":"https://api.github.com/repos/onebip/bookclub/issues/events{/number}","events_url":"https://api.github.com/repos/onebip/bookclub/events","assignees_url":"https://api.github.com/repos/onebip/bookclub/assignees{/user}","branches_url":"https://api.github.com/repos/onebip/bookclub/branches{/branch}","tags_url":"https://api.github.com/repos/onebip/bookclub/tags","blobs_url":"https://api.github.com/repos/onebip/bookclub/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/onebip/bookclub/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/onebip/bookclub/git/refs{/sha}","trees_url":"https://api.github.com/repos/onebip/bookclub/git/trees{/sha}","statuses_url":"https://api.github.com/repos/onebip/bookclub/statuses/{sha}","languages_url":"https://api.github.com/repos/onebip/bookclub/languages","stargazers_url":"https://api.github.com/repos/onebip/bookclub/stargazers","contributors_url":"https://api.github.com/repos/onebip/bookclub/contributors","subscribers_url":"https://api.github.com/repos/onebip/bookclub/subscribers","subscription_url":"https://api.github.com/repos/onebip/bookclub/subscription","commits_url":"https://api.github.com/repos/onebip/bookclub/commits{/sha}","git_commits_url":"https://api.github.com/repos/onebip/bookclub/git/commits{/sha}","comments_url":"https://api.github.com/repos/onebip/bookclub/comments{/number}","issue_comment_url":"https://api.github.com/repos/onebip/bookclub/issues/comments{/number}","contents_url":"https://api.github.com/repos/onebip/bookclub/contents/{+path}","compare_url":"https://api.github.com/repos/onebip/bookclub/compare/{base}...{head}","merges_url":"https://api.github.com/repos/onebip/bookclub/merges","archive_url":"https://api.github.com/repos/onebip/bookclub/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/onebip/bookclub/downloads","issues_url":"https://api.github.com/repos/onebip/bookclub/issues{/number}","pulls_url":"https://api.github.com/repos/onebip/bookclub/pulls{/number}","milestones_url":"https://api.github.com/repos/onebip/bookclub/milestones{/number}","notifications_url":"https://api.github.com/repos/onebip/bookclub/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/onebip/bookclub/labels{/name}","releases_url":"https://api.github.com/repos/onebip/bookclub/releases{/id}","deployments_url":"https://api.github.com/repos/onebip/bookclub/deployments","created_at":"2014-02-18T10:19:05Z","updated_at":"2016-02-23T22:20:02Z","pushed_at":"2016-02-24T22:25:00Z","git_url":"git://github.com/onebip/bookclub.git","ssh_url":"git@github.com:onebip/bookclub.git","clone_url":"https://github.com/onebip/bookclub.git","svn_url":"https://github.com/onebip/bookclub","homepage":null,"size":3007,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":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":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/onebip/bookclub/pulls/1"},"html":{"href":"https://github.com/onebip/bookclub/pull/1"},"issue":{"href":"https://api.github.com/repos/onebip/bookclub/issues/1"},"comments":{"href":"https://api.github.com/repos/onebip/bookclub/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/onebip/bookclub/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/onebip/bookclub/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/onebip/bookclub/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/onebip/bookclub/statuses/87fded7648e75f20911eeb85d98de65d9d6fa5b3"}}}}