{"action":"created","issue":{"url":"https://api.github.com/repos/thephpleague/oauth2-client/issues/401","labels_url":"https://api.github.com/repos/thephpleague/oauth2-client/issues/401/labels{/name}","comments_url":"https://api.github.com/repos/thephpleague/oauth2-client/issues/401/comments","events_url":"https://api.github.com/repos/thephpleague/oauth2-client/issues/401/events","html_url":"https://github.com/thephpleague/oauth2-client/pull/401","id":100581592,"number":401,"title":"Pass ResponseInterface to IdentityProviderException","user":{"login":"ramsey","id":42941,"avatar_url":"https://avatars.githubusercontent.com/u/42941?v=3","gravatar_id":"","url":"https://api.github.com/users/ramsey","html_url":"https://github.com/ramsey","followers_url":"https://api.github.com/users/ramsey/followers","following_url":"https://api.github.com/users/ramsey/following{/other_user}","gists_url":"https://api.github.com/users/ramsey/gists{/gist_id}","starred_url":"https://api.github.com/users/ramsey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramsey/subscriptions","organizations_url":"https://api.github.com/users/ramsey/orgs","repos_url":"https://api.github.com/users/ramsey/repos","events_url":"https://api.github.com/users/ramsey/events{/privacy}","received_events_url":"https://api.github.com/users/ramsey/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-08-12T16:22:54Z","updated_at":"2015-08-12T21:15:57Z","closed_at":"2015-08-12T16:56:14Z","pull_request":{"url":"https://api.github.com/repos/thephpleague/oauth2-client/pulls/401","html_url":"https://github.com/thephpleague/oauth2-client/pull/401","diff_url":"https://github.com/thephpleague/oauth2-client/pull/401.diff","patch_url":"https://github.com/thephpleague/oauth2-client/pull/401.patch"},"body":"I came across this while updating class docblock information.\r\n\r\nPreviously, `checkResponse()` passed `$data` to `IdentityProviderException`. However, this looks incorrect, since the third parameter for `IdentityProviderException` is labeled as `$response` and its `getResponseBody()` method says it returns a `ResponseInterface`. So, it seemed to me that passing in `$data` was incorrect, but I'm not sure, so I'll need some eyes on this to tell me if this is the intended behavior.\r\n\r\nIf accepted, this will also type-hint the `$response` parameter on `IdentityProviderException` as a `ResponseInterface` to make it clearer what it expects.\r\n\r\nShould the `getResponseBody()` method name be changed to `getResponse()`, since it's not returning a body but a full response?"},"comment":{"url":"https://api.github.com/repos/thephpleague/oauth2-client/issues/comments/130451112","html_url":"https://github.com/thephpleague/oauth2-client/pull/401#issuecomment-130451112","issue_url":"https://api.github.com/repos/thephpleague/oauth2-client/issues/401","id":130451112,"user":{"login":"GawainLynch","id":1427081,"avatar_url":"https://avatars.githubusercontent.com/u/1427081?v=3","gravatar_id":"","url":"https://api.github.com/users/GawainLynch","html_url":"https://github.com/GawainLynch","followers_url":"https://api.github.com/users/GawainLynch/followers","following_url":"https://api.github.com/users/GawainLynch/following{/other_user}","gists_url":"https://api.github.com/users/GawainLynch/gists{/gist_id}","starred_url":"https://api.github.com/users/GawainLynch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GawainLynch/subscriptions","organizations_url":"https://api.github.com/users/GawainLynch/orgs","repos_url":"https://api.github.com/users/GawainLynch/repos","events_url":"https://api.github.com/users/GawainLynch/events{/privacy}","received_events_url":"https://api.github.com/users/GawainLynch/received_events","type":"User","site_admin":false},"created_at":"2015-08-12T21:15:57Z","updated_at":"2015-08-12T21:15:57Z","body":"Lurking ninja chiming in here… Scrutinizer can give you a hard time on some occasions, but more often than not shows up complete derps that everyone signed off on… Please do @rtheunissen :+1: "}}