@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | } |
206 | 206 | $this->database = $database; |
207 | 207 | $this->selectedDatabase = $database; |
208 | - return (bool)$result; |
|
208 | + return (bool) $result; |
|
209 | 209 | } |
210 | 210 | |
211 | 211 | /** |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | { |
238 | 238 | $this->init(); |
239 | 239 | $result = $this->driver->exists($key); |
240 | - return (bool)$result; |
|
240 | + return (bool) $result; |
|
241 | 241 | } |
242 | 242 | |
243 | 243 | /** |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | { |
290 | 290 | $this->init(); |
291 | 291 | $result = $this->driver->expire($key, $seconds); |
292 | - return (bool)$result; |
|
292 | + return (bool) $result; |
|
293 | 293 | } |
294 | 294 | |
295 | 295 | /** |
@@ -303,7 +303,7 @@ discard block |
||
303 | 303 | { |
304 | 304 | $this->init(); |
305 | 305 | $result = $this->driver->pexpire($key, $miliseconds); |
306 | - return (bool)$result; |
|
306 | + return (bool) $result; |
|
307 | 307 | } |
308 | 308 | |
309 | 309 | /** |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | { |
318 | 318 | $this->init(); |
319 | 319 | $result = $this->driver->expireat($key, $timestamp); |
320 | - return (bool)$result; |
|
320 | + return (bool) $result; |
|
321 | 321 | } |
322 | 322 | |
323 | 323 | /** |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | { |
332 | 332 | $this->init(); |
333 | 333 | $result = $this->driver->pexpireat($key, $milisecondsTimestamp); |
334 | - return (bool)$result; |
|
334 | + return (bool) $result; |
|
335 | 335 | } |
336 | 336 | |
337 | 337 | /** |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | { |
363 | 363 | $this->init(); |
364 | 364 | $result = $this->driver->persist($key); |
365 | - return (bool)$result; |
|
365 | + return (bool) $result; |
|
366 | 366 | } |
367 | 367 | |
368 | 368 | /** |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | { |
377 | 377 | $this->init(); |
378 | 378 | $result = $this->driver->setnx($key, $value); |
379 | - return (bool)$result; |
|
379 | + return (bool) $result; |
|
380 | 380 | } |
381 | 381 | |
382 | 382 | /** |
@@ -425,7 +425,7 @@ discard block |
||
425 | 425 | public function incrby(string $key, int $increment = 1): int |
426 | 426 | { |
427 | 427 | $this->init(); |
428 | - return $this->driver->incrby($key, (int)$increment); |
|
428 | + return $this->driver->incrby($key, (int) $increment); |
|
429 | 429 | } |
430 | 430 | |
431 | 431 | /** |
@@ -438,7 +438,7 @@ discard block |
||
438 | 438 | public function incrbyfloat(string $key, float $increment = 1.0): float |
439 | 439 | { |
440 | 440 | $this->init(); |
441 | - return (float)$this->driver->incrbyfloat($key, $increment); |
|
441 | + return (float) $this->driver->incrbyfloat($key, $increment); |
|
442 | 442 | } |
443 | 443 | |
444 | 444 | /** |
@@ -463,7 +463,7 @@ discard block |
||
463 | 463 | public function decrby(string $key, int $decrement = 1): int |
464 | 464 | { |
465 | 465 | $this->init(); |
466 | - return $this->driver->decrby($key, (int)$decrement); |
|
466 | + return $this->driver->decrby($key, (int) $decrement); |
|
467 | 467 | } |
468 | 468 | |
469 | 469 | /** |
@@ -536,7 +536,7 @@ discard block |
||
536 | 536 | */ |
537 | 537 | public function scan(&$iterator, ?string $pattern = null, ?int $count = null) |
538 | 538 | { |
539 | - if ((string)$iterator === '0') { |
|
539 | + if ((string) $iterator === '0') { |
|
540 | 540 | return null; |
541 | 541 | } |
542 | 542 | $this->init(); |
@@ -571,7 +571,7 @@ discard block |
||
571 | 571 | { |
572 | 572 | $fields = $this->prepareArguments('hdel', ...$fields); |
573 | 573 | $this->init(); |
574 | - return (int)$this->driver->hdel($key, ...$fields); |
|
574 | + return (int) $this->driver->hdel($key, ...$fields); |
|
575 | 575 | } |
576 | 576 | |
577 | 577 | /** |
@@ -581,7 +581,7 @@ discard block |
||
581 | 581 | public function hincrby(string $key, string $field, int $increment = 1): int |
582 | 582 | { |
583 | 583 | $this->init(); |
584 | - return (int)$this->driver->hincrby($key, $field, (int)$increment); |
|
584 | + return (int) $this->driver->hincrby($key, $field, (int) $increment); |
|
585 | 585 | } |
586 | 586 | |
587 | 587 | /** |
@@ -591,7 +591,7 @@ discard block |
||
591 | 591 | public function hincrbyfloat(string $key, string $field, float $increment = 1.0): float |
592 | 592 | { |
593 | 593 | $this->init(); |
594 | - return (float)$this->driver->hincrbyfloat($key, $field, $increment); |
|
594 | + return (float) $this->driver->hincrbyfloat($key, $field, $increment); |
|
595 | 595 | } |
596 | 596 | |
597 | 597 | /** |
@@ -642,7 +642,7 @@ discard block |
||
642 | 642 | */ |
643 | 643 | public function hscan(string $key, &$iterator, ?string $pattern = null, ?int $count = null) |
644 | 644 | { |
645 | - if ((string)$iterator === '0') { |
|
645 | + if ((string) $iterator === '0') { |
|
646 | 646 | return null; |
647 | 647 | } |
648 | 648 | $this->init(); |
@@ -667,7 +667,7 @@ discard block |
||
667 | 667 | { |
668 | 668 | $members = $this->prepareArguments('sadd', ...$members); |
669 | 669 | $this->init(); |
670 | - return (int)$this->driver->sadd($key, ...$members); |
|
670 | + return (int) $this->driver->sadd($key, ...$members); |
|
671 | 671 | } |
672 | 672 | |
673 | 673 | /** |
@@ -706,7 +706,7 @@ discard block |
||
706 | 706 | */ |
707 | 707 | public function sscan(string $key, &$iterator, string $pattern = null, int $count = null) |
708 | 708 | { |
709 | - if ((string)$iterator === '0') { |
|
709 | + if ((string) $iterator === '0') { |
|
710 | 710 | return null; |
711 | 711 | } |
712 | 712 | $this->init(); |
@@ -729,7 +729,7 @@ discard block |
||
729 | 729 | { |
730 | 730 | $elements = $this->prepareArguments('lpush', ...$elements); |
731 | 731 | $this->init(); |
732 | - return (int)$this->driver->lpush($key, ...$elements); |
|
732 | + return (int) $this->driver->lpush($key, ...$elements); |
|
733 | 733 | } |
734 | 734 | |
735 | 735 | /** |
@@ -745,7 +745,7 @@ discard block |
||
745 | 745 | { |
746 | 746 | $elements = $this->prepareArguments('rpush', ...$elements); |
747 | 747 | $this->init(); |
748 | - return (int)$this->driver->rpush($key, ...$elements); |
|
748 | + return (int) $this->driver->rpush($key, ...$elements); |
|
749 | 749 | } |
750 | 750 | |
751 | 751 | /** |
@@ -804,7 +804,7 @@ discard block |
||
804 | 804 | } |
805 | 805 | return $return; |
806 | 806 | } |
807 | - return (int)$this->driver->zadd($key, ...$dictionary); |
|
807 | + return (int) $this->driver->zadd($key, ...$dictionary); |
|
808 | 808 | } |
809 | 809 | |
810 | 810 | /** |
@@ -817,7 +817,7 @@ discard block |
||
817 | 817 | public function zrem(string $key, ...$members): int |
818 | 818 | { |
819 | 819 | $members = $this->prepareArguments('zrem', ...$members); |
820 | - return (int)$this->driver->zrem($key, ...$members); |
|
820 | + return (int) $this->driver->zrem($key, ...$members); |
|
821 | 821 | } |
822 | 822 | |
823 | 823 | /** |
@@ -844,7 +844,7 @@ discard block |
||
844 | 844 | */ |
845 | 845 | public function zscan(string $key, &$iterator, ?string $pattern = null, ?int $count = null) |
846 | 846 | { |
847 | - if ((string)$iterator === '0') { |
|
847 | + if ((string) $iterator === '0') { |
|
848 | 848 | return null; |
849 | 849 | } |
850 | 850 | $this->init(); |
@@ -927,10 +927,10 @@ discard block |
||
927 | 927 | */ |
928 | 928 | private function prepareKeyValue(array $dictionary, string $command): array |
929 | 929 | { |
930 | - $keys = array_values(array_filter($dictionary, function ($key) { |
|
930 | + $keys = array_values(array_filter($dictionary, function($key) { |
|
931 | 931 | return $key % 2 == 0; |
932 | 932 | }, ARRAY_FILTER_USE_KEY)); |
933 | - $values = array_values(array_filter($dictionary, function ($key) { |
|
933 | + $values = array_values(array_filter($dictionary, function($key) { |
|
934 | 934 | return $key % 2 == 1; |
935 | 935 | }, ARRAY_FILTER_USE_KEY)); |
936 | 936 |