Conditions | 2 |
Paths | 2 |
Total Lines | 8 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
52 | private function decode(string $jsonString): JsonObject |
||
53 | { |
||
54 | $decoded = json_decode($jsonString, false); |
||
55 | if (json_last_error() !== JSON_ERROR_NONE) { |
||
56 | throw new EnsureException(sprintf('JSON body could not be decoded: %s', json_last_error_msg())); |
||
57 | } |
||
58 | return new JsonObject($decoded); |
||
59 | } |
||
60 | |||
62 |