Skip to content

Commit

Permalink
Drop type-hint for Response to support multiple Guzzle versions
Browse files Browse the repository at this point in the history
  • Loading branch information
joostfaassen committed Aug 7, 2016
1 parent e0c63bb commit e768f11
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Common/ErrorResponseHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
use Hub\Client\Exception\BadRequestException;
use Hub\Client\Exception\NotFoundException;
use Hub\Client\Exception\NotAuthorizedException;
use GuzzleHttp\Psr7\Response;
use RuntimeException;

class ErrorResponseHandler
{
public static function handle(Response $response)
public static function handle($response)
{
if ($response->getStatusCode() == 401) {
throw new NotAuthorizedException('NOT_AUTHORIZED', 'Basic auth failed');
Expand Down

0 comments on commit e768f11

Please sign in to comment.