| Conditions | 2 |
| Paths | 2 |
| Total Lines | 8 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 66 | private function decode(string $jsonString): JsonObject |
||
| 67 | { |
||
| 68 | $decoded = json_decode($jsonString, false); |
||
| 69 | if (json_last_error() !== JSON_ERROR_NONE) { |
||
| 70 | throw new EnsureException(sprintf('JSON body could not be decoded: %s', json_last_error_msg())); |
||
| 71 | } |
||
| 72 | return new JsonObject($decoded); |
||
| 73 | } |
||
| 74 | |||
| 76 |