@@ -290,7 +290,7 @@ discard block |
||
290 | 290 | /** |
291 | 291 | * Increment the float value of a key by the given amount |
292 | 292 | * @param string $key |
293 | - * @param float $increment |
|
293 | + * @param integer $increment |
|
294 | 294 | * @return float |
295 | 295 | */ |
296 | 296 | public function incrbyfloat($key, $increment = 1) |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | /** |
326 | 326 | * Decrement the float value of a key by the given amount |
327 | 327 | * @param string $key |
328 | - * @param float $decrement |
|
328 | + * @param integer $decrement |
|
329 | 329 | * @return float |
330 | 330 | */ |
331 | 331 | public function decrbyfloat($key, $decrement = 1) |
@@ -431,7 +431,7 @@ discard block |
||
431 | 431 | * Increment the float value of hash field by given amount |
432 | 432 | * @param string $key |
433 | 433 | * @param string $field |
434 | - * @param float $increment |
|
434 | + * @param integer $increment |
|
435 | 435 | * @return float |
436 | 436 | */ |
437 | 437 | public function hincrbyfloat($key, $field, $increment = 1) |
@@ -666,6 +666,9 @@ discard block |
||
666 | 666 | return array_combine($keys, $values); |
667 | 667 | } |
668 | 668 | |
669 | + /** |
|
670 | + * @param string $command |
|
671 | + */ |
|
669 | 672 | private function prepareArguments($command, ...$params) |
670 | 673 | { |
671 | 674 | if (!isset($params[0])) { |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | { |
226 | 226 | $this->init(); |
227 | 227 | $result = $this->driver->exists($key); |
228 | - return (bool)$result; |
|
228 | + return (bool) $result; |
|
229 | 229 | } |
230 | 230 | |
231 | 231 | /** |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | { |
276 | 276 | $this->init(); |
277 | 277 | $result = $this->driver->expire($key, $seconds); |
278 | - return (bool)$result; |
|
278 | + return (bool) $result; |
|
279 | 279 | } |
280 | 280 | |
281 | 281 | /** |
@@ -288,7 +288,7 @@ discard block |
||
288 | 288 | { |
289 | 289 | $this->init(); |
290 | 290 | $result = $this->driver->pexpire($key, $miliseconds); |
291 | - return (bool)$result; |
|
291 | + return (bool) $result; |
|
292 | 292 | } |
293 | 293 | |
294 | 294 | /** |
@@ -301,7 +301,7 @@ discard block |
||
301 | 301 | { |
302 | 302 | $this->init(); |
303 | 303 | $result = $this->driver->expireat($key, $timestamp); |
304 | - return (bool)$result; |
|
304 | + return (bool) $result; |
|
305 | 305 | } |
306 | 306 | |
307 | 307 | /** |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | { |
315 | 315 | $this->init(); |
316 | 316 | $result = $this->driver->pexpireat($key, $milisecondsTimestamp); |
317 | - return (bool)$result; |
|
317 | + return (bool) $result; |
|
318 | 318 | } |
319 | 319 | |
320 | 320 | /** |
@@ -343,7 +343,7 @@ discard block |
||
343 | 343 | { |
344 | 344 | $this->init(); |
345 | 345 | $result = $this->driver->persist($key); |
346 | - return (bool)$result; |
|
346 | + return (bool) $result; |
|
347 | 347 | } |
348 | 348 | |
349 | 349 | /** |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | { |
357 | 357 | $this->init(); |
358 | 358 | $result = $this->driver->setnx($key, $value); |
359 | - return (bool)$result; |
|
359 | + return (bool) $result; |
|
360 | 360 | } |
361 | 361 | |
362 | 362 | /** |
@@ -401,7 +401,7 @@ discard block |
||
401 | 401 | public function incrby($key, $increment = 1) |
402 | 402 | { |
403 | 403 | $this->init(); |
404 | - return $this->driver->incrby($key, (int)$increment); |
|
404 | + return $this->driver->incrby($key, (int) $increment); |
|
405 | 405 | } |
406 | 406 | |
407 | 407 | /** |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | public function decrby($key, $decrement = 1) |
437 | 437 | { |
438 | 438 | $this->init(); |
439 | - return $this->driver->decrby($key, (int)$decrement); |
|
439 | + return $this->driver->decrby($key, (int) $decrement); |
|
440 | 440 | } |
441 | 441 | |
442 | 442 | /** |
@@ -505,7 +505,7 @@ discard block |
||
505 | 505 | */ |
506 | 506 | public function scan(&$iterator, $pattern = null, $count = null) |
507 | 507 | { |
508 | - if ((string)$iterator === '0') { |
|
508 | + if ((string) $iterator === '0') { |
|
509 | 509 | return null; |
510 | 510 | } |
511 | 511 | $this->init(); |
@@ -553,7 +553,7 @@ discard block |
||
553 | 553 | public function hincrby($key, $field, $increment = 1) |
554 | 554 | { |
555 | 555 | $this->init(); |
556 | - return $this->driver->hincrby($key, $field, (int)$increment); |
|
556 | + return $this->driver->hincrby($key, $field, (int) $increment); |
|
557 | 557 | } |
558 | 558 | |
559 | 559 | /** |
@@ -615,7 +615,7 @@ discard block |
||
615 | 615 | */ |
616 | 616 | public function hscan($key, &$iterator, $pattern = null, $count = null) |
617 | 617 | { |
618 | - if ((string)$iterator === '0') { |
|
618 | + if ((string) $iterator === '0') { |
|
619 | 619 | return null; |
620 | 620 | } |
621 | 621 | $this->init(); |
@@ -675,7 +675,7 @@ discard block |
||
675 | 675 | */ |
676 | 676 | public function sscan($key, &$iterator, $pattern = null, $count = null) |
677 | 677 | { |
678 | - if ((string)$iterator === '0') { |
|
678 | + if ((string) $iterator === '0') { |
|
679 | 679 | return null; |
680 | 680 | } |
681 | 681 | $this->init(); |
@@ -836,10 +836,10 @@ discard block |
||
836 | 836 | */ |
837 | 837 | private function prepareKeyValue(array $dictionary, $command) |
838 | 838 | { |
839 | - $keys = array_values(array_filter($dictionary, function ($key) { |
|
839 | + $keys = array_values(array_filter($dictionary, function($key) { |
|
840 | 840 | return $key % 2 == 0; |
841 | 841 | }, ARRAY_FILTER_USE_KEY)); |
842 | - $values = array_values(array_filter($dictionary, function ($key) { |
|
842 | + $values = array_values(array_filter($dictionary, function($key) { |
|
843 | 843 | return $key % 2 == 1; |
844 | 844 | }, ARRAY_FILTER_USE_KEY)); |
845 | 845 |