Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
37 | 4 | public function getErrorsIndexedByPath(string $separator = '.'): array |
|
38 | { |
||
39 | 4 | $errors = []; |
|
40 | 4 | foreach ($this->errors as $error) { |
|
41 | 4 | $stringValuePath = implode($separator, $error->getValuePath()); |
|
42 | 4 | $errors[$stringValuePath][] = $error->getMessage(); |
|
43 | } |
||
44 | |||
45 | 4 | return $errors; |
|
46 | } |
||
56 |