1 | <?php |
||
8 | class CheckResult |
||
9 | { |
||
10 | const STATUS_SUCCESS = 'success'; |
||
11 | const STATUS_FAILURE = 'failure'; |
||
12 | const STATUS_NONE = 'none'; |
||
13 | |||
14 | private $status; |
||
15 | private $value; |
||
16 | private $message; |
||
17 | private $attributes = array(); |
||
18 | private $ruleName; |
||
19 | private $url; |
||
20 | |||
21 | /** |
||
22 | * @var ResponseInterface |
||
23 | */ |
||
24 | private $response; |
||
25 | |||
26 | /** |
||
27 | * Result constructor. |
||
28 | * |
||
29 | * @param $status |
||
30 | * @param $value |
||
31 | * @param $message |
||
32 | */ |
||
33 | public function __construct($status, $message = '', $value = null, $url = null) |
||
40 | |||
41 | /** |
||
42 | * @return Attribute[] |
||
43 | */ |
||
44 | public function getAttributes() |
||
48 | |||
49 | /** |
||
50 | * @param array $attributes |
||
|
|||
51 | */ |
||
52 | public function addAttribute(Attribute $attribute) |
||
56 | |||
57 | /** |
||
58 | * @return mixed |
||
59 | */ |
||
60 | public function getStatus() |
||
64 | |||
65 | /** |
||
66 | * @return mixed |
||
67 | */ |
||
68 | public function getValue() |
||
72 | |||
73 | /** |
||
74 | * @return mixed |
||
75 | */ |
||
76 | public function getMessage() |
||
80 | |||
81 | /** |
||
82 | * @return UriAwareResponse |
||
83 | */ |
||
84 | public function getResponse() |
||
88 | |||
89 | /** |
||
90 | * @param ResponseInterface $response |
||
91 | */ |
||
92 | public function setResponse(ResponseInterface $response) |
||
96 | |||
97 | /** |
||
98 | * @return mixed |
||
99 | */ |
||
100 | public function getRuleName() |
||
104 | |||
105 | /** |
||
106 | * @param mixed $ruleName |
||
107 | */ |
||
108 | public function setRuleName($ruleName) |
||
112 | |||
113 | /** |
||
114 | * @return string |
||
115 | */ |
||
116 | public function getUrl() |
||
120 | } |
||
121 |
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.