{"action":"created","comment":{"url":"https://api.github.com/repos/moneyphp/iso-currencies/pulls/comments/208372513","pull_request_review_id":144168631,"id":208372513,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwODM3MjUxMw==","diff_hunk":"@@ -10,27 +10,87 @@\n     /**\n      * @var\n      */\n-    private $location;\n+    private $currentLocation;\n+\n+    /**\n+     * @var\n+     */\n+    private $historicLocation;\n \n     /**\n      * @var null|array|Country[]\n      */\n-    private $countries;\n+    private $currentCountries;\n+\n+    /**\n+     * @var null|array|Country[]\n+     */\n+    private $historicCountries;\n+\n+    /**\n+     * @param $currentLocation\n+     * @param $historicLocation\n+     */\n+    public function __construct($currentLocation, $historicLocation)\n+    {\n+        $this->currentLocation = $currentLocation;\n+        $this->historicLocation = $historicLocation;\n+    }\n+\n+    /**\n+     * @param $fileName\n+     * @param Serializer $serializer\n+     */\n+    public function saveCurrentCountriesTo($fileName, Serializer $serializer)\n+    {\n+        $this->fetch();\n+\n+        file_put_contents(\n+            $fileName,\n+            $serializer->serialize($this->currentCountries)\n+        );\n+    }\n \n     /**\n-     * @param $location\n+     * @param $fileName\n+     * @param Serializer $serializer\n      */\n-    public function __construct($location)\n+    public function saveHistoricCountriesTo($fileName, Serializer $serializer)\n     {\n-        $this->location = $location;\n+        $this->fetch();\n+\n+        file_put_contents(\n+            $fileName,\n+            $serializer->serialize($this->historicCountries)\n+        );\n+    }\n+\n+    /**\n+     * @param $fileName","path":"src/Fetcher.php","position":65,"original_position":65,"commit_id":"6cd663075fcd00ba0b9db5e08b42db2b0495f1d5","original_commit_id":"6cd663075fcd00ba0b9db5e08b42db2b0495f1d5","user":{"login":"frederikbosch","id":1552577,"node_id":"MDQ6VXNlcjE1NTI1Nzc=","avatar_url":"https://avatars2.githubusercontent.com/u/1552577?v=4","gravatar_id":"","url":"https://api.github.com/users/frederikbosch","html_url":"https://github.com/frederikbosch","followers_url":"https://api.github.com/users/frederikbosch/followers","following_url":"https://api.github.com/users/frederikbosch/following{/other_user}","gists_url":"https://api.github.com/users/frederikbosch/gists{/gist_id}","starred_url":"https://api.github.com/users/frederikbosch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frederikbosch/subscriptions","organizations_url":"https://api.github.com/users/frederikbosch/orgs","repos_url":"https://api.github.com/users/frederikbosch/repos","events_url":"https://api.github.com/users/frederikbosch/events{/privacy}","received_events_url":"https://api.github.com/users/frederikbosch/received_events","type":"User","site_admin":false},"body":"Let's add `string` here.","created_at":"2018-08-07T20:23:05Z","updated_at":"2018-08-07T20:26:41Z","html_url":"https://github.com/moneyphp/iso-currencies/pull/9#discussion_r208372513","pull_request_url":"https://api.github.com/repos/moneyphp/iso-currencies/pulls/9","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/moneyphp/iso-currencies/pulls/comments/208372513"},"html":{"href":"https://github.com/moneyphp/iso-currencies/pull/9#discussion_r208372513"},"pull_request":{"href":"https://api.github.com/repos/moneyphp/iso-currencies/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/moneyphp/iso-currencies/pulls/9","id":206731586,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2NzMxNTg2","html_url":"https://github.com/moneyphp/iso-currencies/pull/9","diff_url":"https://github.com/moneyphp/iso-currencies/pull/9.diff","patch_url":"https://github.com/moneyphp/iso-currencies/pull/9.patch","issue_url":"https://api.github.com/repos/moneyphp/iso-currencies/issues/9","number":9,"state":"open","locked":false,"title":"Download both current and historic ISO currencies","user":{"login":"m00t","id":301661,"node_id":"MDQ6VXNlcjMwMTY2MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/301661?v=4","gravatar_id":"","url":"https://api.github.com/users/m00t","html_url":"https://github.com/m00t","followers_url":"https://api.github.com/users/m00t/followers","following_url":"https://api.github.com/users/m00t/following{/other_user}","gists_url":"https://api.github.com/users/m00t/gists{/gist_id}","starred_url":"https://api.github.com/users/m00t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m00t/subscriptions","organizations_url":"https://api.github.com/users/m00t/orgs","repos_url":"https://api.github.com/users/m00t/repos","events_url":"https://api.github.com/users/m00t/events{/privacy}","received_events_url":"https://api.github.com/users/m00t/received_events","type":"User","site_admin":false},"body":"see #8 : Add list of currencies that includes historical currencies","created_at":"2018-08-07T15:08:05Z","updated_at":"2018-08-07T20:26:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6ef4d8846a22c91b7a43cc5b3632beada9027b0b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/moneyphp/iso-currencies/pulls/9/commits","review_comments_url":"https://api.github.com/repos/moneyphp/iso-currencies/pulls/9/comments","review_comment_url":"https://api.github.com/repos/moneyphp/iso-currencies/pulls/comments{/number}","comments_url":"https://api.github.com/repos/moneyphp/iso-currencies/issues/9/comments","statuses_url":"https://api.github.com/repos/moneyphp/iso-currencies/statuses/6cd663075fcd00ba0b9db5e08b42db2b0495f1d5","head":{"label":"m00t:add_historic_countries","ref":"add_historic_countries","sha":"6cd663075fcd00ba0b9db5e08b42db2b0495f1d5","user":{"login":"m00t","id":301661,"node_id":"MDQ6VXNlcjMwMTY2MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/301661?v=4","gravatar_id":"","url":"https://api.github.com/users/m00t","html_url":"https://github.com/m00t","followers_url":"https://api.github.com/users/m00t/followers","following_url":"https://api.github.com/users/m00t/following{/other_user}","gists_url":"https://api.github.com/users/m00t/gists{/gist_id}","starred_url":"https://api.github.com/users/m00t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m00t/subscriptions","organizations_url":"https://api.github.com/users/m00t/orgs","repos_url":"https://api.github.com/users/m00t/repos","events_url":"https://api.github.com/users/m00t/events{/privacy}","received_events_url":"https://api.github.com/users/m00t/received_events","type":"User","site_admin":false},"repo":{"id":143888128,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM4ODgxMjg=","name":"iso-currencies","full_name":"m00t/iso-currencies","owner":{"login":"m00t","id":301661,"node_id":"MDQ6VXNlcjMwMTY2MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/301661?v=4","gravatar_id":"","url":"https://api.github.com/users/m00t","html_url":"https://github.com/m00t","followers_url":"https://api.github.com/users/m00t/followers","following_url":"https://api.github.com/users/m00t/following{/other_user}","gists_url":"https://api.github.com/users/m00t/gists{/gist_id}","starred_url":"https://api.github.com/users/m00t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m00t/subscriptions","organizations_url":"https://api.github.com/users/m00t/orgs","repos_url":"https://api.github.com/users/m00t/repos","events_url":"https://api.github.com/users/m00t/events{/privacy}","received_events_url":"https://api.github.com/users/m00t/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/m00t/iso-currencies","description":"Provides up-to-date list of ISO 4217 currencies","fork":true,"url":"https://api.github.com/repos/m00t/iso-currencies","forks_url":"https://api.github.com/repos/m00t/iso-currencies/forks","keys_url":"https://api.github.com/repos/m00t/iso-currencies/keys{/key_id}","collaborators_url":"https://api.github.com/repos/m00t/iso-currencies/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/m00t/iso-currencies/teams","hooks_url":"https://api.github.com/repos/m00t/iso-currencies/hooks","issue_events_url":"https://api.github.com/repos/m00t/iso-currencies/issues/events{/number}","events_url":"https://api.github.com/repos/m00t/iso-currencies/events","assignees_url":"https://api.github.com/repos/m00t/iso-currencies/assignees{/user}","branches_url":"https://api.github.com/repos/m00t/iso-currencies/branches{/branch}","tags_url":"https://api.github.com/repos/m00t/iso-currencies/tags","blobs_url":"https://api.github.com/repos/m00t/iso-currencies/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/m00t/iso-currencies/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/m00t/iso-currencies/git/refs{/sha}","trees_url":"https://api.github.com/repos/m00t/iso-currencies/git/trees{/sha}","statuses_url":"https://api.github.com/repos/m00t/iso-currencies/statuses/{sha}","languages_url":"https://api.github.com/repos/m00t/iso-currencies/languages","stargazers_url":"https://api.github.com/repos/m00t/iso-currencies/stargazers","contributors_url":"https://api.github.com/repos/m00t/iso-currencies/contributors","subscribers_url":"https://api.github.com/repos/m00t/iso-currencies/subscribers","subscription_url":"https://api.github.com/repos/m00t/iso-currencies/subscription","commits_url":"https://api.github.com/repos/m00t/iso-currencies/commits{/sha}","git_commits_url":"https://api.github.com/repos/m00t/iso-currencies/git/commits{/sha}","comments_url":"https://api.github.com/repos/m00t/iso-currencies/comments{/number}","issue_comment_url":"https://api.github.com/repos/m00t/iso-currencies/issues/comments{/number}","contents_url":"https://api.github.com/repos/m00t/iso-currencies/contents/{+path}","compare_url":"https://api.github.com/repos/m00t/iso-currencies/compare/{base}...{head}","merges_url":"https://api.github.com/repos/m00t/iso-currencies/merges","archive_url":"https://api.github.com/repos/m00t/iso-currencies/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/m00t/iso-currencies/downloads","issues_url":"https://api.github.com/repos/m00t/iso-currencies/issues{/number}","pulls_url":"https://api.github.com/repos/m00t/iso-currencies/pulls{/number}","milestones_url":"https://api.github.com/repos/m00t/iso-currencies/milestones{/number}","notifications_url":"https://api.github.com/repos/m00t/iso-currencies/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/m00t/iso-currencies/labels{/name}","releases_url":"https://api.github.com/repos/m00t/iso-currencies/releases{/id}","deployments_url":"https://api.github.com/repos/m00t/iso-currencies/deployments","created_at":"2018-08-07T14:50:43Z","updated_at":"2018-08-07T14:50:45Z","pushed_at":"2018-08-07T15:06:48Z","git_url":"git://github.com/m00t/iso-currencies.git","ssh_url":"git@github.com:m00t/iso-currencies.git","clone_url":"https://github.com/m00t/iso-currencies.git","svn_url":"https://github.com/m00t/iso-currencies","homepage":null,"size":39,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"moneyphp:master","ref":"master","sha":"c08c13e4121441b798710c6a3257edb412909366","user":{"login":"moneyphp","id":17042185,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MDQyMTg1","avatar_url":"https://avatars0.githubusercontent.com/u/17042185?v=4","gravatar_id":"","url":"https://api.github.com/users/moneyphp","html_url":"https://github.com/moneyphp","followers_url":"https://api.github.com/users/moneyphp/followers","following_url":"https://api.github.com/users/moneyphp/following{/other_user}","gists_url":"https://api.github.com/users/moneyphp/gists{/gist_id}","starred_url":"https://api.github.com/users/moneyphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moneyphp/subscriptions","organizations_url":"https://api.github.com/users/moneyphp/orgs","repos_url":"https://api.github.com/users/moneyphp/repos","events_url":"https://api.github.com/users/moneyphp/events{/privacy}","received_events_url":"https://api.github.com/users/moneyphp/received_events","type":"Organization","site_admin":false},"repo":{"id":64311781,"node_id":"MDEwOlJlcG9zaXRvcnk2NDMxMTc4MQ==","name":"iso-currencies","full_name":"moneyphp/iso-currencies","owner":{"login":"moneyphp","id":17042185,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MDQyMTg1","avatar_url":"https://avatars0.githubusercontent.com/u/17042185?v=4","gravatar_id":"","url":"https://api.github.com/users/moneyphp","html_url":"https://github.com/moneyphp","followers_url":"https://api.github.com/users/moneyphp/followers","following_url":"https://api.github.com/users/moneyphp/following{/other_user}","gists_url":"https://api.github.com/users/moneyphp/gists{/gist_id}","starred_url":"https://api.github.com/users/moneyphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moneyphp/subscriptions","organizations_url":"https://api.github.com/users/moneyphp/orgs","repos_url":"https://api.github.com/users/moneyphp/repos","events_url":"https://api.github.com/users/moneyphp/events{/privacy}","received_events_url":"https://api.github.com/users/moneyphp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/moneyphp/iso-currencies","description":"Provides up-to-date list of ISO 4217 currencies","fork":false,"url":"https://api.github.com/repos/moneyphp/iso-currencies","forks_url":"https://api.github.com/repos/moneyphp/iso-currencies/forks","keys_url":"https://api.github.com/repos/moneyphp/iso-currencies/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moneyphp/iso-currencies/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moneyphp/iso-currencies/teams","hooks_url":"https://api.github.com/repos/moneyphp/iso-currencies/hooks","issue_events_url":"https://api.github.com/repos/moneyphp/iso-currencies/issues/events{/number}","events_url":"https://api.github.com/repos/moneyphp/iso-currencies/events","assignees_url":"https://api.github.com/repos/moneyphp/iso-currencies/assignees{/user}","branches_url":"https://api.github.com/repos/moneyphp/iso-currencies/branches{/branch}","tags_url":"https://api.github.com/repos/moneyphp/iso-currencies/tags","blobs_url":"https://api.github.com/repos/moneyphp/iso-currencies/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moneyphp/iso-currencies/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moneyphp/iso-currencies/git/refs{/sha}","trees_url":"https://api.github.com/repos/moneyphp/iso-currencies/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moneyphp/iso-currencies/statuses/{sha}","languages_url":"https://api.github.com/repos/moneyphp/iso-currencies/languages","stargazers_url":"https://api.github.com/repos/moneyphp/iso-currencies/stargazers","contributors_url":"https://api.github.com/repos/moneyphp/iso-currencies/contributors","subscribers_url":"https://api.github.com/repos/moneyphp/iso-currencies/subscribers","subscription_url":"https://api.github.com/repos/moneyphp/iso-currencies/subscription","commits_url":"https://api.github.com/repos/moneyphp/iso-currencies/commits{/sha}","git_commits_url":"https://api.github.com/repos/moneyphp/iso-currencies/git/commits{/sha}","comments_url":"https://api.github.com/repos/moneyphp/iso-currencies/comments{/number}","issue_comment_url":"https://api.github.com/repos/moneyphp/iso-currencies/issues/comments{/number}","contents_url":"https://api.github.com/repos/moneyphp/iso-currencies/contents/{+path}","compare_url":"https://api.github.com/repos/moneyphp/iso-currencies/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moneyphp/iso-currencies/merges","archive_url":"https://api.github.com/repos/moneyphp/iso-currencies/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moneyphp/iso-currencies/downloads","issues_url":"https://api.github.com/repos/moneyphp/iso-currencies/issues{/number}","pulls_url":"https://api.github.com/repos/moneyphp/iso-currencies/pulls{/number}","milestones_url":"https://api.github.com/repos/moneyphp/iso-currencies/milestones{/number}","notifications_url":"https://api.github.com/repos/moneyphp/iso-currencies/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moneyphp/iso-currencies/labels{/name}","releases_url":"https://api.github.com/repos/moneyphp/iso-currencies/releases{/id}","deployments_url":"https://api.github.com/repos/moneyphp/iso-currencies/deployments","created_at":"2016-07-27T13:42:56Z","updated_at":"2018-06-25T08:19:53Z","pushed_at":"2018-08-07T15:08:06Z","git_url":"git://github.com/moneyphp/iso-currencies.git","ssh_url":"git@github.com:moneyphp/iso-currencies.git","clone_url":"https://github.com/moneyphp/iso-currencies.git","svn_url":"https://github.com/moneyphp/iso-currencies","homepage":null,"size":30,"stargazers_count":11,"watchers_count":11,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":5,"open_issues":2,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/moneyphp/iso-currencies/pulls/9"},"html":{"href":"https://github.com/moneyphp/iso-currencies/pull/9"},"issue":{"href":"https://api.github.com/repos/moneyphp/iso-currencies/issues/9"},"comments":{"href":"https://api.github.com/repos/moneyphp/iso-currencies/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/moneyphp/iso-currencies/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/moneyphp/iso-currencies/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/moneyphp/iso-currencies/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/moneyphp/iso-currencies/statuses/6cd663075fcd00ba0b9db5e08b42db2b0495f1d5"}},"author_association":"NONE"}}
{"actor":{"display_login":"frederikbosch"}}