| Conditions | 3 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | private function parseData($data) |
||
| 35 | { |
||
| 36 | $data = $this->methodType === self::REQUEST_METHOD_ALIAS ? json_encode($data) : json_decode($data); |
||
| 37 | |||
| 38 | if ($data === null) { |
||
| 39 | throw new JsonParserException(sprintf( |
||
| 40 | 'JSON decode error: "%s"', |
||
| 41 | json_last_error_msg() |
||
| 42 | )); |
||
| 43 | } |
||
| 44 | |||
| 45 | return $data; |
||
| 46 | } |
||
| 81 |