Conditions | 3 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
80 | public static function parseErrors($json_string) |
||
81 | { |
||
82 | $error_obj = json_decode($json_string); |
||
83 | $errors = []; |
||
84 | if (!empty($error_obj->errors)) { |
||
85 | foreach ($error_obj->errors as $error) { |
||
86 | $errors[] = new self($error->code, $error->path, $error->description); |
||
87 | } |
||
88 | } |
||
89 | |||
90 | return $errors; |
||
91 | } |
||
92 | } |
||
93 |