@@ -113,6 +113,7 @@ discard block |
||
113 | 113 | |
114 | 114 | /** |
115 | 115 | * {@inheritdoc} |
116 | + * @param string $key |
|
116 | 117 | */ |
117 | 118 | public function remove($key) |
118 | 119 | { |
@@ -128,6 +129,7 @@ discard block |
||
128 | 129 | |
129 | 130 | /** |
130 | 131 | * {@inheritdoc} |
132 | + * @param string $key |
|
131 | 133 | */ |
132 | 134 | public function hasCacheControlDirective($key) |
133 | 135 | { |
@@ -136,6 +138,7 @@ discard block |
||
136 | 138 | |
137 | 139 | /** |
138 | 140 | * {@inheritdoc} |
141 | + * @param string $key |
|
139 | 142 | */ |
140 | 143 | public function getCacheControlDirective($key) |
141 | 144 | { |
@@ -81,6 +81,9 @@ |
||
81 | 81 | return 'memory'; |
82 | 82 | } |
83 | 83 | |
84 | + /** |
|
85 | + * @param string $memoryLimit |
|
86 | + */ |
|
84 | 87 | private function convertToBytes($memoryLimit) |
85 | 88 | { |
86 | 89 | if ('-1' === $memoryLimit) { |
@@ -379,7 +379,7 @@ |
||
379 | 379 | * @param string $key The store key |
380 | 380 | * @param string $data The data to store |
381 | 381 | * |
382 | - * @return bool |
|
382 | + * @return false|null |
|
383 | 383 | */ |
384 | 384 | private function save($key, $data) |
385 | 385 | { |
@@ -231,6 +231,9 @@ discard block |
||
231 | 231 | */ |
232 | 232 | abstract protected function appendValue($key, $value, $expiration = 0); |
233 | 233 | |
234 | + /** |
|
235 | + * @param string $token |
|
236 | + */ |
|
234 | 237 | private function createProfileFromData($token, $data, $parent = null) |
235 | 238 | { |
236 | 239 | $profile = new Profile($token); |
@@ -297,6 +300,9 @@ discard block |
||
297 | 300 | return false; |
298 | 301 | } |
299 | 302 | |
303 | + /** |
|
304 | + * @param string $name |
|
305 | + */ |
|
300 | 306 | private function isItemNameValid($name) |
301 | 307 | { |
302 | 308 | $length = strlen($name); |
@@ -214,7 +214,7 @@ discard block |
||
214 | 214 | * |
215 | 215 | * @param resource $file The file resource, with the pointer placed at the end of the line to read |
216 | 216 | * |
217 | - * @return mixed A string representing the line or null if beginning of file is reached |
|
217 | + * @return null|string A string representing the line or null if beginning of file is reached |
|
218 | 218 | */ |
219 | 219 | protected function readLineFromFile($file) |
220 | 220 | { |
@@ -254,6 +254,9 @@ discard block |
||
254 | 254 | return '' === $line ? null : $line; |
255 | 255 | } |
256 | 256 | |
257 | + /** |
|
258 | + * @param string $token |
|
259 | + */ |
|
257 | 260 | protected function createProfileFromData($token, $data, $parent = null) |
258 | 261 | { |
259 | 262 | $profile = new Profile($token); |
@@ -196,6 +196,9 @@ discard block |
||
196 | 196 | { |
197 | 197 | } |
198 | 198 | |
199 | + /** |
|
200 | + * @param string $parent |
|
201 | + */ |
|
199 | 202 | protected function createProfileFromData($token, $data, $parent = null) |
200 | 203 | { |
201 | 204 | $profile = new Profile($token); |
@@ -249,7 +252,7 @@ discard block |
||
249 | 252 | * |
250 | 253 | * @param string $token The profile token |
251 | 254 | * |
252 | - * @return string |
|
255 | + * @return boolean |
|
253 | 256 | */ |
254 | 257 | protected function has($token) |
255 | 258 | { |
@@ -224,7 +224,7 @@ discard block |
||
224 | 224 | /** |
225 | 225 | * Gets the Collectors associated with this profiler. |
226 | 226 | * |
227 | - * @return array An array of collectors |
|
227 | + * @return DataCollectorInterface[] An array of collectors |
|
228 | 228 | */ |
229 | 229 | public function all() |
230 | 230 | { |
@@ -284,6 +284,11 @@ discard block |
||
284 | 284 | return $this->collectors[$name]; |
285 | 285 | } |
286 | 286 | |
287 | + /** |
|
288 | + * @param string $value |
|
289 | + * |
|
290 | + * @return integer|null |
|
291 | + */ |
|
287 | 292 | private function getTimestamp($value) |
288 | 293 | { |
289 | 294 | if (null === $value || '' == $value) { |
@@ -246,6 +246,9 @@ discard block |
||
246 | 246 | $this->redis = $redis; |
247 | 247 | } |
248 | 248 | |
249 | + /** |
|
250 | + * @param string $token |
|
251 | + */ |
|
249 | 252 | private function createProfileFromData($token, $data, $parent = null) |
250 | 253 | { |
251 | 254 | $profile = new Profile($token); |
@@ -312,6 +315,9 @@ discard block |
||
312 | 315 | return false; |
313 | 316 | } |
314 | 317 | |
318 | + /** |
|
319 | + * @param string $name |
|
320 | + */ |
|
315 | 321 | private function isItemNameValid($name) |
316 | 322 | { |
317 | 323 | $length = strlen($name); |
@@ -84,6 +84,9 @@ |
||
84 | 84 | return $this->computeHash($this->buildUrl($url, $params)) === $hash; |
85 | 85 | } |
86 | 86 | |
87 | + /** |
|
88 | + * @param string $uri |
|
89 | + */ |
|
87 | 90 | private function computeHash($uri) |
88 | 91 | { |
89 | 92 | return urlencode(base64_encode(hash_hmac('sha256', $uri, $this->secret, true))); |