@@ -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(); |
@@ -574,7 +574,7 @@ discard block |
||
| 574 | 574 | { |
| 575 | 575 | $fields = $this->prepareArguments('hdel', ...$fields); |
| 576 | 576 | $this->init(); |
| 577 | - return (int)$this->driver->hdel($key, ...$fields); |
|
| 577 | + return (int) $this->driver->hdel($key, ...$fields); |
|
| 578 | 578 | } |
| 579 | 579 | |
| 580 | 580 | /** |
@@ -584,7 +584,7 @@ discard block |
||
| 584 | 584 | public function hincrby(string $key, string $field, int $increment = 1): int |
| 585 | 585 | { |
| 586 | 586 | $this->init(); |
| 587 | - return (int)$this->driver->hincrby($key, $field, (int)$increment); |
|
| 587 | + return (int) $this->driver->hincrby($key, $field, (int) $increment); |
|
| 588 | 588 | } |
| 589 | 589 | |
| 590 | 590 | /** |
@@ -594,7 +594,7 @@ discard block |
||
| 594 | 594 | public function hincrbyfloat(string $key, string $field, float $increment = 1.0): float |
| 595 | 595 | { |
| 596 | 596 | $this->init(); |
| 597 | - return (float)$this->driver->hincrbyfloat($key, $field, $increment); |
|
| 597 | + return (float) $this->driver->hincrbyfloat($key, $field, $increment); |
|
| 598 | 598 | } |
| 599 | 599 | |
| 600 | 600 | /** |
@@ -645,7 +645,7 @@ discard block |
||
| 645 | 645 | */ |
| 646 | 646 | public function hscan(string $key, &$iterator, ?string $pattern = null, ?int $count = null) |
| 647 | 647 | { |
| 648 | - if ((string)$iterator === '0') { |
|
| 648 | + if ((string) $iterator === '0') { |
|
| 649 | 649 | return null; |
| 650 | 650 | } |
| 651 | 651 | $this->init(); |
@@ -670,7 +670,7 @@ discard block |
||
| 670 | 670 | { |
| 671 | 671 | $members = $this->prepareArguments('sadd', ...$members); |
| 672 | 672 | $this->init(); |
| 673 | - return (int)$this->driver->sadd($key, ...$members); |
|
| 673 | + return (int) $this->driver->sadd($key, ...$members); |
|
| 674 | 674 | } |
| 675 | 675 | |
| 676 | 676 | /** |
@@ -709,7 +709,7 @@ discard block |
||
| 709 | 709 | */ |
| 710 | 710 | public function sscan(string $key, &$iterator, string $pattern = null, int $count = null) |
| 711 | 711 | { |
| 712 | - if ((string)$iterator === '0') { |
|
| 712 | + if ((string) $iterator === '0') { |
|
| 713 | 713 | return null; |
| 714 | 714 | } |
| 715 | 715 | $this->init(); |
@@ -732,7 +732,7 @@ discard block |
||
| 732 | 732 | { |
| 733 | 733 | $elements = $this->prepareArguments('lpush', ...$elements); |
| 734 | 734 | $this->init(); |
| 735 | - return (int)$this->driver->lpush($key, ...$elements); |
|
| 735 | + return (int) $this->driver->lpush($key, ...$elements); |
|
| 736 | 736 | } |
| 737 | 737 | |
| 738 | 738 | /** |
@@ -748,7 +748,7 @@ discard block |
||
| 748 | 748 | { |
| 749 | 749 | $elements = $this->prepareArguments('rpush', ...$elements); |
| 750 | 750 | $this->init(); |
| 751 | - return (int)$this->driver->rpush($key, ...$elements); |
|
| 751 | + return (int) $this->driver->rpush($key, ...$elements); |
|
| 752 | 752 | } |
| 753 | 753 | |
| 754 | 754 | /** |
@@ -807,7 +807,7 @@ discard block |
||
| 807 | 807 | } |
| 808 | 808 | return $return; |
| 809 | 809 | } |
| 810 | - return (int)$this->driver->zadd($key, ...$dictionary); |
|
| 810 | + return (int) $this->driver->zadd($key, ...$dictionary); |
|
| 811 | 811 | } |
| 812 | 812 | |
| 813 | 813 | /** |
@@ -820,7 +820,7 @@ discard block |
||
| 820 | 820 | public function zrem(string $key, ...$members): int |
| 821 | 821 | { |
| 822 | 822 | $members = $this->prepareArguments('zrem', ...$members); |
| 823 | - return (int)$this->driver->zrem($key, ...$members); |
|
| 823 | + return (int) $this->driver->zrem($key, ...$members); |
|
| 824 | 824 | } |
| 825 | 825 | |
| 826 | 826 | /** |
@@ -847,7 +847,7 @@ discard block |
||
| 847 | 847 | */ |
| 848 | 848 | public function zscan(string $key, &$iterator, ?string $pattern = null, ?int $count = null) |
| 849 | 849 | { |
| 850 | - if ((string)$iterator === '0') { |
|
| 850 | + if ((string) $iterator === '0') { |
|
| 851 | 851 | return null; |
| 852 | 852 | } |
| 853 | 853 | $this->init(); |
@@ -930,10 +930,10 @@ discard block |
||
| 930 | 930 | */ |
| 931 | 931 | private function prepareKeyValue(array $dictionary, string $command): array |
| 932 | 932 | { |
| 933 | - $keys = array_values(array_filter($dictionary, function ($key) { |
|
| 933 | + $keys = array_values(array_filter($dictionary, function($key) { |
|
| 934 | 934 | return $key % 2 == 0; |
| 935 | 935 | }, ARRAY_FILTER_USE_KEY)); |
| 936 | - $values = array_values(array_filter($dictionary, function ($key) { |
|
| 936 | + $values = array_values(array_filter($dictionary, function($key) { |
|
| 937 | 937 | return $key % 2 == 1; |
| 938 | 938 | }, ARRAY_FILTER_USE_KEY)); |
| 939 | 939 | |