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 | const IDENTIFIER_RULE_STANDARD = 'standard'; |
||
18 | const IDENTIFIER_RULE_WITHOUT_SMOKE_PREFIX = 'withoutSmokePrefix'; |
||
19 | |||
20 | private $status; |
||
21 | private $value; |
||
22 | private $message; |
||
23 | private $attributes = array(); |
||
24 | private $ruleName; |
||
25 | private $url; |
||
26 | |||
27 | private $tool; |
||
28 | private $identifierRule = self::IDENTIFIER_RULE_STANDARD; |
||
29 | |||
30 | /** |
||
31 | * @var UriAwareResponse |
||
32 | */ |
||
33 | private $response; |
||
34 | |||
35 | /** |
||
36 | * Result constructor. |
||
37 | * |
||
38 | * @param $status |
||
39 | * @param $value |
||
40 | * @param $message |
||
41 | */ |
||
42 | public function __construct($status, $message = '', $value = null, $url = null) |
||
49 | |||
50 | /** |
||
51 | * @return Attribute[] |
||
52 | */ |
||
53 | public function getAttributes() |
||
57 | |||
58 | /** |
||
59 | * @param array $attributes |
||
|
|||
60 | */ |
||
61 | public function addAttribute(Attribute $attribute) |
||
65 | |||
66 | public function setHint($message) |
||
70 | |||
71 | /** |
||
72 | * @return mixed |
||
73 | */ |
||
74 | public function getStatus() |
||
78 | |||
79 | /** |
||
80 | * @return mixed |
||
81 | */ |
||
82 | public function getValue() |
||
86 | |||
87 | /** |
||
88 | * @return string |
||
89 | */ |
||
90 | public function getTool() |
||
94 | |||
95 | /** |
||
96 | * @param string $tool |
||
97 | */ |
||
98 | public function setTool($tool) |
||
102 | |||
103 | /** |
||
104 | * @return string |
||
105 | */ |
||
106 | public function getIdentifierRule() |
||
110 | |||
111 | /** |
||
112 | * @param string $identifier |
||
113 | */ |
||
114 | public function setIdentifierRule($identifierRule) |
||
118 | |||
119 | /** |
||
120 | * @return string |
||
121 | */ |
||
122 | public function getMessage() |
||
126 | |||
127 | /** |
||
128 | * @param string $message |
||
129 | */ |
||
130 | public function setMessage($message) |
||
134 | |||
135 | /** |
||
136 | * @return UriAwareResponse |
||
137 | */ |
||
138 | public function getResponse() |
||
142 | |||
143 | /** |
||
144 | * @param ResponseInterface $response |
||
145 | */ |
||
146 | public function setResponse(ResponseInterface $response) |
||
150 | |||
151 | /** |
||
152 | * @return mixed |
||
153 | */ |
||
154 | public function getRuleName() |
||
158 | |||
159 | /** |
||
160 | * @param mixed $ruleName |
||
161 | */ |
||
162 | public function setRuleName($ruleName) |
||
166 | |||
167 | /** |
||
168 | * @return string |
||
169 | */ |
||
170 | public function getUrl() |
||
174 | } |
||
175 |
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.