| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 43 | protected function getBodyContent(ResponseInterface $response): array |
||
| 44 | { |
||
| 45 | $json = json_decode($this->getBody($response), true); |
||
| 46 | |||
| 47 | if (json_last_error() !== JSON_ERROR_NONE) { |
||
| 48 | throw new JsonException(sprintf( |
||
| 49 | 'Error (%d) when trying to json_decode response: %s', |
||
| 50 | \json_last_error(), |
||
| 51 | \json_last_error_msg() |
||
| 52 | )); |
||
| 53 | } |
||
| 54 | |||
| 55 | return $json; |
||
| 56 | } |
||
| 58 |