| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | public function normalizeErrors(array $errors): array |
||
| 43 | { |
||
| 44 | $preparedErrors = []; |
||
| 45 | |||
| 46 | $status = $errors['status'] ?? null; |
||
| 47 | |||
| 48 | if (in_array($status, ['error', 'exception'], true)) { |
||
| 49 | list($errorKey, $errorMessage) = $this->prepareError($errors); |
||
| 50 | $preparedErrors[$errorKey] = $errorMessage; |
||
| 51 | } |
||
| 52 | |||
| 53 | return $preparedErrors; |
||
| 54 | } |
||
| 55 | |||
| 68 |