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 |
||
33 | 76 | public function getErrors() |
|
34 | { |
||
35 | 76 | $errorsFormatted = []; |
|
36 | |||
37 | // Format the error type with the number of errors of that type. |
||
38 | 76 | foreach (self::$errors as $errorType => $errors) { |
|
39 | 50 | $errorTypeFormatted = sprintf($errorType, count($errors)); |
|
40 | 50 | $errorsFormatted[$errorTypeFormatted] = $errors; |
|
41 | 76 | } |
|
42 | |||
43 | 76 | return $errorsFormatted; |
|
44 | } |
||
45 | |||
63 | } |