{"action":"created","comment":{"url":"https://api.github.com/repos/amphp/amp/pulls/comments/62877599","id":62877599,"diff_hunk":"@@ -700,8 +700,8 @@ function timeout(Promise $promise, $msTimeout) {\n  * Otherwise the promise's resolved value is returned.\n  *\n  * @param \\Amp\\Promise $promise The promise on which to wait\n- * @throws \\Exception if the promise fails\n- * @return mixed Returns the eventual resolution result for the specified promise\n+ * @return mixed if the promise fails\n+ * @throws \\Throwable","path":"lib/functions.php","position":7,"original_position":7,"commit_id":"08cf7516894c6d3bd716d79a43e2b40da26ce4c4","original_commit_id":"08cf7516894c6d3bd716d79a43e2b40da26ce4c4","user":{"login":"bwoebi","id":3154871,"avatar_url":"https://avatars.githubusercontent.com/u/3154871?v=3","gravatar_id":"","url":"https://api.github.com/users/bwoebi","html_url":"https://github.com/bwoebi","followers_url":"https://api.github.com/users/bwoebi/followers","following_url":"https://api.github.com/users/bwoebi/following{/other_user}","gists_url":"https://api.github.com/users/bwoebi/gists{/gist_id}","starred_url":"https://api.github.com/users/bwoebi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwoebi/subscriptions","organizations_url":"https://api.github.com/users/bwoebi/orgs","repos_url":"https://api.github.com/users/bwoebi/repos","events_url":"https://api.github.com/users/bwoebi/events{/privacy}","received_events_url":"https://api.github.com/users/bwoebi/received_events","type":"User","site_admin":false},"body":"That comment is somewhat bogus now??","created_at":"2016-05-11T16:10:31Z","updated_at":"2016-05-11T16:10:31Z","html_url":"https://github.com/amphp/amp/pull/45#discussion_r62877599","pull_request_url":"https://api.github.com/repos/amphp/amp/pulls/45","_links":{"self":{"href":"https://api.github.com/repos/amphp/amp/pulls/comments/62877599"},"html":{"href":"https://github.com/amphp/amp/pull/45#discussion_r62877599"},"pull_request":{"href":"https://api.github.com/repos/amphp/amp/pulls/45"}}},"pull_request":{"url":"https://api.github.com/repos/amphp/amp/pulls/45","id":69690041,"html_url":"https://github.com/amphp/amp/pull/45","diff_url":"https://github.com/amphp/amp/pull/45.diff","patch_url":"https://github.com/amphp/amp/pull/45.patch","issue_url":"https://api.github.com/repos/amphp/amp/issues/45","number":45,"state":"open","locked":false,"title":"Make resolve() accept also callables","user":{"login":"DaveRandom","id":2396425,"avatar_url":"https://avatars.githubusercontent.com/u/2396425?v=3","gravatar_id":"","url":"https://api.github.com/users/DaveRandom","html_url":"https://github.com/DaveRandom","followers_url":"https://api.github.com/users/DaveRandom/followers","following_url":"https://api.github.com/users/DaveRandom/following{/other_user}","gists_url":"https://api.github.com/users/DaveRandom/gists{/gist_id}","starred_url":"https://api.github.com/users/DaveRandom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DaveRandom/subscriptions","organizations_url":"https://api.github.com/users/DaveRandom/orgs","repos_url":"https://api.github.com/users/DaveRandom/repos","events_url":"https://api.github.com/users/DaveRandom/events{/privacy}","received_events_url":"https://api.github.com/users/DaveRandom/received_events","type":"User","site_admin":false},"body":"This is just syntactic sugar around `resolve()` for use with a generator closure to avoid temporary variables.\r\n\r\nInstead of having to write:\r\n\r\n```php\r\n$var = function() {\r\n    yield;\r\n};\r\nreturn resolve($var);\r\n```\r\n\r\nyou can simply write:\r\n\r\n```php\r\nreturn promise(function() {\r\n    yield;\r\n});\r\n```\r\n\r\nI'm not married to the function name if it doesn't suit, but this is an option I have found frustratingly missing.\r\n\r\nThis PR also adds a missing `@return` tag to the `resolve()` docblock.","created_at":"2016-05-11T15:14:58Z","updated_at":"2016-05-11T16:10:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"246d15308df34801a13a61966ebc2a1d9ed89c2f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/amphp/amp/pulls/45/commits","review_comments_url":"https://api.github.com/repos/amphp/amp/pulls/45/comments","review_comment_url":"https://api.github.com/repos/amphp/amp/pulls/comments{/number}","comments_url":"https://api.github.com/repos/amphp/amp/issues/45/comments","statuses_url":"https://api.github.com/repos/amphp/amp/statuses/08cf7516894c6d3bd716d79a43e2b40da26ce4c4","head":{"label":"DaveRandom:feature/promise-function","ref":"feature/promise-function","sha":"08cf7516894c6d3bd716d79a43e2b40da26ce4c4","user":{"login":"DaveRandom","id":2396425,"avatar_url":"https://avatars.githubusercontent.com/u/2396425?v=3","gravatar_id":"","url":"https://api.github.com/users/DaveRandom","html_url":"https://github.com/DaveRandom","followers_url":"https://api.github.com/users/DaveRandom/followers","following_url":"https://api.github.com/users/DaveRandom/following{/other_user}","gists_url":"https://api.github.com/users/DaveRandom/gists{/gist_id}","starred_url":"https://api.github.com/users/DaveRandom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DaveRandom/subscriptions","organizations_url":"https://api.github.com/users/DaveRandom/orgs","repos_url":"https://api.github.com/users/DaveRandom/repos","events_url":"https://api.github.com/users/DaveRandom/events{/privacy}","received_events_url":"https://api.github.com/users/DaveRandom/received_events","type":"User","site_admin":false},"repo":{"id":21184316,"name":"amp","full_name":"DaveRandom/amp","owner":{"login":"DaveRandom","id":2396425,"avatar_url":"https://avatars.githubusercontent.com/u/2396425?v=3","gravatar_id":"","url":"https://api.github.com/users/DaveRandom","html_url":"https://github.com/DaveRandom","followers_url":"https://api.github.com/users/DaveRandom/followers","following_url":"https://api.github.com/users/DaveRandom/following{/other_user}","gists_url":"https://api.github.com/users/DaveRandom/gists{/gist_id}","starred_url":"https://api.github.com/users/DaveRandom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DaveRandom/subscriptions","organizations_url":"https://api.github.com/users/DaveRandom/orgs","repos_url":"https://api.github.com/users/DaveRandom/repos","events_url":"https://api.github.com/users/DaveRandom/events{/privacy}","received_events_url":"https://api.github.com/users/DaveRandom/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DaveRandom/amp","description":"Event, signal and stream IO reactors","fork":true,"url":"https://api.github.com/repos/DaveRandom/amp","forks_url":"https://api.github.com/repos/DaveRandom/amp/forks","keys_url":"https://api.github.com/repos/DaveRandom/amp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DaveRandom/amp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DaveRandom/amp/teams","hooks_url":"https://api.github.com/repos/DaveRandom/amp/hooks","issue_events_url":"https://api.github.com/repos/DaveRandom/amp/issues/events{/number}","events_url":"https://api.github.com/repos/DaveRandom/amp/events","assignees_url":"https://api.github.com/repos/DaveRandom/amp/assignees{/user}","branches_url":"https://api.github.com/repos/DaveRandom/amp/branches{/branch}","tags_url":"https://api.github.com/repos/DaveRandom/amp/tags","blobs_url":"https://api.github.com/repos/DaveRandom/amp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DaveRandom/amp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DaveRandom/amp/git/refs{/sha}","trees_url":"https://api.github.com/repos/DaveRandom/amp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DaveRandom/amp/statuses/{sha}","languages_url":"https://api.github.com/repos/DaveRandom/amp/languages","stargazers_url":"https://api.github.com/repos/DaveRandom/amp/stargazers","contributors_url":"https://api.github.com/repos/DaveRandom/amp/contributors","subscribers_url":"https://api.github.com/repos/DaveRandom/amp/subscribers","subscription_url":"https://api.github.com/repos/DaveRandom/amp/subscription","commits_url":"https://api.github.com/repos/DaveRandom/amp/commits{/sha}","git_commits_url":"https://api.github.com/repos/DaveRandom/amp/git/commits{/sha}","comments_url":"https://api.github.com/repos/DaveRandom/amp/comments{/number}","issue_comment_url":"https://api.github.com/repos/DaveRandom/amp/issues/comments{/number}","contents_url":"https://api.github.com/repos/DaveRandom/amp/contents/{+path}","compare_url":"https://api.github.com/repos/DaveRandom/amp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DaveRandom/amp/merges","archive_url":"https://api.github.com/repos/DaveRandom/amp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DaveRandom/amp/downloads","issues_url":"https://api.github.com/repos/DaveRandom/amp/issues{/number}","pulls_url":"https://api.github.com/repos/DaveRandom/amp/pulls{/number}","milestones_url":"https://api.github.com/repos/DaveRandom/amp/milestones{/number}","notifications_url":"https://api.github.com/repos/DaveRandom/amp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DaveRandom/amp/labels{/name}","releases_url":"https://api.github.com/repos/DaveRandom/amp/releases{/id}","deployments_url":"https://api.github.com/repos/DaveRandom/amp/deployments","created_at":"2014-06-24T23:41:09Z","updated_at":"2016-05-11T15:09:40Z","pushed_at":"2016-05-11T16:09:19Z","git_url":"git://github.com/DaveRandom/amp.git","ssh_url":"git@github.com:DaveRandom/amp.git","clone_url":"https://github.com/DaveRandom/amp.git","svn_url":"https://github.com/DaveRandom/amp","homepage":"","size":757,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"amphp:master","ref":"master","sha":"cc7db038b3083cd46c1b5ad93a9195f4ee8757ec","user":{"login":"amphp","id":8865682,"avatar_url":"https://avatars.githubusercontent.com/u/8865682?v=3","gravatar_id":"","url":"https://api.github.com/users/amphp","html_url":"https://github.com/amphp","followers_url":"https://api.github.com/users/amphp/followers","following_url":"https://api.github.com/users/amphp/following{/other_user}","gists_url":"https://api.github.com/users/amphp/gists{/gist_id}","starred_url":"https://api.github.com/users/amphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amphp/subscriptions","organizations_url":"https://api.github.com/users/amphp/orgs","repos_url":"https://api.github.com/users/amphp/repos","events_url":"https://api.github.com/users/amphp/events{/privacy}","received_events_url":"https://api.github.com/users/amphp/received_events","type":"Organization","site_admin":false},"repo":{"id":11907506,"name":"amp","full_name":"amphp/amp","owner":{"login":"amphp","id":8865682,"avatar_url":"https://avatars.githubusercontent.com/u/8865682?v=3","gravatar_id":"","url":"https://api.github.com/users/amphp","html_url":"https://github.com/amphp","followers_url":"https://api.github.com/users/amphp/followers","following_url":"https://api.github.com/users/amphp/following{/other_user}","gists_url":"https://api.github.com/users/amphp/gists{/gist_id}","starred_url":"https://api.github.com/users/amphp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amphp/subscriptions","organizations_url":"https://api.github.com/users/amphp/orgs","repos_url":"https://api.github.com/users/amphp/repos","events_url":"https://api.github.com/users/amphp/events{/privacy}","received_events_url":"https://api.github.com/users/amphp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/amphp/amp","description":"A non-blocking concurrency framework for PHP applications","fork":false,"url":"https://api.github.com/repos/amphp/amp","forks_url":"https://api.github.com/repos/amphp/amp/forks","keys_url":"https://api.github.com/repos/amphp/amp/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amphp/amp/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amphp/amp/teams","hooks_url":"https://api.github.com/repos/amphp/amp/hooks","issue_events_url":"https://api.github.com/repos/amphp/amp/issues/events{/number}","events_url":"https://api.github.com/repos/amphp/amp/events","assignees_url":"https://api.github.com/repos/amphp/amp/assignees{/user}","branches_url":"https://api.github.com/repos/amphp/amp/branches{/branch}","tags_url":"https://api.github.com/repos/amphp/amp/tags","blobs_url":"https://api.github.com/repos/amphp/amp/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amphp/amp/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amphp/amp/git/refs{/sha}","trees_url":"https://api.github.com/repos/amphp/amp/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amphp/amp/statuses/{sha}","languages_url":"https://api.github.com/repos/amphp/amp/languages","stargazers_url":"https://api.github.com/repos/amphp/amp/stargazers","contributors_url":"https://api.github.com/repos/amphp/amp/contributors","subscribers_url":"https://api.github.com/repos/amphp/amp/subscribers","subscription_url":"https://api.github.com/repos/amphp/amp/subscription","commits_url":"https://api.github.com/repos/amphp/amp/commits{/sha}","git_commits_url":"https://api.github.com/repos/amphp/amp/git/commits{/sha}","comments_url":"https://api.github.com/repos/amphp/amp/comments{/number}","issue_comment_url":"https://api.github.com/repos/amphp/amp/issues/comments{/number}","contents_url":"https://api.github.com/repos/amphp/amp/contents/{+path}","compare_url":"https://api.github.com/repos/amphp/amp/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amphp/amp/merges","archive_url":"https://api.github.com/repos/amphp/amp/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amphp/amp/downloads","issues_url":"https://api.github.com/repos/amphp/amp/issues{/number}","pulls_url":"https://api.github.com/repos/amphp/amp/pulls{/number}","milestones_url":"https://api.github.com/repos/amphp/amp/milestones{/number}","notifications_url":"https://api.github.com/repos/amphp/amp/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amphp/amp/labels{/name}","releases_url":"https://api.github.com/repos/amphp/amp/releases{/id}","deployments_url":"https://api.github.com/repos/amphp/amp/deployments","created_at":"2013-08-05T20:02:39Z","updated_at":"2016-05-09T08:42:22Z","pushed_at":"2016-05-11T16:09:19Z","git_url":"git://github.com/amphp/amp.git","ssh_url":"git@github.com:amphp/amp.git","clone_url":"https://github.com/amphp/amp.git","svn_url":"https://github.com/amphp/amp","homepage":"http://amphp.org/docs/amp/","size":847,"stargazers_count":322,"watchers_count":322,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":5,"forks":25,"open_issues":5,"watchers":322,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/amphp/amp/pulls/45"},"html":{"href":"https://github.com/amphp/amp/pull/45"},"issue":{"href":"https://api.github.com/repos/amphp/amp/issues/45"},"comments":{"href":"https://api.github.com/repos/amphp/amp/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/amphp/amp/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/amphp/amp/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/amphp/amp/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/amphp/amp/statuses/08cf7516894c6d3bd716d79a43e2b40da26ce4c4"}}}}