@@ -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 | /** |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | { |
240 | 240 | $this->init(); |
241 | 241 | $result = $this->driver->exists($key); |
242 | - return (bool)$result; |
|
242 | + return (bool) $result; |
|
243 | 243 | } |
244 | 244 | |
245 | 245 | /** |
@@ -291,7 +291,7 @@ discard block |
||
291 | 291 | { |
292 | 292 | $this->init(); |
293 | 293 | $result = $this->driver->expire($key, $seconds); |
294 | - return (bool)$result; |
|
294 | + return (bool) $result; |
|
295 | 295 | } |
296 | 296 | |
297 | 297 | /** |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | { |
306 | 306 | $this->init(); |
307 | 307 | $result = $this->driver->pexpire($key, $milliseconds); |
308 | - return (bool)$result; |
|
308 | + return (bool) $result; |
|
309 | 309 | } |
310 | 310 | |
311 | 311 | /** |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | { |
320 | 320 | $this->init(); |
321 | 321 | $result = $this->driver->expireat($key, $timestamp); |
322 | - return (bool)$result; |
|
322 | + return (bool) $result; |
|
323 | 323 | } |
324 | 324 | |
325 | 325 | /** |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | { |
334 | 334 | $this->init(); |
335 | 335 | $result = $this->driver->pexpireat($key, $millisecondsTimestamp); |
336 | - return (bool)$result; |
|
336 | + return (bool) $result; |
|
337 | 337 | } |
338 | 338 | |
339 | 339 | /** |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | { |
365 | 365 | $this->init(); |
366 | 366 | $result = $this->driver->persist($key); |
367 | - return (bool)$result; |
|
367 | + return (bool) $result; |
|
368 | 368 | } |
369 | 369 | |
370 | 370 | /** |
@@ -378,7 +378,7 @@ discard block |
||
378 | 378 | { |
379 | 379 | $this->init(); |
380 | 380 | $result = $this->driver->setnx($key, $value); |
381 | - return (bool)$result; |
|
381 | + return (bool) $result; |
|
382 | 382 | } |
383 | 383 | |
384 | 384 | /** |
@@ -427,7 +427,7 @@ discard block |
||
427 | 427 | public function incrby(string $key, int $increment = 1): int |
428 | 428 | { |
429 | 429 | $this->init(); |
430 | - return $this->driver->incrby($key, (int)$increment); |
|
430 | + return $this->driver->incrby($key, (int) $increment); |
|
431 | 431 | } |
432 | 432 | |
433 | 433 | /** |
@@ -440,7 +440,7 @@ discard block |
||
440 | 440 | public function incrbyfloat(string $key, float $increment = 1.0): float |
441 | 441 | { |
442 | 442 | $this->init(); |
443 | - return (float)$this->driver->incrbyfloat($key, $increment); |
|
443 | + return (float) $this->driver->incrbyfloat($key, $increment); |
|
444 | 444 | } |
445 | 445 | |
446 | 446 | /** |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | public function decrby(string $key, int $decrement = 1): int |
466 | 466 | { |
467 | 467 | $this->init(); |
468 | - return $this->driver->decrby($key, (int)$decrement); |
|
468 | + return $this->driver->decrby($key, (int) $decrement); |
|
469 | 469 | } |
470 | 470 | |
471 | 471 | /** |
@@ -538,7 +538,7 @@ discard block |
||
538 | 538 | */ |
539 | 539 | public function scan(&$iterator, ?string $pattern = null, ?int $count = null) |
540 | 540 | { |
541 | - if ((string)$iterator === '0') { |
|
541 | + if ((string) $iterator === '0') { |
|
542 | 542 | return null; |
543 | 543 | } |
544 | 544 | $this->init(); |
@@ -573,7 +573,7 @@ discard block |
||
573 | 573 | { |
574 | 574 | $fields = $this->prepareArguments('hdel', ...$fields); |
575 | 575 | $this->init(); |
576 | - return (int)$this->driver->hdel($key, ...$fields); |
|
576 | + return (int) $this->driver->hdel($key, ...$fields); |
|
577 | 577 | } |
578 | 578 | |
579 | 579 | /** |
@@ -583,7 +583,7 @@ discard block |
||
583 | 583 | public function hincrby(string $key, string $field, int $increment = 1): int |
584 | 584 | { |
585 | 585 | $this->init(); |
586 | - return (int)$this->driver->hincrby($key, $field, (int)$increment); |
|
586 | + return (int) $this->driver->hincrby($key, $field, (int) $increment); |
|
587 | 587 | } |
588 | 588 | |
589 | 589 | /** |
@@ -593,7 +593,7 @@ discard block |
||
593 | 593 | public function hincrbyfloat(string $key, string $field, float $increment = 1.0): float |
594 | 594 | { |
595 | 595 | $this->init(); |
596 | - return (float)$this->driver->hincrbyfloat($key, $field, $increment); |
|
596 | + return (float) $this->driver->hincrbyfloat($key, $field, $increment); |
|
597 | 597 | } |
598 | 598 | |
599 | 599 | /** |
@@ -644,7 +644,7 @@ discard block |
||
644 | 644 | */ |
645 | 645 | public function hscan(string $key, &$iterator, ?string $pattern = null, ?int $count = null) |
646 | 646 | { |
647 | - if ((string)$iterator === '0') { |
|
647 | + if ((string) $iterator === '0') { |
|
648 | 648 | return null; |
649 | 649 | } |
650 | 650 | $this->init(); |
@@ -669,7 +669,7 @@ discard block |
||
669 | 669 | { |
670 | 670 | $members = $this->prepareArguments('sadd', ...$members); |
671 | 671 | $this->init(); |
672 | - return (int)$this->driver->sadd($key, ...$members); |
|
672 | + return (int) $this->driver->sadd($key, ...$members); |
|
673 | 673 | } |
674 | 674 | |
675 | 675 | /** |
@@ -708,7 +708,7 @@ discard block |
||
708 | 708 | */ |
709 | 709 | public function sscan(string $key, &$iterator, string $pattern = null, int $count = null) |
710 | 710 | { |
711 | - if ((string)$iterator === '0') { |
|
711 | + if ((string) $iterator === '0') { |
|
712 | 712 | return null; |
713 | 713 | } |
714 | 714 | $this->init(); |
@@ -731,7 +731,7 @@ discard block |
||
731 | 731 | { |
732 | 732 | $elements = $this->prepareArguments('lpush', ...$elements); |
733 | 733 | $this->init(); |
734 | - return (int)$this->driver->lpush($key, ...$elements); |
|
734 | + return (int) $this->driver->lpush($key, ...$elements); |
|
735 | 735 | } |
736 | 736 | |
737 | 737 | /** |
@@ -747,7 +747,7 @@ discard block |
||
747 | 747 | { |
748 | 748 | $elements = $this->prepareArguments('rpush', ...$elements); |
749 | 749 | $this->init(); |
750 | - return (int)$this->driver->rpush($key, ...$elements); |
|
750 | + return (int) $this->driver->rpush($key, ...$elements); |
|
751 | 751 | } |
752 | 752 | |
753 | 753 | /** |
@@ -806,7 +806,7 @@ discard block |
||
806 | 806 | } |
807 | 807 | return $return; |
808 | 808 | } |
809 | - return (int)$this->driver->zadd($key, ...$dictionary); |
|
809 | + return (int) $this->driver->zadd($key, ...$dictionary); |
|
810 | 810 | } |
811 | 811 | |
812 | 812 | /** |
@@ -819,7 +819,7 @@ discard block |
||
819 | 819 | public function zrem(string $key, string ...$members): int |
820 | 820 | { |
821 | 821 | $members = $this->prepareArguments('zrem', ...$members); |
822 | - return (int)$this->driver->zrem($key, ...$members); |
|
822 | + return (int) $this->driver->zrem($key, ...$members); |
|
823 | 823 | } |
824 | 824 | |
825 | 825 | /** |
@@ -846,7 +846,7 @@ discard block |
||
846 | 846 | */ |
847 | 847 | public function zscan(string $key, &$iterator, ?string $pattern = null, ?int $count = null) |
848 | 848 | { |
849 | - if ((string)$iterator === '0') { |
|
849 | + if ((string) $iterator === '0') { |
|
850 | 850 | return null; |
851 | 851 | } |
852 | 852 | $this->init(); |
@@ -929,10 +929,10 @@ discard block |
||
929 | 929 | */ |
930 | 930 | private function prepareKeyValue(array $dictionary, string $command): array |
931 | 931 | { |
932 | - $keys = array_values(array_filter($dictionary, function ($key) { |
|
932 | + $keys = array_values(array_filter($dictionary, function($key) { |
|
933 | 933 | return $key % 2 == 0; |
934 | 934 | }, ARRAY_FILTER_USE_KEY)); |
935 | - $values = array_values(array_filter($dictionary, function ($key) { |
|
935 | + $values = array_values(array_filter($dictionary, function($key) { |
|
936 | 936 | return $key % 2 == 1; |
937 | 937 | }, ARRAY_FILTER_USE_KEY)); |
938 | 938 |