@@ -21,7 +21,8 @@ |
||
| 21 | 21 | * @author Vincent Faliès <[email protected]> |
| 22 | 22 | * @copyright Copyright (c) 2017 |
| 23 | 23 | */ |
| 24 | -interface CrewResultsInterface { |
|
| 24 | +interface CrewResultsInterface |
|
| 25 | +{ |
|
| 25 | 26 | |
| 26 | 27 | /** |
| 27 | 28 | * Credit Id |
@@ -21,7 +21,8 @@ |
||
| 21 | 21 | * @author Vincent Faliès <[email protected]> |
| 22 | 22 | * @copyright Copyright (c) 2017 |
| 23 | 23 | */ |
| 24 | -interface CastResultsInterface { |
|
| 24 | +interface CastResultsInterface |
|
| 25 | +{ |
|
| 25 | 26 | |
| 26 | 27 | /** |
| 27 | 28 | * Credit Id |
@@ -50,13 +50,18 @@ |
||
| 50 | 50 | */ |
| 51 | 51 | public function getResponse($url) |
| 52 | 52 | { |
| 53 | - try { |
|
| 53 | + try |
|
| 54 | + { |
|
| 54 | 55 | return $this->guzzleClient->request('GET', $url); |
| 55 | - } catch (RequestException $e) { |
|
| 56 | - if (is_null($e->getResponse())) { |
|
| 56 | + } |
|
| 57 | + catch (RequestException $e) |
|
| 58 | + { |
|
| 59 | + if (is_null($e->getResponse())) |
|
| 60 | + { |
|
| 57 | 61 | throw new HttpErrorException; |
| 58 | 62 | } |
| 59 | - switch ((int) $e->getResponse()->getStatusCode()) { |
|
| 63 | + switch ((int) $e->getResponse()->getStatusCode()) |
|
| 64 | + { |
|
| 60 | 65 | case 404: |
| 61 | 66 | throw new NotFoundException($e->getMessage()); |
| 62 | 67 | default: |