| Conditions | 3 |
| Paths | 2 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | 8 | public function deserialize($data, $output) |
|
| 29 | { |
||
| 30 | 8 | $arrayData = json_decode($data, true); |
|
| 31 | 8 | if (null === $arrayData) { |
|
| 32 | 2 | throw new JsonDeserializationException(sprintf( |
|
| 33 | 2 | 'Invalid json data, error %s : %s', |
|
| 34 | 1 | json_last_error(), |
|
| 35 | 2 | function_exists('json_last_error_msg') ? // php 5.4 compatibility |
|
| 36 | 2 | json_last_error_msg() : 'error message unavailable' |
|
| 37 | 1 | )); |
|
| 38 | } |
||
| 39 | |||
| 40 | 6 | return $this->normalizer->denormalize($arrayData, $output); |
|
| 41 | } |
||
| 42 | } |
||
| 43 |