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 | private $tool; |
||
25 | |||
26 | /** |
||
27 | * @var UriAwareResponse |
||
28 | */ |
||
29 | private $response; |
||
30 | |||
31 | /** |
||
32 | * Result constructor. |
||
33 | * |
||
34 | * @param $status |
||
35 | * @param $value |
||
36 | * @param $message |
||
37 | */ |
||
38 | public function __construct($status, $message = '', $value = null, $url = null) |
||
45 | |||
46 | /** |
||
47 | * @return Attribute[] |
||
48 | */ |
||
49 | public function getAttributes() |
||
53 | |||
54 | /** |
||
55 | * @param array $attributes |
||
|
|||
56 | */ |
||
57 | public function addAttribute(Attribute $attribute) |
||
61 | |||
62 | public function setHint($message) |
||
66 | |||
67 | /** |
||
68 | * @return mixed |
||
69 | */ |
||
70 | public function getStatus() |
||
74 | |||
75 | /** |
||
76 | * @return mixed |
||
77 | */ |
||
78 | public function getValue() |
||
82 | |||
83 | /** |
||
84 | * @return string |
||
85 | */ |
||
86 | public function getTool() |
||
90 | |||
91 | /** |
||
92 | * @param string $tool |
||
93 | */ |
||
94 | public function setTool($tool) |
||
98 | |||
99 | /** |
||
100 | * @return string |
||
101 | */ |
||
102 | public function getMessage() |
||
106 | |||
107 | /** |
||
108 | * @param string $message |
||
109 | */ |
||
110 | public function setMessage($message) |
||
114 | |||
115 | /** |
||
116 | * @return UriAwareResponse |
||
117 | */ |
||
118 | public function getResponse() |
||
122 | |||
123 | /** |
||
124 | * @param ResponseInterface $response |
||
125 | */ |
||
126 | public function setResponse(ResponseInterface $response) |
||
130 | |||
131 | /** |
||
132 | * @return mixed |
||
133 | */ |
||
134 | public function getRuleName() |
||
138 | |||
139 | /** |
||
140 | * @param mixed $ruleName |
||
141 | */ |
||
142 | public function setRuleName($ruleName) |
||
146 | |||
147 | /** |
||
148 | * @return string |
||
149 | */ |
||
150 | public function getUrl() |
||
154 | } |
||
155 |
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.