{"action":"created","comment":{"url":"https://api.github.com/repos/florianv/business/pulls/comments/34165354","id":34165354,"diff_hunk":"@@ -0,0 +1,80 @@\n+<?php\n+\n+/*\n+ * This file is part of Business.\n+ *\n+ * (c) Florian Voutzinos <florian@voutzinos.com>\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 Business;\n+\n+/**\n+ * Default implementation of BusinessInterface.\n+ *\n+ * @author Márk Sági-Kazár <mark.sagikazar@gmail.com>\n+ */\n+final class Holidays implements \\Serializable\n+{\n+    private $holidays = [];\n+\n+    /**\n+     * Creates a new holiday collection.\n+     *\n+     * @param \\DateTime[]|DateTimePeriod[] $holidays\n+     */\n+    public function __construct(array $holidays = [])\n+    {\n+        $this->addHolidays($holidays);\n+    }\n+\n+    /**\n+     * {@inheritdoc}\n+     */\n+    public function serialize()\n+    {\n+        return serialize($this->holidays);\n+    }\n+\n+    /**\n+     * {@inheritdoc}\n+     */\n+    public function unserialize($serialized)\n+    {\n+        $this->holidays = unserialize($serialized);\n+    }\n+\n+    private function addHoliday(\\DateTime $holiday)","path":"src/Holidays.php","position":49,"original_position":49,"commit_id":"e43b4bb56714817e2a4f18ecc5043da2e2f9746f","original_commit_id":"e43b4bb56714817e2a4f18ecc5043da2e2f9746f","user":{"login":"florianv","id":1586668,"avatar_url":"https://avatars.githubusercontent.com/u/1586668?v=3","gravatar_id":"","url":"https://api.github.com/users/florianv","html_url":"https://github.com/florianv","followers_url":"https://api.github.com/users/florianv/followers","following_url":"https://api.github.com/users/florianv/following{/other_user}","gists_url":"https://api.github.com/users/florianv/gists{/gist_id}","starred_url":"https://api.github.com/users/florianv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/florianv/subscriptions","organizations_url":"https://api.github.com/users/florianv/orgs","repos_url":"https://api.github.com/users/florianv/repos","events_url":"https://api.github.com/users/florianv/events{/privacy}","received_events_url":"https://api.github.com/users/florianv/received_events","type":"User","site_admin":false},"body":"Please put the private methods after all the public methods","created_at":"2015-07-08T16:01:23Z","updated_at":"2015-07-08T16:01:23Z","html_url":"https://github.com/florianv/business/pull/8#discussion_r34165354","pull_request_url":"https://api.github.com/repos/florianv/business/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/florianv/business/pulls/comments/34165354"},"html":{"href":"https://github.com/florianv/business/pull/8#discussion_r34165354"},"pull_request":{"href":"https://api.github.com/repos/florianv/business/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/florianv/business/pulls/8","id":39456476,"html_url":"https://github.com/florianv/business/pull/8","diff_url":"https://github.com/florianv/business/pull/8.diff","patch_url":"https://github.com/florianv/business/pull/8.patch","issue_url":"https://api.github.com/repos/florianv/business/issues/8","number":8,"state":"open","locked":false,"title":"Extract holidays into a separate collection, add DateTimePeriod for i…","user":{"login":"sagikazarmark","id":1226384,"avatar_url":"https://avatars.githubusercontent.com/u/1226384?v=3","gravatar_id":"","url":"https://api.github.com/users/sagikazarmark","html_url":"https://github.com/sagikazarmark","followers_url":"https://api.github.com/users/sagikazarmark/followers","following_url":"https://api.github.com/users/sagikazarmark/following{/other_user}","gists_url":"https://api.github.com/users/sagikazarmark/gists{/gist_id}","starred_url":"https://api.github.com/users/sagikazarmark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sagikazarmark/subscriptions","organizations_url":"https://api.github.com/users/sagikazarmark/orgs","repos_url":"https://api.github.com/users/sagikazarmark/repos","events_url":"https://api.github.com/users/sagikazarmark/events{/privacy}","received_events_url":"https://api.github.com/users/sagikazarmark/received_events","type":"User","site_admin":false},"body":"…ntervals\r\n\r\nClose #6","created_at":"2015-07-08T09:17:56Z","updated_at":"2015-07-08T16:01:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fbf4ce27cfae7f1b13d294e05a9afd25829bd427","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/florianv/business/pulls/8/commits","review_comments_url":"https://api.github.com/repos/florianv/business/pulls/8/comments","review_comment_url":"https://api.github.com/repos/florianv/business/pulls/comments{/number}","comments_url":"https://api.github.com/repos/florianv/business/issues/8/comments","statuses_url":"https://api.github.com/repos/florianv/business/statuses/e43b4bb56714817e2a4f18ecc5043da2e2f9746f","head":{"label":"sagikazarmark:holidays","ref":"holidays","sha":"e43b4bb56714817e2a4f18ecc5043da2e2f9746f","user":{"login":"sagikazarmark","id":1226384,"avatar_url":"https://avatars.githubusercontent.com/u/1226384?v=3","gravatar_id":"","url":"https://api.github.com/users/sagikazarmark","html_url":"https://github.com/sagikazarmark","followers_url":"https://api.github.com/users/sagikazarmark/followers","following_url":"https://api.github.com/users/sagikazarmark/following{/other_user}","gists_url":"https://api.github.com/users/sagikazarmark/gists{/gist_id}","starred_url":"https://api.github.com/users/sagikazarmark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sagikazarmark/subscriptions","organizations_url":"https://api.github.com/users/sagikazarmark/orgs","repos_url":"https://api.github.com/users/sagikazarmark/repos","events_url":"https://api.github.com/users/sagikazarmark/events{/privacy}","received_events_url":"https://api.github.com/users/sagikazarmark/received_events","type":"User","site_admin":false},"repo":{"id":38676484,"name":"business","full_name":"sagikazarmark/business","owner":{"login":"sagikazarmark","id":1226384,"avatar_url":"https://avatars.githubusercontent.com/u/1226384?v=3","gravatar_id":"","url":"https://api.github.com/users/sagikazarmark","html_url":"https://github.com/sagikazarmark","followers_url":"https://api.github.com/users/sagikazarmark/followers","following_url":"https://api.github.com/users/sagikazarmark/following{/other_user}","gists_url":"https://api.github.com/users/sagikazarmark/gists{/gist_id}","starred_url":"https://api.github.com/users/sagikazarmark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sagikazarmark/subscriptions","organizations_url":"https://api.github.com/users/sagikazarmark/orgs","repos_url":"https://api.github.com/users/sagikazarmark/repos","events_url":"https://api.github.com/users/sagikazarmark/events{/privacy}","received_events_url":"https://api.github.com/users/sagikazarmark/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sagikazarmark/business","description":"DateTime calculations in business hours","fork":true,"url":"https://api.github.com/repos/sagikazarmark/business","forks_url":"https://api.github.com/repos/sagikazarmark/business/forks","keys_url":"https://api.github.com/repos/sagikazarmark/business/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sagikazarmark/business/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sagikazarmark/business/teams","hooks_url":"https://api.github.com/repos/sagikazarmark/business/hooks","issue_events_url":"https://api.github.com/repos/sagikazarmark/business/issues/events{/number}","events_url":"https://api.github.com/repos/sagikazarmark/business/events","assignees_url":"https://api.github.com/repos/sagikazarmark/business/assignees{/user}","branches_url":"https://api.github.com/repos/sagikazarmark/business/branches{/branch}","tags_url":"https://api.github.com/repos/sagikazarmark/business/tags","blobs_url":"https://api.github.com/repos/sagikazarmark/business/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sagikazarmark/business/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sagikazarmark/business/git/refs{/sha}","trees_url":"https://api.github.com/repos/sagikazarmark/business/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sagikazarmark/business/statuses/{sha}","languages_url":"https://api.github.com/repos/sagikazarmark/business/languages","stargazers_url":"https://api.github.com/repos/sagikazarmark/business/stargazers","contributors_url":"https://api.github.com/repos/sagikazarmark/business/contributors","subscribers_url":"https://api.github.com/repos/sagikazarmark/business/subscribers","subscription_url":"https://api.github.com/repos/sagikazarmark/business/subscription","commits_url":"https://api.github.com/repos/sagikazarmark/business/commits{/sha}","git_commits_url":"https://api.github.com/repos/sagikazarmark/business/git/commits{/sha}","comments_url":"https://api.github.com/repos/sagikazarmark/business/comments{/number}","issue_comment_url":"https://api.github.com/repos/sagikazarmark/business/issues/comments{/number}","contents_url":"https://api.github.com/repos/sagikazarmark/business/contents/{+path}","compare_url":"https://api.github.com/repos/sagikazarmark/business/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sagikazarmark/business/merges","archive_url":"https://api.github.com/repos/sagikazarmark/business/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sagikazarmark/business/downloads","issues_url":"https://api.github.com/repos/sagikazarmark/business/issues{/number}","pulls_url":"https://api.github.com/repos/sagikazarmark/business/pulls{/number}","milestones_url":"https://api.github.com/repos/sagikazarmark/business/milestones{/number}","notifications_url":"https://api.github.com/repos/sagikazarmark/business/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sagikazarmark/business/labels{/name}","releases_url":"https://api.github.com/repos/sagikazarmark/business/releases{/id}","created_at":"2015-07-07T09:07:34Z","updated_at":"2015-07-07T09:07:35Z","pushed_at":"2015-07-08T09:18:54Z","git_url":"git://github.com/sagikazarmark/business.git","ssh_url":"git@github.com:sagikazarmark/business.git","clone_url":"https://github.com/sagikazarmark/business.git","svn_url":"https://github.com/sagikazarmark/business","homepage":"http://florianv.github.io/business","size":118,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"florianv:master","ref":"master","sha":"601a2d0dd264be0c0d754954994d0babc27bc2e1","user":{"login":"florianv","id":1586668,"avatar_url":"https://avatars.githubusercontent.com/u/1586668?v=3","gravatar_id":"","url":"https://api.github.com/users/florianv","html_url":"https://github.com/florianv","followers_url":"https://api.github.com/users/florianv/followers","following_url":"https://api.github.com/users/florianv/following{/other_user}","gists_url":"https://api.github.com/users/florianv/gists{/gist_id}","starred_url":"https://api.github.com/users/florianv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/florianv/subscriptions","organizations_url":"https://api.github.com/users/florianv/orgs","repos_url":"https://api.github.com/users/florianv/repos","events_url":"https://api.github.com/users/florianv/events{/privacy}","received_events_url":"https://api.github.com/users/florianv/received_events","type":"User","site_admin":false},"repo":{"id":36260149,"name":"business","full_name":"florianv/business","owner":{"login":"florianv","id":1586668,"avatar_url":"https://avatars.githubusercontent.com/u/1586668?v=3","gravatar_id":"","url":"https://api.github.com/users/florianv","html_url":"https://github.com/florianv","followers_url":"https://api.github.com/users/florianv/followers","following_url":"https://api.github.com/users/florianv/following{/other_user}","gists_url":"https://api.github.com/users/florianv/gists{/gist_id}","starred_url":"https://api.github.com/users/florianv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/florianv/subscriptions","organizations_url":"https://api.github.com/users/florianv/orgs","repos_url":"https://api.github.com/users/florianv/repos","events_url":"https://api.github.com/users/florianv/events{/privacy}","received_events_url":"https://api.github.com/users/florianv/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/florianv/business","description":"DateTime calculations in business hours","fork":false,"url":"https://api.github.com/repos/florianv/business","forks_url":"https://api.github.com/repos/florianv/business/forks","keys_url":"https://api.github.com/repos/florianv/business/keys{/key_id}","collaborators_url":"https://api.github.com/repos/florianv/business/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/florianv/business/teams","hooks_url":"https://api.github.com/repos/florianv/business/hooks","issue_events_url":"https://api.github.com/repos/florianv/business/issues/events{/number}","events_url":"https://api.github.com/repos/florianv/business/events","assignees_url":"https://api.github.com/repos/florianv/business/assignees{/user}","branches_url":"https://api.github.com/repos/florianv/business/branches{/branch}","tags_url":"https://api.github.com/repos/florianv/business/tags","blobs_url":"https://api.github.com/repos/florianv/business/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/florianv/business/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/florianv/business/git/refs{/sha}","trees_url":"https://api.github.com/repos/florianv/business/git/trees{/sha}","statuses_url":"https://api.github.com/repos/florianv/business/statuses/{sha}","languages_url":"https://api.github.com/repos/florianv/business/languages","stargazers_url":"https://api.github.com/repos/florianv/business/stargazers","contributors_url":"https://api.github.com/repos/florianv/business/contributors","subscribers_url":"https://api.github.com/repos/florianv/business/subscribers","subscription_url":"https://api.github.com/repos/florianv/business/subscription","commits_url":"https://api.github.com/repos/florianv/business/commits{/sha}","git_commits_url":"https://api.github.com/repos/florianv/business/git/commits{/sha}","comments_url":"https://api.github.com/repos/florianv/business/comments{/number}","issue_comment_url":"https://api.github.com/repos/florianv/business/issues/comments{/number}","contents_url":"https://api.github.com/repos/florianv/business/contents/{+path}","compare_url":"https://api.github.com/repos/florianv/business/compare/{base}...{head}","merges_url":"https://api.github.com/repos/florianv/business/merges","archive_url":"https://api.github.com/repos/florianv/business/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/florianv/business/downloads","issues_url":"https://api.github.com/repos/florianv/business/issues{/number}","pulls_url":"https://api.github.com/repos/florianv/business/pulls{/number}","milestones_url":"https://api.github.com/repos/florianv/business/milestones{/number}","notifications_url":"https://api.github.com/repos/florianv/business/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/florianv/business/labels{/name}","releases_url":"https://api.github.com/repos/florianv/business/releases{/id}","created_at":"2015-05-25T23:35:02Z","updated_at":"2015-07-07T21:34:08Z","pushed_at":"2015-07-08T09:20:15Z","git_url":"git://github.com/florianv/business.git","ssh_url":"git@github.com:florianv/business.git","clone_url":"https://github.com/florianv/business.git","svn_url":"https://github.com/florianv/business","homepage":"http://florianv.github.io/business","size":238,"stargazers_count":225,"watchers_count":225,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":11,"mirror_url":null,"open_issues_count":4,"forks":11,"open_issues":4,"watchers":225,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/florianv/business/pulls/8"},"html":{"href":"https://github.com/florianv/business/pull/8"},"issue":{"href":"https://api.github.com/repos/florianv/business/issues/8"},"comments":{"href":"https://api.github.com/repos/florianv/business/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/florianv/business/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/florianv/business/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/florianv/business/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/florianv/business/statuses/e43b4bb56714817e2a4f18ecc5043da2e2f9746f"}}}}