| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | public function normalizeErrors(array $errors): array |
||
| 38 | { |
||
| 39 | $preparedErrors = []; |
||
| 40 | |||
| 41 | $status = $errors['status'] ?? null; |
||
| 42 | if (in_array($status, ['error', 'exception'], true)) { |
||
| 43 | list($errorKey, $errorMessage) = $this->prepareError($errors); |
||
| 44 | $preparedErrors[$errorKey] = $errorMessage; |
||
| 45 | } |
||
| 46 | |||
| 47 | return $preparedErrors; |
||
| 48 | } |
||
| 49 | |||
| 62 |