@@ -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])) { |
@@ -230,7 +230,7 @@ discard block |
||
230 | 230 | { |
231 | 231 | $this->init(); |
232 | 232 | $result = $this->driver->exists($key); |
233 | - return (bool)$result; |
|
233 | + return (bool) $result; |
|
234 | 234 | } |
235 | 235 | |
236 | 236 | /** |
@@ -280,7 +280,7 @@ discard block |
||
280 | 280 | { |
281 | 281 | $this->init(); |
282 | 282 | $result = $this->driver->expire($key, $seconds); |
283 | - return (bool)$result; |
|
283 | + return (bool) $result; |
|
284 | 284 | } |
285 | 285 | |
286 | 286 | /** |
@@ -293,7 +293,7 @@ discard block |
||
293 | 293 | { |
294 | 294 | $this->init(); |
295 | 295 | $result = $this->driver->pexpire($key, $miliseconds); |
296 | - return (bool)$result; |
|
296 | + return (bool) $result; |
|
297 | 297 | } |
298 | 298 | |
299 | 299 | /** |
@@ -306,7 +306,7 @@ discard block |
||
306 | 306 | { |
307 | 307 | $this->init(); |
308 | 308 | $result = $this->driver->expireat($key, $timestamp); |
309 | - return (bool)$result; |
|
309 | + return (bool) $result; |
|
310 | 310 | } |
311 | 311 | |
312 | 312 | /** |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | { |
320 | 320 | $this->init(); |
321 | 321 | $result = $this->driver->pexpireat($key, $milisecondsTimestamp); |
322 | - return (bool)$result; |
|
322 | + return (bool) $result; |
|
323 | 323 | } |
324 | 324 | |
325 | 325 | /** |
@@ -348,7 +348,7 @@ discard block |
||
348 | 348 | { |
349 | 349 | $this->init(); |
350 | 350 | $result = $this->driver->persist($key); |
351 | - return (bool)$result; |
|
351 | + return (bool) $result; |
|
352 | 352 | } |
353 | 353 | |
354 | 354 | /** |
@@ -361,7 +361,7 @@ discard block |
||
361 | 361 | { |
362 | 362 | $this->init(); |
363 | 363 | $result = $this->driver->setnx($key, $value); |
364 | - return (bool)$result; |
|
364 | + return (bool) $result; |
|
365 | 365 | } |
366 | 366 | |
367 | 367 | /** |
@@ -406,7 +406,7 @@ discard block |
||
406 | 406 | public function incrby($key, $increment = 1) |
407 | 407 | { |
408 | 408 | $this->init(); |
409 | - return $this->driver->incrby($key, (int)$increment); |
|
409 | + return $this->driver->incrby($key, (int) $increment); |
|
410 | 410 | } |
411 | 411 | |
412 | 412 | /** |
@@ -441,7 +441,7 @@ discard block |
||
441 | 441 | public function decrby($key, $decrement = 1) |
442 | 442 | { |
443 | 443 | $this->init(); |
444 | - return $this->driver->decrby($key, (int)$decrement); |
|
444 | + return $this->driver->decrby($key, (int) $decrement); |
|
445 | 445 | } |
446 | 446 | |
447 | 447 | /** |
@@ -510,7 +510,7 @@ discard block |
||
510 | 510 | */ |
511 | 511 | public function scan(&$iterator, $pattern = null, $count = null) |
512 | 512 | { |
513 | - if ((string)$iterator === '0') { |
|
513 | + if ((string) $iterator === '0') { |
|
514 | 514 | return null; |
515 | 515 | } |
516 | 516 | $this->init(); |
@@ -558,7 +558,7 @@ discard block |
||
558 | 558 | public function hincrby($key, $field, $increment = 1) |
559 | 559 | { |
560 | 560 | $this->init(); |
561 | - return $this->driver->hincrby($key, $field, (int)$increment); |
|
561 | + return $this->driver->hincrby($key, $field, (int) $increment); |
|
562 | 562 | } |
563 | 563 | |
564 | 564 | /** |
@@ -620,7 +620,7 @@ discard block |
||
620 | 620 | */ |
621 | 621 | public function hscan($key, &$iterator, $pattern = null, $count = null) |
622 | 622 | { |
623 | - if ((string)$iterator === '0') { |
|
623 | + if ((string) $iterator === '0') { |
|
624 | 624 | return null; |
625 | 625 | } |
626 | 626 | $this->init(); |
@@ -680,7 +680,7 @@ discard block |
||
680 | 680 | */ |
681 | 681 | public function sscan($key, &$iterator, $pattern = null, $count = null) |
682 | 682 | { |
683 | - if ((string)$iterator === '0') { |
|
683 | + if ((string) $iterator === '0') { |
|
684 | 684 | return null; |
685 | 685 | } |
686 | 686 | $this->init(); |
@@ -802,7 +802,7 @@ discard block |
||
802 | 802 | */ |
803 | 803 | public function zscan($key, &$iterator, $pattern = null, $count = null) |
804 | 804 | { |
805 | - if ((string)$iterator === '0') { |
|
805 | + if ((string) $iterator === '0') { |
|
806 | 806 | return null; |
807 | 807 | } |
808 | 808 | $this->init(); |
@@ -863,10 +863,10 @@ discard block |
||
863 | 863 | */ |
864 | 864 | private function prepareKeyValue(array $dictionary, $command) |
865 | 865 | { |
866 | - $keys = array_values(array_filter($dictionary, function ($key) { |
|
866 | + $keys = array_values(array_filter($dictionary, function($key) { |
|
867 | 867 | return $key % 2 == 0; |
868 | 868 | }, ARRAY_FILTER_USE_KEY)); |
869 | - $values = array_values(array_filter($dictionary, function ($key) { |
|
869 | + $values = array_values(array_filter($dictionary, function($key) { |
|
870 | 870 | return $key % 2 == 1; |
871 | 871 | }, ARRAY_FILTER_USE_KEY)); |
872 | 872 |