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