{"action":"created","issue":{"url":"https://api.github.com/repos/stripe/stripe-php/issues/166","labels_url":"https://api.github.com/repos/stripe/stripe-php/issues/166/labels{/name}","comments_url":"https://api.github.com/repos/stripe/stripe-php/issues/166/comments","events_url":"https://api.github.com/repos/stripe/stripe-php/issues/166/events","html_url":"https://github.com/stripe/stripe-php/issues/166","id":76984731,"number":166,"title":"Return type PHPDoc hint for Plan::all() is wrong","user":{"login":"nicobn","id":291103,"avatar_url":"https://avatars.githubusercontent.com/u/291103?v=3","gravatar_id":"","url":"https://api.github.com/users/nicobn","html_url":"https://github.com/nicobn","followers_url":"https://api.github.com/users/nicobn/followers","following_url":"https://api.github.com/users/nicobn/following{/other_user}","gists_url":"https://api.github.com/users/nicobn/gists{/gist_id}","starred_url":"https://api.github.com/users/nicobn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicobn/subscriptions","organizations_url":"https://api.github.com/users/nicobn/orgs","repos_url":"https://api.github.com/users/nicobn/repos","events_url":"https://api.github.com/users/nicobn/events{/privacy}","received_events_url":"https://api.github.com/users/nicobn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-16T08:41:40Z","updated_at":"2015-06-01T11:34:41Z","closed_at":null,"body":"The current type hint is Plan[]. The method actually returns a Collection."},"comment":{"url":"https://api.github.com/repos/stripe/stripe-php/issues/comments/107408918","html_url":"https://github.com/stripe/stripe-php/issues/166#issuecomment-107408918","issue_url":"https://api.github.com/repos/stripe/stripe-php/issues/166","id":107408918,"user":{"login":"SteveEdson","id":1201960,"avatar_url":"https://avatars.githubusercontent.com/u/1201960?v=3","gravatar_id":"","url":"https://api.github.com/users/SteveEdson","html_url":"https://github.com/SteveEdson","followers_url":"https://api.github.com/users/SteveEdson/followers","following_url":"https://api.github.com/users/SteveEdson/following{/other_user}","gists_url":"https://api.github.com/users/SteveEdson/gists{/gist_id}","starred_url":"https://api.github.com/users/SteveEdson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SteveEdson/subscriptions","organizations_url":"https://api.github.com/users/SteveEdson/orgs","repos_url":"https://api.github.com/users/SteveEdson/repos","events_url":"https://api.github.com/users/SteveEdson/events{/privacy}","received_events_url":"https://api.github.com/users/SteveEdson/received_events","type":"User","site_admin":false},"created_at":"2015-06-01T11:34:41Z","updated_at":"2015-06-01T11:34:41Z","body":"But doesn't the collection contain a iterable list of Plan objects? So the type hint makes it possible to get code completion when iterating, e.g:\r\n\r\n```php\r\n$plans = Plan::all();\r\n\r\nforeach($plans as $plan) {\r\n    $plan-> // Method completion\r\n}\r\n```"}}