@@ -188,11 +188,9 @@ |
||
188 | 188 | |
189 | 189 | // $this->addRequestParameters($request, $query, $postFields, $files); |
190 | 190 | // $response = $request->send(); |
191 | - } |
|
192 | - catch (GuzzleBadResponse $e) { |
|
191 | + } catch (GuzzleBadResponse $e) { |
|
193 | 192 | throw BadResponseException::fromGuzzleResponse($e); |
194 | - } |
|
195 | - catch (GuzzleException $e) { |
|
193 | + } catch (GuzzleException $e) { |
|
196 | 194 | throw new RuntimeException($e->getMessage(), $e->getCode(), $e); |
197 | 195 | } |
198 | 196 |
@@ -67,8 +67,7 @@ |
||
67 | 67 | { |
68 | 68 | try { |
69 | 69 | $response = $this->getAdapter()->call($method, $path, $query, $postFields, array(), $headers); |
70 | - } |
|
71 | - catch (BadResponseException $e) { |
|
70 | + } catch (BadResponseException $e) { |
|
72 | 71 | $statusCode = $e->getStatusCode(); |
73 | 72 | switch ($statusCode) { |
74 | 73 | case 404: |
@@ -12,7 +12,6 @@ |
||
12 | 12 | namespace PhraseanetSDK\Entity; |
13 | 13 | |
14 | 14 | use DateTime; |
15 | -use DateTimeInterface; |
|
16 | 15 | use Doctrine\Common\Collections\ArrayCollection; |
17 | 16 | use Exception; |
18 | 17 | use stdClass; |
@@ -16,7 +16,6 @@ |
||
16 | 16 | use PhraseanetSDK\Exception\NotFoundException; |
17 | 17 | use PhraseanetSDK\Exception\RuntimeException; |
18 | 18 | use Doctrine\Common\Collections\ArrayCollection; |
19 | -use PhraseanetSDK\EntityHydrator; |
|
20 | 19 | use PhraseanetSDK\Exception\TokenExpiredException; |
21 | 20 | use PhraseanetSDK\Exception\UnauthorizedException; |
22 | 21 |
@@ -15,7 +15,6 @@ |
||
15 | 15 | use PhraseanetSDK\Exception\NotFoundException; |
16 | 16 | use PhraseanetSDK\Exception\RuntimeException; |
17 | 17 | use Doctrine\Common\Collections\ArrayCollection; |
18 | -use PhraseanetSDK\EntityHydrator; |
|
19 | 18 | use PhraseanetSDK\Exception\TokenExpiredException; |
20 | 19 | use PhraseanetSDK\Exception\UnauthorizedException; |
21 | 20 | use PhraseanetSDK\Entity\Quarantine as QuarantineEntity; |
@@ -105,8 +105,7 @@ |
||
105 | 105 | ); |
106 | 106 | $data = json_decode($responseContent, true); |
107 | 107 | $token = $data["access_token"]; |
108 | - } |
|
109 | - catch (BadResponseException $e) { |
|
108 | + } catch (BadResponseException $e) { |
|
110 | 109 | $response = json_decode($e->getResponseBody(), true); |
111 | 110 | $msg = isset($response['error']) ? $response['error'] : (isset($response['msg']) ? $response['msg'] : ''); |
112 | 111 |