| Conditions | 3 |
| Paths | 2 |
| Total Lines | 6 |
| Code Lines | 3 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 3.1406 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 40 | 3 | protected function processErrorResponse(ResponseInterface $response, RequestInterface $request): void |
|
| 41 | { |
||
| 42 | 3 | if (($responseBody = json_decode($response->getBody()->getContents(), true)) && |
|
| 43 | 3 | array_key_exists('message', $responseBody) |
|
| 44 | ) { |
||
| 45 | throw new ErrorResponseException($responseBody['message'], $response->getStatusCode()); |
||
| 46 | } |
||
| 49 |