From 8dc01b2b5c676471f095a8accc439fdab7084e54 Mon Sep 17 00:00:00 2001 From: asteragos Date: Wed, 18 Dec 2024 03:06:06 +0100 Subject: [PATCH] add missing exception annotations (#1050) --- src/Provider/AbstractProvider.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Provider/AbstractProvider.php b/src/Provider/AbstractProvider.php index 26f6d1c6..0120ad78 100644 --- a/src/Provider/AbstractProvider.php +++ b/src/Provider/AbstractProvider.php @@ -405,6 +405,7 @@ protected function getPkceMethod() * * @param array $options * @return array Authorization parameters + * @throws InvalidArgumentException */ protected function getAuthorizationParameters(array $options) { @@ -476,6 +477,7 @@ protected function getAuthorizationQuery(array $params) * * @param array $options * @return string Authorization URL + * @throws InvalidArgumentException */ public function getAuthorizationUrl(array $options = []) { @@ -492,6 +494,7 @@ public function getAuthorizationUrl(array $options = []) * @param array $options * @param callable|null $redirectHandler * @return mixed + * @throws InvalidArgumentException */ public function authorize( array $options = [], @@ -613,8 +616,9 @@ protected function getAccessTokenRequest(array $params) * * @param mixed $grant * @param array $options - * @throws IdentityProviderException * @return AccessTokenInterface + * @throws IdentityProviderException + * @throws UnexpectedValueException */ public function getAccessToken($grant, array $options = []) { @@ -719,8 +723,9 @@ public function getResponse(RequestInterface $request) * Sends a request and returns the parsed response. * * @param RequestInterface $request - * @throws IdentityProviderException * @return mixed + * @throws IdentityProviderException + * @throws UnexpectedValueException */ public function getParsedResponse(RequestInterface $request) { @@ -868,6 +873,8 @@ abstract protected function createResourceOwner(array $response, AccessToken $to * * @param AccessToken $token * @return ResourceOwnerInterface + * @throws IdentityProviderException + * @throws UnexpectedValueException */ public function getResourceOwner(AccessToken $token) { @@ -881,6 +888,8 @@ public function getResourceOwner(AccessToken $token) * * @param AccessToken $token * @return mixed + * @throws IdentityProviderException + * @throws UnexpectedValueException */ protected function fetchResourceOwnerDetails(AccessToken $token) {