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