Skip to content

Commit 8dc01b2

Browse files
authored
add missing exception annotations (#1050)
1 parent 463100c commit 8dc01b2

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/Provider/AbstractProvider.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ protected function getPkceMethod()
405405
*
406406
* @param array $options
407407
* @return array Authorization parameters
408+
* @throws InvalidArgumentException
408409
*/
409410
protected function getAuthorizationParameters(array $options)
410411
{
@@ -476,6 +477,7 @@ protected function getAuthorizationQuery(array $params)
476477
*
477478
* @param array $options
478479
* @return string Authorization URL
480+
* @throws InvalidArgumentException
479481
*/
480482
public function getAuthorizationUrl(array $options = [])
481483
{
@@ -492,6 +494,7 @@ public function getAuthorizationUrl(array $options = [])
492494
* @param array $options
493495
* @param callable|null $redirectHandler
494496
* @return mixed
497+
* @throws InvalidArgumentException
495498
*/
496499
public function authorize(
497500
array $options = [],
@@ -613,8 +616,9 @@ protected function getAccessTokenRequest(array $params)
613616
*
614617
* @param mixed $grant
615618
* @param array<string, mixed> $options
616-
* @throws IdentityProviderException
617619
* @return AccessTokenInterface
620+
* @throws IdentityProviderException
621+
* @throws UnexpectedValueException
618622
*/
619623
public function getAccessToken($grant, array $options = [])
620624
{
@@ -719,8 +723,9 @@ public function getResponse(RequestInterface $request)
719723
* Sends a request and returns the parsed response.
720724
*
721725
* @param RequestInterface $request
722-
* @throws IdentityProviderException
723726
* @return mixed
727+
* @throws IdentityProviderException
728+
* @throws UnexpectedValueException
724729
*/
725730
public function getParsedResponse(RequestInterface $request)
726731
{
@@ -868,6 +873,8 @@ abstract protected function createResourceOwner(array $response, AccessToken $to
868873
*
869874
* @param AccessToken $token
870875
* @return ResourceOwnerInterface
876+
* @throws IdentityProviderException
877+
* @throws UnexpectedValueException
871878
*/
872879
public function getResourceOwner(AccessToken $token)
873880
{
@@ -881,6 +888,8 @@ public function getResourceOwner(AccessToken $token)
881888
*
882889
* @param AccessToken $token
883890
* @return mixed
891+
* @throws IdentityProviderException
892+
* @throws UnexpectedValueException
884893
*/
885894
protected function fetchResourceOwnerDetails(AccessToken $token)
886895
{

0 commit comments

Comments
 (0)