1 | <?php |
||
7 | class CheckResult |
||
8 | { |
||
9 | const STATUS_SUCCESS = 'success'; |
||
10 | const STATUS_FAILURE = 'failure'; |
||
11 | const STATUS_NONE = 'none'; |
||
12 | |||
13 | private $status; |
||
14 | private $value; |
||
15 | private $message; |
||
16 | private $attributes = array(); |
||
17 | private $ruleName; |
||
18 | |||
19 | /** |
||
20 | * @var Response |
||
21 | */ |
||
22 | private $response; |
||
23 | |||
24 | /** |
||
25 | * Result constructor. |
||
26 | * |
||
27 | * @param $status |
||
28 | * @param $value |
||
29 | * @param $message |
||
30 | */ |
||
31 | public function __construct($status, $message = '', $value = null) |
||
37 | |||
38 | /** |
||
39 | * @return Attribute[] |
||
40 | */ |
||
41 | public function getAttributes() |
||
45 | |||
46 | /** |
||
47 | * @param array $attributes |
||
|
|||
48 | */ |
||
49 | public function addAttribute(Attribute $attribute) |
||
50 | { |
||
51 | $this->attributes[] = $attribute; |
||
52 | } |
||
53 | |||
54 | /** |
||
55 | * @return mixed |
||
56 | */ |
||
57 | public function getStatus() |
||
61 | |||
62 | /** |
||
63 | * @return mixed |
||
64 | */ |
||
65 | public function getValue() |
||
69 | |||
70 | /** |
||
71 | * @return mixed |
||
72 | */ |
||
73 | public function getMessage() |
||
77 | |||
78 | /** |
||
79 | * @return Response |
||
80 | */ |
||
81 | public function getResponse() |
||
85 | |||
86 | /** |
||
87 | * @param Response $response |
||
88 | */ |
||
89 | public function setResponse(Response $response) |
||
93 | |||
94 | /** |
||
95 | * @return mixed |
||
96 | */ |
||
97 | public function getRuleName() |
||
101 | |||
102 | /** |
||
103 | * @param mixed $ruleName |
||
104 | */ |
||
105 | public function setRuleName($ruleName) |
||
109 | } |
||
110 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.