{"action":"created","issue":{"url":"https://api.github.com/repos/elliotchance/concise/issues/264","labels_url":"https://api.github.com/repos/elliotchance/concise/issues/264/labels{/name}","comments_url":"https://api.github.com/repos/elliotchance/concise/issues/264/comments","events_url":"https://api.github.com/repos/elliotchance/concise/issues/264/events","html_url":"https://github.com/elliotchance/concise/pull/264","id":89177726,"number":264,"title":"Chaining stub() and with() does not work as expected","user":{"login":"elliotchance","id":927418,"avatar_url":"https://avatars.githubusercontent.com/u/927418?v=3","gravatar_id":"","url":"https://api.github.com/users/elliotchance","html_url":"https://github.com/elliotchance","followers_url":"https://api.github.com/users/elliotchance/followers","following_url":"https://api.github.com/users/elliotchance/following{/other_user}","gists_url":"https://api.github.com/users/elliotchance/gists{/gist_id}","starred_url":"https://api.github.com/users/elliotchance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elliotchance/subscriptions","organizations_url":"https://api.github.com/users/elliotchance/orgs","repos_url":"https://api.github.com/users/elliotchance/repos","events_url":"https://api.github.com/users/elliotchance/events{/privacy}","received_events_url":"https://api.github.com/users/elliotchance/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/elliotchance/concise/labels/Component:%20Mocking","name":"Component: Mocking","color":"5319e7"},{"url":"https://api.github.com/repos/elliotchance/concise/labels/Size:%201%20(Small)","name":"Size: 1 (Small)","color":"fbca04"},{"url":"https://api.github.com/repos/elliotchance/concise/labels/Type:%20Bug","name":"Type: Bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/elliotchance/concise/milestones/26","html_url":"https://github.com/elliotchance/concise/milestones/v1.7.3%20(Multiverse,%20Patch%203)","labels_url":"https://api.github.com/repos/elliotchance/concise/milestones/26/labels","id":1138958,"number":26,"title":"v1.7.3 (Multiverse, Patch 3)","description":"","creator":{"login":"elliotchance","id":927418,"avatar_url":"https://avatars.githubusercontent.com/u/927418?v=3","gravatar_id":"","url":"https://api.github.com/users/elliotchance","html_url":"https://github.com/elliotchance","followers_url":"https://api.github.com/users/elliotchance/followers","following_url":"https://api.github.com/users/elliotchance/following{/other_user}","gists_url":"https://api.github.com/users/elliotchance/gists{/gist_id}","starred_url":"https://api.github.com/users/elliotchance/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elliotchance/subscriptions","organizations_url":"https://api.github.com/users/elliotchance/orgs","repos_url":"https://api.github.com/users/elliotchance/repos","events_url":"https://api.github.com/users/elliotchance/events{/privacy}","received_events_url":"https://api.github.com/users/elliotchance/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":5,"state":"open","created_at":"2015-05-29T00:05:38Z","updated_at":"2015-07-07T12:31:32Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2015-06-18T02:15:53Z","updated_at":"2015-07-07T12:32:50Z","closed_at":"2015-07-07T12:31:32Z","pull_request":{"url":"https://api.github.com/repos/elliotchance/concise/pulls/264","html_url":"https://github.com/elliotchance/concise/pull/264","diff_url":"https://github.com/elliotchance/concise/pull/264.diff","patch_url":"https://github.com/elliotchance/concise/pull/264.patch"},"body":"This works:\r\n\r\n```php\r\n$calculatorMock = $this->mock('\\Calculator')\r\n                       ->stub('add')->with(3, 5)->andReturn(8)\r\n                                    ->with(2, 7)->andReturn(9)\r\n                       ->done();\r\n```\r\n\r\nThis doesn't:\r\n\r\n```php\r\n$calculatorMock = $this->mock('\\Calculator')\r\n                       ->stub('add')->with(3, 5)->andReturn(8)\r\n                       ->stub('add')->with(2, 7)->andReturn(9)\r\n                       ->done();\r\n```\r\n\r\nThe second `stub('add')` overrides the first. It should act the same in both cases."},"comment":{"url":"https://api.github.com/repos/elliotchance/concise/issues/comments/119190524","html_url":"https://github.com/elliotchance/concise/pull/264#issuecomment-119190524","issue_url":"https://api.github.com/repos/elliotchance/concise/issues/264","id":119190524,"user":{"login":"scrutinizer-notifier","id":6398257,"avatar_url":"https://avatars.githubusercontent.com/u/6398257?v=3","gravatar_id":"","url":"https://api.github.com/users/scrutinizer-notifier","html_url":"https://github.com/scrutinizer-notifier","followers_url":"https://api.github.com/users/scrutinizer-notifier/followers","following_url":"https://api.github.com/users/scrutinizer-notifier/following{/other_user}","gists_url":"https://api.github.com/users/scrutinizer-notifier/gists{/gist_id}","starred_url":"https://api.github.com/users/scrutinizer-notifier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scrutinizer-notifier/subscriptions","organizations_url":"https://api.github.com/users/scrutinizer-notifier/orgs","repos_url":"https://api.github.com/users/scrutinizer-notifier/repos","events_url":"https://api.github.com/users/scrutinizer-notifier/events{/privacy}","received_events_url":"https://api.github.com/users/scrutinizer-notifier/received_events","type":"User","site_admin":false},"created_at":"2015-07-07T12:32:50Z","updated_at":"2015-07-07T12:32:50Z","body":"A [new inspection](https://scrutinizer-ci.com/g/elliotchance/concise/inspections/a92d59b2-1b79-4c23-9068-d81467e0569c) was created."}}