| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 65 | 1 | public function getErrorsIndexedByPath(string $separator = '.'): array |
|
| 66 | { |
||
| 67 | 1 | $errors = []; |
|
| 68 | 1 | foreach ($this->errors as $error) { |
|
| 69 | 1 | $stringValuePath = implode($separator, $error->getValuePath()); |
|
| 70 | 1 | $errors[$stringValuePath][] = $error->getMessage(); |
|
| 71 | } |
||
| 72 | |||
| 73 | 1 | return $errors; |
|
| 74 | } |
||
| 76 |