{"action":"closed","issue":{"url":"https://api.github.com/repos/eloquent/phony/issues/140","repository_url":"https://api.github.com/repos/eloquent/phony","labels_url":"https://api.github.com/repos/eloquent/phony/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/eloquent/phony/issues/140/comments","events_url":"https://api.github.com/repos/eloquent/phony/issues/140/events","html_url":"https://github.com/eloquent/phony/issues/140","id":138743609,"number":140,"title":"Convenience method for `generates()->returns()`","user":{"login":"jmalloc","id":761536,"avatar_url":"https://avatars.githubusercontent.com/u/761536?v=3","gravatar_id":"","url":"https://api.github.com/users/jmalloc","html_url":"https://github.com/jmalloc","followers_url":"https://api.github.com/users/jmalloc/followers","following_url":"https://api.github.com/users/jmalloc/following{/other_user}","gists_url":"https://api.github.com/users/jmalloc/gists{/gist_id}","starred_url":"https://api.github.com/users/jmalloc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmalloc/subscriptions","organizations_url":"https://api.github.com/users/jmalloc/orgs","repos_url":"https://api.github.com/users/jmalloc/repos","events_url":"https://api.github.com/users/jmalloc/events{/privacy}","received_events_url":"https://api.github.com/users/jmalloc/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/eloquent/phony/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/eloquent/phony/milestones/16","html_url":"https://github.com/eloquent/phony/milestones/Next%20release","labels_url":"https://api.github.com/repos/eloquent/phony/milestones/16/labels","id":1579100,"number":16,"title":"Next release","description":"","creator":{"login":"ezzatron","id":100152,"avatar_url":"https://avatars.githubusercontent.com/u/100152?v=3","gravatar_id":"","url":"https://api.github.com/users/ezzatron","html_url":"https://github.com/ezzatron","followers_url":"https://api.github.com/users/ezzatron/followers","following_url":"https://api.github.com/users/ezzatron/following{/other_user}","gists_url":"https://api.github.com/users/ezzatron/gists{/gist_id}","starred_url":"https://api.github.com/users/ezzatron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezzatron/subscriptions","organizations_url":"https://api.github.com/users/ezzatron/orgs","repos_url":"https://api.github.com/users/ezzatron/repos","events_url":"https://api.github.com/users/ezzatron/events{/privacy}","received_events_url":"https://api.github.com/users/ezzatron/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":5,"state":"open","created_at":"2016-02-12T04:43:04Z","updated_at":"2016-03-18T01:38:41Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2016-03-06T01:57:46Z","updated_at":"2016-03-18T01:38:41Z","closed_at":"2016-03-18T01:38:41Z","body":"I'm not sure if we already discussed this or not - but a _really_ common pattern under Recoil / PHP 7 is to use `generates()->returns()` where you simply want a stubbed coroutine to return a specific value.\r\n\r\nPerhaps we could add a second parameter to `generates()`, which is the return value for PHP 7 generators:\r\n\r\n`generates($values = array(), $returnValue = null)`\r\n\r\n\r\nSo usage is imply:\r\n\r\n```$stub->generates([], new Thing());```\r\n\r\nThoughts?"}}