GitHub PullRequestReviewCommentEvent at 2014-01-21 13:04:23
Repository: docker-php
Actor: joelwurtz
Payload: {"comment":{"url":"https://api.github.com/repos/stage1/docker-php/pulls/comments/9035882","id":9035882,"diff_hunk":"@@ -133,8 +133,10 @@ public function getContent()\n      *\n      * @param callable $callback Callback to call, this\n      */\n-    public function read(callable $callback)\n+    public function read(callable $callback = null)","path":"src/Docker/Http/Response.php","position":5,"original_position":5,"commit_id":"41d4ec5d49c67bd289023ea53b1eb018cad5d149","original_commit_id":"41d4ec5d49c67bd289023ea53b1eb018cad5d149","user":{"login":"joelwurtz","id":90466,"avatar_url":"https://gravatar.com/avatar/b13383dfb9b1b7c6bdde845aef0d5d83?d=https%3A%2F%2Fidenticons.github.com%2Fc28d110c3d48b013c8d6a1c92a5d50a4.png&r=x","gravatar_id":"b13383dfb9b1b7c6bdde845aef0d5d83","url":"https://api.github.com/users/joelwurtz","html_url":"https://github.com/joelwurtz","followers_url":"https://api.github.com/users/joelwurtz/followers","following_url":"https://api.github.com/users/joelwurtz/following{/other_user}","gists_url":"https://api.github.com/users/joelwurtz/gists{/gist_id}","starred_url":"https://api.github.com/users/joelwurtz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joelwurtz/subscriptions","organizations_url":"https://api.github.com/users/joelwurtz/orgs","repos_url":"https://api.github.com/users/joelwurtz/repos","events_url":"https://api.github.com/users/joelwurtz/events{/privacy}","received_events_url":"https://api.github.com/users/joelwurtz/received_events","type":"User","site_admin":false},"body":"The StreamedResponse accept null for its callback, so i make him also null for consistency, in fact user don't know if he has a StreamedResponse or not (unless he test the object type).\r\n\r\nSo calling read with empty parameters can be useful if we want the complete response without using a callback : \r\n\r\n```\r\n$response->read();\r\n$response->getContent();\r\n```\r\n\r\nThis will work in every implementation, if he had just do this : \r\n\r\n```\r\n$response->getContent()\r\n```\r\n\r\nThis will only work when dealing with a Response object and not with a StreamedResponse","created_at":"2014-01-21T13:04:23Z","updated_at":"2014-01-21T13:04:23Z","html_url":"https://github.com/stage1/docker-php/pull/12#discussion_r9035882","pull_request_url":"https://api.github.com/repos/stage1/docker-php/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/stage1/docker-php/pulls/comments/9035882"},"html":{"href":"https://github.com/stage1/docker-php/pull/12#discussion_r9035882"},"pull_request":{"href":"https://api.github.com/repos/stage1/docker-php/pulls/12"}}}}