| Conditions | 6 |
| Paths | 6 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 26 | private static function getErrorMessage($error) |
||
| 27 | { |
||
| 28 | switch ($error) { |
||
| 29 | case JSON_ERROR_DEPTH: |
||
| 30 | return ' - Maximum stack depth exceeded'; |
||
| 31 | case JSON_ERROR_STATE_MISMATCH: |
||
| 32 | return ' - Underflow or the modes mismatch'; |
||
| 33 | case JSON_ERROR_CTRL_CHAR: |
||
| 34 | return ' - Unexpected control character found'; |
||
| 35 | case JSON_ERROR_SYNTAX: |
||
| 36 | return ' - Syntax error, malformed JSON'; |
||
| 37 | case JSON_ERROR_UTF8: |
||
| 38 | return ' - Malformed UTF-8 characters, possibly incorrectly encoded'; |
||
| 39 | default: |
||
| 40 | return ' - Unknown error'; |
||
| 41 | } |
||
| 42 | } |
||
| 43 | } |
||
| 44 |