1 | <?php |
||
13 | class Result |
||
14 | { |
||
15 | /** |
||
16 | * HTTP code. |
||
17 | * @var integer |
||
18 | */ |
||
19 | private $httpCode; |
||
20 | |||
21 | /** |
||
22 | * Payload. |
||
23 | * @var mixed |
||
24 | */ |
||
25 | private $payload = null; |
||
26 | |||
27 | /** |
||
28 | * Previous page number (or null). |
||
29 | * @var integer|null |
||
30 | */ |
||
31 | private $prevPage = null; |
||
32 | |||
33 | /** |
||
34 | * Next page number (or null). |
||
35 | * @var integer|null |
||
36 | */ |
||
37 | private $nextPage = null; |
||
38 | |||
39 | /** |
||
40 | * Last page number |
||
41 | * @var integer|null |
||
42 | */ |
||
43 | private $lastPage = null; |
||
44 | |||
45 | /** |
||
46 | * The limit for this endpoint |
||
47 | * @var integer |
||
48 | */ |
||
49 | private $rateLimit; |
||
50 | |||
51 | /** |
||
52 | * The amount of calls remaining for this endpoint |
||
53 | * @var integer |
||
54 | */ |
||
55 | private $rateLimitRemaining; |
||
56 | |||
57 | /** |
||
58 | * The X-RateLimit-Reset header provides a Unix UTC timestamp, letting you |
||
59 | * know the exact time that your fresh new rate limit kicks in. |
||
60 | * @var string |
||
61 | */ |
||
62 | private $rateLimitReset; |
||
63 | |||
64 | /** |
||
65 | * Decoded JSON response data. |
||
66 | * @var array |
||
67 | */ |
||
68 | private $decodedJsonData = null; |
||
69 | |||
70 | /** |
||
71 | * Constructor. |
||
72 | * @param array $decodedJsonData |
||
73 | * @param string $rawHttpResponseData |
||
|
|||
74 | * @param array[string] $rawHttpResponseHeaders |
||
75 | */ |
||
76 | 32 | public function __construct($decodedJsonData, $httpCode) |
|
81 | |||
82 | /** |
||
83 | * Return HTTP response code. |
||
84 | * @return integer |
||
85 | */ |
||
86 | 4 | public function getHttpCode() |
|
90 | |||
91 | /** |
||
92 | * Set HTTP response code. |
||
93 | * @param integer $code |
||
94 | */ |
||
95 | 32 | public function setHttpCode($httpCode) |
|
96 | { |
||
97 | 32 | $this->httpCode = $httpCode; |
|
98 | 32 | } |
|
99 | |||
100 | /** |
||
101 | * Return payload. |
||
102 | * @return mixed |
||
103 | */ |
||
104 | 30 | public function getPayload() |
|
108 | |||
109 | /** |
||
110 | * Set payload (parsed and wrapped response data). |
||
111 | * @param mixed $payload |
||
112 | */ |
||
113 | 29 | public function setPayload($payload) |
|
117 | |||
118 | /** |
||
119 | * Return decoded JSON data. |
||
120 | * @return array |
||
121 | */ |
||
122 | 29 | public function getDecodedJsonData() |
|
126 | |||
127 | /** |
||
128 | * Set decoded JSON data. |
||
129 | * @param array $decodedJsonData |
||
130 | */ |
||
131 | 32 | public function setDecodedJsonData($decodedJsonData) |
|
135 | |||
136 | /** |
||
137 | * Returns previous page number (or null). |
||
138 | * @return integer|null |
||
139 | */ |
||
140 | 1 | public function getPrevPage() |
|
144 | |||
145 | /** |
||
146 | * Set previous page number. |
||
147 | * @param integer|null $prevPage |
||
148 | */ |
||
149 | 1 | public function setPrevPage($prevPage) |
|
153 | |||
154 | /** |
||
155 | * Returns next page number (or null). |
||
156 | * @return integer|null |
||
157 | */ |
||
158 | 1 | public function getNextPage() |
|
162 | |||
163 | /** |
||
164 | * Set next page number. |
||
165 | * @param integer|null $nextPage |
||
166 | */ |
||
167 | 1 | public function setNextPage($nextPage) |
|
171 | |||
172 | /** |
||
173 | * Return last page number |
||
174 | * @return integer|null |
||
175 | */ |
||
176 | 1 | public function getLastPage() |
|
180 | |||
181 | /** |
||
182 | * Set last page number. |
||
183 | * @param integer|null $lastPage |
||
184 | */ |
||
185 | 1 | public function setLastPage($lastPage) |
|
189 | |||
190 | /** |
||
191 | * Return rate limit. |
||
192 | * @return integer|null |
||
193 | */ |
||
194 | 1 | public function getRateLimit() |
|
198 | |||
199 | /** |
||
200 | * Set rate limit. |
||
201 | * @param integer|null $rateLimit |
||
202 | */ |
||
203 | 1 | public function setRateLimit($rateLimit) |
|
207 | |||
208 | /** |
||
209 | * Return the amount of calls remaining. |
||
210 | * @return integer|null |
||
211 | */ |
||
212 | 1 | public function getRateLimitRemaining() |
|
216 | |||
217 | /** |
||
218 | * Set the amount of calls remaining. |
||
219 | * @param integer|null $rateLimitRemaining |
||
220 | */ |
||
221 | 1 | public function setRateLimitRemaining($rateLimitRemaining) |
|
225 | |||
226 | /** |
||
227 | * Return the exact time that your fresh new rate limit kicks in. |
||
228 | * @return integer|null |
||
229 | */ |
||
230 | 1 | public function getRateLimitReset() |
|
234 | |||
235 | /** |
||
236 | * Set the exact time that your fresh new rate limit kicks in. |
||
237 | * @param integer|null $rateLimitReset |
||
238 | */ |
||
239 | 1 | public function setRateLimitReset($rateLimitReset) |
|
243 | } |
||
244 | |||
246 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.