Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
24 | 31 | public function getErrors() |
|
25 | { |
||
26 | 31 | $errorsFormatted = []; |
|
27 | |||
28 | // Format the error type with the number of errors of that type. |
||
29 | 31 | foreach (self::$errors as $errorType => $errors) { |
|
30 | 11 | $errorTypeFormatted = sprintf($errorType, count($errors)); |
|
31 | 11 | $errorsFormatted[$errorTypeFormatted] = $errors; |
|
32 | 31 | } |
|
33 | |||
34 | 31 | return $errorsFormatted; |
|
35 | } |
||
36 | |||
54 | } |