GitHub PullRequestReviewCommentEvent at 2014-10-10 21:44:02
Repository: Geocoder
Actor: pyrech
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/geocoder-php/Geocoder/pulls/comments/18732701","id":18732701,"diff_hunk":"@@ -0,0 +1,273 @@\n+<?php\n+\n+/**\n+ * This file is part of the Geocoder package.\n+ * For the full copyright and license information, please view the LICENSE\n+ * file that was distributed with this source code.\n+ *\n+ * @license    MIT License\n+ */\n+\n+namespace Geocoder\\Result;\n+\n+/**\n+ * @author William Durand <william.durand1@gmail.com>\n+ */\n+final class Address\n+{\n+    /**\n+     * @var Coordinates\n+     */\n+    private $coordinates;\n+\n+    /**\n+     * @var Bounds\n+     */\n+    private $bounds;\n+\n+    /**\n+     * @var string|int\n+     */\n+    private $streetNumber;\n+\n+    /**\n+     * @var string\n+     */\n+    private $streetName;\n+\n+    /**\n+     * @var string\n+     */\n+    private $subLocality;\n+\n+    /**\n+     * @var string\n+     */\n+    private $locality;\n+\n+    /**\n+     * @var string\n+     */\n+    private $postalCode;\n+\n+    /**\n+     * @var County\n+     */\n+    private $county;\n+\n+    /**\n+     * @var Region\n+     */\n+    private $region;\n+\n+    /**\n+     * @var Country\n+     */\n+    private $country;\n+\n+    /**\n+     * @var string\n+     */\n+    private $timezone;\n+\n+    public function __construct(Coordinates $coordinates, Bounds $bounds, $streetNumber, $streetName, $postalCode, $locality, $subLocality, County $county, Region $region, Country $country, $timezone)\n+    {\n+        $this->coordinates  = $coordinates;\n+        $this->bounds       = $bounds;\n+        $this->streetNumber = $streetNumber;\n+        $this->streetName   = $streetName;\n+        $this->postalCode   = $postalCode;\n+        $this->locality         = $locality;","path":"src/Geocoder/Result/Address.php","position":80,"original_position":80,"commit_id":"71f4ba146a6a93dc401755ef6b6d089551b7ddbc","original_commit_id":"71f4ba146a6a93dc401755ef6b6d089551b7ddbc","user":{"login":"pyrech","id":2021641,"avatar_url":"https://avatars.githubusercontent.com/u/2021641?v=2","gravatar_id":"","url":"https://api.github.com/users/pyrech","html_url":"https://github.com/pyrech","followers_url":"https://api.github.com/users/pyrech/followers","following_url":"https://api.github.com/users/pyrech/following{/other_user}","gists_url":"https://api.github.com/users/pyrech/gists{/gist_id}","starred_url":"https://api.github.com/users/pyrech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyrech/subscriptions","organizations_url":"https://api.github.com/users/pyrech/orgs","repos_url":"https://api.github.com/users/pyrech/repos","events_url":"https://api.github.com/users/pyrech/events{/privacy}","received_events_url":"https://api.github.com/users/pyrech/received_events","type":"User","site_admin":false},"body":"What a shame, 4 extra spaces! :smile:","created_at":"2014-10-10T21:44:02Z","updated_at":"2014-10-10T21:44:02Z","html_url":"https://github.com/geocoder-php/Geocoder/pull/350#discussion_r18732701","pull_request_url":"https://api.github.com/repos/geocoder-php/Geocoder/pulls/350","_links":{"self":{"href":"https://api.github.com/repos/geocoder-php/Geocoder/pulls/comments/18732701"},"html":{"href":"https://github.com/geocoder-php/Geocoder/pull/350#discussion_r18732701"},"pull_request":{"href":"https://api.github.com/repos/geocoder-php/Geocoder/pulls/350"}}},"pull_request":{"url":"https://api.github.com/repos/geocoder-php/Geocoder/pulls/350","id":22355128,"html_url":"https://github.com/geocoder-php/Geocoder/pull/350","diff_url":"https://github.com/geocoder-php/Geocoder/pull/350.diff","patch_url":"https://github.com/geocoder-php/Geocoder/pull/350.patch","issue_url":"https://api.github.com/repos/geocoder-php/Geocoder/issues/350","number":350,"state":"open","locked":false,"title":"[RFC] Refactoring for #345","user":{"login":"willdurand","id":217628,"avatar_url":"https://avatars.githubusercontent.com/u/217628?v=2","gravatar_id":"","url":"https://api.github.com/users/willdurand","html_url":"https://github.com/willdurand","followers_url":"https://api.github.com/users/willdurand/followers","following_url":"https://api.github.com/users/willdurand/following{/other_user}","gists_url":"https://api.github.com/users/willdurand/gists{/gist_id}","starred_url":"https://api.github.com/users/willdurand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willdurand/subscriptions","organizations_url":"https://api.github.com/users/willdurand/orgs","repos_url":"https://api.github.com/users/willdurand/repos","events_url":"https://api.github.com/users/willdurand/events{/privacy}","received_events_url":"https://api.github.com/users/willdurand/received_events","type":"User","site_admin":false},"body":"Okay so I've started to hack on Geocoder v3, especially on #345.\r\n\r\nHere is my \"wishlist\":\r\n\r\n* I'd like to remove class suffixes such as `Interface` or `Exception` when possible\r\n* I'd like to return more meaningful exception messages\r\n* I' d like to always return a set of `Address` objects, the new name of our `ResultInterface|Geocoded` objects. It is called `Address` to fit the XAL standard (also used by [Android](http://developer.android.com/reference/android/location/Address.html))\r\n* I'd like to make immutable objects and a set of coherent classes for the results. I came across the following model: a result is an `Address` with `Coordinates`, `Bounds`, `County`, `Region`, and `Country` + some properties such as street name|number, city, timezone, etc.\r\n* (edit) Bump PHP minimum version to 5.4+ \r\n\r\nThis code is not working yet, but I'd like your feedback on it. Would it make sense to refactor the Result part that way? I mean, it won't be possible to override the factories anymore, but who uses that feature?\r\nAlso, it will create new objects for end users, and they'll have to deal with them. In another hand, it (hopefully) provides a stronger and better \"model\" layer.\r\n\r\n(PS: Last commit will be split once I'll get enough feedback.)","created_at":"2014-10-07T14:12:58Z","updated_at":"2014-10-10T21:44:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0461048c91657bfecd4af5c8e26ec29b4898440f","assignee":null,"milestone":{"url":"https://api.github.com/repos/geocoder-php/Geocoder/milestones/2","labels_url":"https://api.github.com/repos/geocoder-php/Geocoder/milestones/2/labels","id":794055,"number":2,"title":"3.0.0","description":"","creator":{"login":"willdurand","id":217628,"avatar_url":"https://avatars.githubusercontent.com/u/217628?v=2","gravatar_id":"","url":"https://api.github.com/users/willdurand","html_url":"https://github.com/willdurand","followers_url":"https://api.github.com/users/willdurand/followers","following_url":"https://api.github.com/users/willdurand/following{/other_user}","gists_url":"https://api.github.com/users/willdurand/gists{/gist_id}","starred_url":"https://api.github.com/users/willdurand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/willdurand/subscriptions","organizations_url":"https://api.github.com/users/willdurand/orgs","repos_url":"https://api.github.com/users/willdurand/repos","events_url":"https://api.github.com/users/willdurand/events{/privacy}","received_events_url":"https://api.github.com/users/willdurand/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":7,"state":"open","created_at":"2014-09-18T07:47:48Z","updated_at":"2014-10-08T08:26:10Z","due_on":null},"commits_url":"https://api.github.com/repos/geocoder-php/Geocoder/pulls/350/commits","review_comments_url":"https://api.github.com/repos/geocoder-php/Geocoder/pulls/350/comments","review_comment_url":"https://api.github.com/repos/geocoder-php/Geocoder/pulls/comments/{number}","comments_url":"https://api.github.com/repos/geocoder-php/Geocoder/issues/350/comments","statuses_url":"https://api.github.com/repos/geocoder-php/Geocoder/statuses/71f4ba146a6a93dc401755ef6b6d089551b7ddbc","head":{"label":"geocoder-php:refactoring","ref":"refactoring","sha":"71f4ba146a6a93dc401755ef6b6d089551b7ddbc","user":{"login":"geocoder-php","id":5303359,"avatar_url":"https://avatars.githubusercontent.com/u/5303359?v=2","gravatar_id":"","url":"https://api.github.com/users/geocoder-php","html_url":"https://github.com/geocoder-php","followers_url":"https://api.github.com/users/geocoder-php/followers","following_url":"https://api.github.com/users/geocoder-php/following{/other_user}","gists_url":"https://api.github.com/users/geocoder-php/gists{/gist_id}","starred_url":"https://api.github.com/users/geocoder-php/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geocoder-php/subscriptions","organizations_url":"https://api.github.com/users/geocoder-php/orgs","repos_url":"https://api.github.com/users/geocoder-php/repos","events_url":"https://api.github.com/users/geocoder-php/events{/privacy}","received_events_url":"https://api.github.com/users/geocoder-php/received_events","type":"Organization","site_admin":false},"repo":{"id":2729639,"name":"Geocoder","full_name":"geocoder-php/Geocoder","owner":{"login":"geocoder-php","id":5303359,"avatar_url":"https://avatars.githubusercontent.com/u/5303359?v=2","gravatar_id":"","url":"https://api.github.com/users/geocoder-php","html_url":"https://github.com/geocoder-php","followers_url":"https://api.github.com/users/geocoder-php/followers","following_url":"https://api.github.com/users/geocoder-php/following{/other_user}","gists_url":"https://api.github.com/users/geocoder-php/gists{/gist_id}","starred_url":"https://api.github.com/users/geocoder-php/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geocoder-php/subscriptions","organizations_url":"https://api.github.com/users/geocoder-php/orgs","repos_url":"https://api.github.com/users/geocoder-php/repos","events_url":"https://api.github.com/users/geocoder-php/events{/privacy}","received_events_url":"https://api.github.com/users/geocoder-php/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/geocoder-php/Geocoder","description":"The most featured Geocoder library written in PHP.","fork":false,"url":"https://api.github.com/repos/geocoder-php/Geocoder","forks_url":"https://api.github.com/repos/geocoder-php/Geocoder/forks","keys_url":"https://api.github.com/repos/geocoder-php/Geocoder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geocoder-php/Geocoder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geocoder-php/Geocoder/teams","hooks_url":"https://api.github.com/repos/geocoder-php/Geocoder/hooks","issue_events_url":"https://api.github.com/repos/geocoder-php/Geocoder/issues/events{/number}","events_url":"https://api.github.com/repos/geocoder-php/Geocoder/events","assignees_url":"https://api.github.com/repos/geocoder-php/Geocoder/assignees{/user}","branches_url":"https://api.github.com/repos/geocoder-php/Geocoder/branches{/branch}","tags_url":"https://api.github.com/repos/geocoder-php/Geocoder/tags","blobs_url":"https://api.github.com/repos/geocoder-php/Geocoder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geocoder-php/Geocoder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geocoder-php/Geocoder/git/refs{/sha}","trees_url":"https://api.github.com/repos/geocoder-php/Geocoder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geocoder-php/Geocoder/statuses/{sha}","languages_url":"https://api.github.com/repos/geocoder-php/Geocoder/languages","stargazers_url":"https://api.github.com/repos/geocoder-php/Geocoder/stargazers","contributors_url":"https://api.github.com/repos/geocoder-php/Geocoder/contributors","subscribers_url":"https://api.github.com/repos/geocoder-php/Geocoder/subscribers","subscription_url":"https://api.github.com/repos/geocoder-php/Geocoder/subscription","commits_url":"https://api.github.com/repos/geocoder-php/Geocoder/commits{/sha}","git_commits_url":"https://api.github.com/repos/geocoder-php/Geocoder/git/commits{/sha}","comments_url":"https://api.github.com/repos/geocoder-php/Geocoder/comments{/number}","issue_comment_url":"https://api.github.com/repos/geocoder-php/Geocoder/issues/comments/{number}","contents_url":"https://api.github.com/repos/geocoder-php/Geocoder/contents/{+path}","compare_url":"https://api.github.com/repos/geocoder-php/Geocoder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geocoder-php/Geocoder/merges","archive_url":"https://api.github.com/repos/geocoder-php/Geocoder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geocoder-php/Geocoder/downloads","issues_url":"https://api.github.com/repos/geocoder-php/Geocoder/issues{/number}","pulls_url":"https://api.github.com/repos/geocoder-php/Geocoder/pulls{/number}","milestones_url":"https://api.github.com/repos/geocoder-php/Geocoder/milestones{/number}","notifications_url":"https://api.github.com/repos/geocoder-php/Geocoder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geocoder-php/Geocoder/labels{/name}","releases_url":"https://api.github.com/repos/geocoder-php/Geocoder/releases{/id}","created_at":"2011-11-07T21:56:41Z","updated_at":"2014-10-10T16:41:58Z","pushed_at":"2014-10-10T09:49:54Z","git_url":"git://github.com/geocoder-php/Geocoder.git","ssh_url":"git@github.com:geocoder-php/Geocoder.git","clone_url":"https://github.com/geocoder-php/Geocoder.git","svn_url":"https://github.com/geocoder-php/Geocoder","homepage":"http://geocoder-php.org/Geocoder","size":15631,"stargazers_count":1743,"watchers_count":1743,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":195,"mirror_url":null,"open_issues_count":7,"forks":195,"open_issues":7,"watchers":1743,"default_branch":"master"}},"base":{"label":"geocoder-php:master","ref":"master","sha":"5af70a58f627125f8ea745335781dc47a9ca7dae","user":{"login":"geocoder-php","id":5303359,"avatar_url":"https://avatars.githubusercontent.com/u/5303359?v=2","gravatar_id":"","url":"https://api.github.com/users/geocoder-php","html_url":"https://github.com/geocoder-php","followers_url":"https://api.github.com/users/geocoder-php/followers","following_url":"https://api.github.com/users/geocoder-php/following{/other_user}","gists_url":"https://api.github.com/users/geocoder-php/gists{/gist_id}","starred_url":"https://api.github.com/users/geocoder-php/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geocoder-php/subscriptions","organizations_url":"https://api.github.com/users/geocoder-php/orgs","repos_url":"https://api.github.com/users/geocoder-php/repos","events_url":"https://api.github.com/users/geocoder-php/events{/privacy}","received_events_url":"https://api.github.com/users/geocoder-php/received_events","type":"Organization","site_admin":false},"repo":{"id":2729639,"name":"Geocoder","full_name":"geocoder-php/Geocoder","owner":{"login":"geocoder-php","id":5303359,"avatar_url":"https://avatars.githubusercontent.com/u/5303359?v=2","gravatar_id":"","url":"https://api.github.com/users/geocoder-php","html_url":"https://github.com/geocoder-php","followers_url":"https://api.github.com/users/geocoder-php/followers","following_url":"https://api.github.com/users/geocoder-php/following{/other_user}","gists_url":"https://api.github.com/users/geocoder-php/gists{/gist_id}","starred_url":"https://api.github.com/users/geocoder-php/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/geocoder-php/subscriptions","organizations_url":"https://api.github.com/users/geocoder-php/orgs","repos_url":"https://api.github.com/users/geocoder-php/repos","events_url":"https://api.github.com/users/geocoder-php/events{/privacy}","received_events_url":"https://api.github.com/users/geocoder-php/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/geocoder-php/Geocoder","description":"The most featured Geocoder library written in PHP.","fork":false,"url":"https://api.github.com/repos/geocoder-php/Geocoder","forks_url":"https://api.github.com/repos/geocoder-php/Geocoder/forks","keys_url":"https://api.github.com/repos/geocoder-php/Geocoder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/geocoder-php/Geocoder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/geocoder-php/Geocoder/teams","hooks_url":"https://api.github.com/repos/geocoder-php/Geocoder/hooks","issue_events_url":"https://api.github.com/repos/geocoder-php/Geocoder/issues/events{/number}","events_url":"https://api.github.com/repos/geocoder-php/Geocoder/events","assignees_url":"https://api.github.com/repos/geocoder-php/Geocoder/assignees{/user}","branches_url":"https://api.github.com/repos/geocoder-php/Geocoder/branches{/branch}","tags_url":"https://api.github.com/repos/geocoder-php/Geocoder/tags","blobs_url":"https://api.github.com/repos/geocoder-php/Geocoder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/geocoder-php/Geocoder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/geocoder-php/Geocoder/git/refs{/sha}","trees_url":"https://api.github.com/repos/geocoder-php/Geocoder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/geocoder-php/Geocoder/statuses/{sha}","languages_url":"https://api.github.com/repos/geocoder-php/Geocoder/languages","stargazers_url":"https://api.github.com/repos/geocoder-php/Geocoder/stargazers","contributors_url":"https://api.github.com/repos/geocoder-php/Geocoder/contributors","subscribers_url":"https://api.github.com/repos/geocoder-php/Geocoder/subscribers","subscription_url":"https://api.github.com/repos/geocoder-php/Geocoder/subscription","commits_url":"https://api.github.com/repos/geocoder-php/Geocoder/commits{/sha}","git_commits_url":"https://api.github.com/repos/geocoder-php/Geocoder/git/commits{/sha}","comments_url":"https://api.github.com/repos/geocoder-php/Geocoder/comments{/number}","issue_comment_url":"https://api.github.com/repos/geocoder-php/Geocoder/issues/comments/{number}","contents_url":"https://api.github.com/repos/geocoder-php/Geocoder/contents/{+path}","compare_url":"https://api.github.com/repos/geocoder-php/Geocoder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/geocoder-php/Geocoder/merges","archive_url":"https://api.github.com/repos/geocoder-php/Geocoder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/geocoder-php/Geocoder/downloads","issues_url":"https://api.github.com/repos/geocoder-php/Geocoder/issues{/number}","pulls_url":"https://api.github.com/repos/geocoder-php/Geocoder/pulls{/number}","milestones_url":"https://api.github.com/repos/geocoder-php/Geocoder/milestones{/number}","notifications_url":"https://api.github.com/repos/geocoder-php/Geocoder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/geocoder-php/Geocoder/labels{/name}","releases_url":"https://api.github.com/repos/geocoder-php/Geocoder/releases{/id}","created_at":"2011-11-07T21:56:41Z","updated_at":"2014-10-10T16:41:58Z","pushed_at":"2014-10-10T09:49:54Z","git_url":"git://github.com/geocoder-php/Geocoder.git","ssh_url":"git@github.com:geocoder-php/Geocoder.git","clone_url":"https://github.com/geocoder-php/Geocoder.git","svn_url":"https://github.com/geocoder-php/Geocoder","homepage":"http://geocoder-php.org/Geocoder","size":15631,"stargazers_count":1743,"watchers_count":1743,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":195,"mirror_url":null,"open_issues_count":7,"forks":195,"open_issues":7,"watchers":1743,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/geocoder-php/Geocoder/pulls/350"},"html":{"href":"https://github.com/geocoder-php/Geocoder/pull/350"},"issue":{"href":"https://api.github.com/repos/geocoder-php/Geocoder/issues/350"},"comments":{"href":"https://api.github.com/repos/geocoder-php/Geocoder/issues/350/comments"},"review_comments":{"href":"https://api.github.com/repos/geocoder-php/Geocoder/pulls/350/comments"},"review_comment":{"href":"https://api.github.com/repos/geocoder-php/Geocoder/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/geocoder-php/Geocoder/pulls/350/commits"},"statuses":{"href":"https://api.github.com/repos/geocoder-php/Geocoder/statuses/71f4ba146a6a93dc401755ef6b6d089551b7ddbc"}}}}