{"action":"created","issue":{"url":"https://api.github.com/repos/dingo/api/issues/332","labels_url":"https://api.github.com/repos/dingo/api/issues/332/labels{/name}","comments_url":"https://api.github.com/repos/dingo/api/issues/332/comments","events_url":"https://api.github.com/repos/dingo/api/issues/332/events","html_url":"https://github.com/dingo/api/pull/332","id":53982104,"number":332,"title":"Allow item() and collection() to be called without a Transformer (IDE fix)","user":{"login":"p4bloch","id":3620912,"avatar_url":"https://avatars.githubusercontent.com/u/3620912?v=3","gravatar_id":"","url":"https://api.github.com/users/p4bloch","html_url":"https://github.com/p4bloch","followers_url":"https://api.github.com/users/p4bloch/followers","following_url":"https://api.github.com/users/p4bloch/following{/other_user}","gists_url":"https://api.github.com/users/p4bloch/gists{/gist_id}","starred_url":"https://api.github.com/users/p4bloch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/p4bloch/subscriptions","organizations_url":"https://api.github.com/users/p4bloch/orgs","repos_url":"https://api.github.com/users/p4bloch/repos","events_url":"https://api.github.com/users/p4bloch/events{/privacy}","received_events_url":"https://api.github.com/users/p4bloch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-11T05:06:27Z","updated_at":"2015-01-11T05:40:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dingo/api/pulls/332","html_url":"https://github.com/dingo/api/pull/332","diff_url":"https://github.com/dingo/api/pull/332.diff","patch_url":"https://github.com/dingo/api/pull/332.patch"},"body":"When implementing the `TransformableInterface` in the model, there's no longer a need to pass a Transformer to the `item()` and `collection()` methods. This functionality is allowed by dingo, and no errors are thrown.\r\n\r\nHowever, the IDE will squawk when I call `$this->response->item($model)` because the parameter doesn't have a default value set.\r\n![screen shot 2015-01-11 at 02 05 13](https://cloud.githubusercontent.com/assets/3620912/5694399/549f205e-9936-11e4-8d63-615425dc01e8.png)\r\n\r\nDefaulting $transformer to null fixed the IDE problem, and I can't think of a scenario where adding this will cause an error.\r\n\r\nLet me know what you think @jasonlewis :)"},"comment":{"url":"https://api.github.com/repos/dingo/api/issues/comments/69484457","html_url":"https://github.com/dingo/api/pull/332#issuecomment-69484457","issue_url":"https://api.github.com/repos/dingo/api/issues/332","id":69484457,"user":{"login":"p4bloch","id":3620912,"avatar_url":"https://avatars.githubusercontent.com/u/3620912?v=3","gravatar_id":"","url":"https://api.github.com/users/p4bloch","html_url":"https://github.com/p4bloch","followers_url":"https://api.github.com/users/p4bloch/followers","following_url":"https://api.github.com/users/p4bloch/following{/other_user}","gists_url":"https://api.github.com/users/p4bloch/gists{/gist_id}","starred_url":"https://api.github.com/users/p4bloch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/p4bloch/subscriptions","organizations_url":"https://api.github.com/users/p4bloch/orgs","repos_url":"https://api.github.com/users/p4bloch/repos","events_url":"https://api.github.com/users/p4bloch/events{/privacy}","received_events_url":"https://api.github.com/users/p4bloch/received_events","type":"User","site_admin":false},"created_at":"2015-01-11T05:40:06Z","updated_at":"2015-01-11T05:40:06Z","body":"Actually, when using `$this->response->collection($model)` without passing a Transformer, it *will* throw a missing argument Exception. After defaulting $transformer to null in `ResponseFactory`, the Transformer is loaded just fine from the one specified in the Model."}}