Skip to content

Commit 56091ce

Browse files
authored
add missing guzzle-exception annotations (#1055)
This PR enhances exception documentation by adding missing throws-annotations for guzzle exceptions like ConnectException, which can be thrown across the package. It builds upon the changes made in #1050. **Changes** Added throws-annotations for guzzle exceptions in method doc blocks.
1 parent 2ad4c69 commit 56091ce

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Provider/AbstractProvider.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use GuzzleHttp\Client as HttpClient;
1818
use GuzzleHttp\ClientInterface as HttpClientInterface;
1919
use GuzzleHttp\Exception\BadResponseException;
20+
use GuzzleHttp\Exception\GuzzleException;
2021
use InvalidArgumentException;
2122
use League\OAuth2\Client\Grant\AbstractGrant;
2223
use League\OAuth2\Client\Grant\GrantFactory;
@@ -619,6 +620,7 @@ protected function getAccessTokenRequest(array $params)
619620
* @return AccessTokenInterface
620621
* @throws IdentityProviderException
621622
* @throws UnexpectedValueException
623+
* @throws GuzzleException
622624
*/
623625
public function getAccessToken($grant, array $options = [])
624626
{
@@ -713,6 +715,7 @@ protected function createRequest($method, $url, $token, array $options)
713715
*
714716
* @param RequestInterface $request
715717
* @return ResponseInterface
718+
* @throws GuzzleException
716719
*/
717720
public function getResponse(RequestInterface $request)
718721
{
@@ -726,6 +729,7 @@ public function getResponse(RequestInterface $request)
726729
* @return mixed
727730
* @throws IdentityProviderException
728731
* @throws UnexpectedValueException
732+
* @throws GuzzleException
729733
*/
730734
public function getParsedResponse(RequestInterface $request)
731735
{
@@ -875,6 +879,7 @@ abstract protected function createResourceOwner(array $response, AccessToken $to
875879
* @return ResourceOwnerInterface
876880
* @throws IdentityProviderException
877881
* @throws UnexpectedValueException
882+
* @throws GuzzleException
878883
*/
879884
public function getResourceOwner(AccessToken $token)
880885
{
@@ -890,6 +895,7 @@ public function getResourceOwner(AccessToken $token)
890895
* @return mixed
891896
* @throws IdentityProviderException
892897
* @throws UnexpectedValueException
898+
* @throws GuzzleException
893899
*/
894900
protected function fetchResourceOwnerDetails(AccessToken $token)
895901
{

0 commit comments

Comments
 (0)