1 | <?php |
||
14 | final class ProcessingErrorHandler { |
||
15 | |||
16 | /** |
||
17 | * @since 0.4 |
||
18 | * |
||
19 | * @var array of ProcessingError |
||
20 | */ |
||
21 | private static $errors = []; |
||
22 | |||
23 | /** |
||
24 | * Adds a single ProcessingError. |
||
25 | * |
||
26 | * @since 0.4 |
||
27 | * |
||
28 | * @param string $errorMessage |
||
|
|||
29 | * @param integer $severity |
||
30 | */ |
||
31 | 8 | public static function addError( ProcessingError $error ) { |
|
32 | 8 | self::$errors[$error->getElement()][] = $error; |
|
33 | 8 | } |
|
34 | |||
35 | /** |
||
36 | * Adds a list of ProcessingError. |
||
37 | * |
||
38 | * @since 0.4 |
||
39 | * |
||
40 | * @param array $errors |
||
41 | */ |
||
42 | public static function addErrors( array $errors ) { |
||
47 | |||
48 | /** |
||
49 | * Returns a list of all registered errors. |
||
50 | * |
||
51 | * @since 0.4 |
||
52 | * |
||
53 | * @return array of ProcessingError |
||
54 | */ |
||
55 | public static function getErrors() { |
||
58 | |||
59 | } |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.