@@ -211,7 +211,7 @@ discard block |
||
| 211 | 211 | } |
| 212 | 212 | $this->database = $database; |
| 213 | 213 | $this->selectedDatabase = $database; |
| 214 | - return (bool)$result; |
|
| 214 | + return (bool) $result; |
|
| 215 | 215 | } |
| 216 | 216 | |
| 217 | 217 | /** |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | { |
| 246 | 246 | $this->init(); |
| 247 | 247 | $result = $this->driver->exists($key); |
| 248 | - return (bool)$result; |
|
| 248 | + return (bool) $result; |
|
| 249 | 249 | } |
| 250 | 250 | |
| 251 | 251 | /** |
@@ -297,7 +297,7 @@ discard block |
||
| 297 | 297 | { |
| 298 | 298 | $this->init(); |
| 299 | 299 | $result = $this->driver->expire($key, $seconds); |
| 300 | - return (bool)$result; |
|
| 300 | + return (bool) $result; |
|
| 301 | 301 | } |
| 302 | 302 | |
| 303 | 303 | /** |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | { |
| 312 | 312 | $this->init(); |
| 313 | 313 | $result = $this->driver->pexpire($key, $milliseconds); |
| 314 | - return (bool)$result; |
|
| 314 | + return (bool) $result; |
|
| 315 | 315 | } |
| 316 | 316 | |
| 317 | 317 | /** |
@@ -325,7 +325,7 @@ discard block |
||
| 325 | 325 | { |
| 326 | 326 | $this->init(); |
| 327 | 327 | $result = $this->driver->expireat($key, $timestamp); |
| 328 | - return (bool)$result; |
|
| 328 | + return (bool) $result; |
|
| 329 | 329 | } |
| 330 | 330 | |
| 331 | 331 | /** |
@@ -339,7 +339,7 @@ discard block |
||
| 339 | 339 | { |
| 340 | 340 | $this->init(); |
| 341 | 341 | $result = $this->driver->pexpireat($key, $millisecondsTimestamp); |
| 342 | - return (bool)$result; |
|
| 342 | + return (bool) $result; |
|
| 343 | 343 | } |
| 344 | 344 | |
| 345 | 345 | /** |
@@ -370,7 +370,7 @@ discard block |
||
| 370 | 370 | { |
| 371 | 371 | $this->init(); |
| 372 | 372 | $result = $this->driver->persist($key); |
| 373 | - return (bool)$result; |
|
| 373 | + return (bool) $result; |
|
| 374 | 374 | } |
| 375 | 375 | |
| 376 | 376 | /** |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | { |
| 385 | 385 | $this->init(); |
| 386 | 386 | $result = $this->driver->setnx($key, $value); |
| 387 | - return (bool)$result; |
|
| 387 | + return (bool) $result; |
|
| 388 | 388 | } |
| 389 | 389 | |
| 390 | 390 | /** |
@@ -433,7 +433,7 @@ discard block |
||
| 433 | 433 | public function incrby(string $key, int $increment = 1): int |
| 434 | 434 | { |
| 435 | 435 | $this->init(); |
| 436 | - return $this->driver->incrby($key, (int)$increment); |
|
| 436 | + return $this->driver->incrby($key, (int) $increment); |
|
| 437 | 437 | } |
| 438 | 438 | |
| 439 | 439 | /** |
@@ -446,7 +446,7 @@ discard block |
||
| 446 | 446 | public function incrbyfloat(string $key, float $increment = 1.0): float |
| 447 | 447 | { |
| 448 | 448 | $this->init(); |
| 449 | - return (float)$this->driver->incrbyfloat($key, $increment); |
|
| 449 | + return (float) $this->driver->incrbyfloat($key, $increment); |
|
| 450 | 450 | } |
| 451 | 451 | |
| 452 | 452 | /** |
@@ -471,7 +471,7 @@ discard block |
||
| 471 | 471 | public function decrby(string $key, int $decrement = 1): int |
| 472 | 472 | { |
| 473 | 473 | $this->init(); |
| 474 | - return $this->driver->decrby($key, (int)$decrement); |
|
| 474 | + return $this->driver->decrby($key, (int) $decrement); |
|
| 475 | 475 | } |
| 476 | 476 | |
| 477 | 477 | /** |
@@ -544,7 +544,7 @@ discard block |
||
| 544 | 544 | */ |
| 545 | 545 | public function scan(&$iterator, ?string $pattern = null, ?int $count = null) |
| 546 | 546 | { |
| 547 | - if ((string)$iterator === '0') { |
|
| 547 | + if ((string) $iterator === '0') { |
|
| 548 | 548 | return null; |
| 549 | 549 | } |
| 550 | 550 | $this->init(); |
@@ -583,7 +583,7 @@ discard block |
||
| 583 | 583 | { |
| 584 | 584 | $fields = $this->prepareArguments('hdel', ...$fields); |
| 585 | 585 | $this->init(); |
| 586 | - return (int)$this->driver->hdel($key, ...$fields); |
|
| 586 | + return (int) $this->driver->hdel($key, ...$fields); |
|
| 587 | 587 | } |
| 588 | 588 | |
| 589 | 589 | /** |
@@ -593,7 +593,7 @@ discard block |
||
| 593 | 593 | public function hincrby(string $key, string $field, int $increment = 1): int |
| 594 | 594 | { |
| 595 | 595 | $this->init(); |
| 596 | - return (int)$this->driver->hincrby($key, $field, (int)$increment); |
|
| 596 | + return (int) $this->driver->hincrby($key, $field, (int) $increment); |
|
| 597 | 597 | } |
| 598 | 598 | |
| 599 | 599 | /** |
@@ -603,7 +603,7 @@ discard block |
||
| 603 | 603 | public function hincrbyfloat(string $key, string $field, float $increment = 1.0): float |
| 604 | 604 | { |
| 605 | 605 | $this->init(); |
| 606 | - return (float)$this->driver->hincrbyfloat($key, $field, $increment); |
|
| 606 | + return (float) $this->driver->hincrbyfloat($key, $field, $increment); |
|
| 607 | 607 | } |
| 608 | 608 | |
| 609 | 609 | /** |
@@ -654,7 +654,7 @@ discard block |
||
| 654 | 654 | */ |
| 655 | 655 | public function hscan(string $key, &$iterator, ?string $pattern = null, int $count = 0) |
| 656 | 656 | { |
| 657 | - if ((string)$iterator === '0') { |
|
| 657 | + if ((string) $iterator === '0') { |
|
| 658 | 658 | return null; |
| 659 | 659 | } |
| 660 | 660 | $this->init(); |
@@ -682,7 +682,7 @@ discard block |
||
| 682 | 682 | { |
| 683 | 683 | $members = $this->prepareArguments('sadd', ...$members); |
| 684 | 684 | $this->init(); |
| 685 | - return (int)$this->driver->sadd($key, ...$members); |
|
| 685 | + return (int) $this->driver->sadd($key, ...$members); |
|
| 686 | 686 | } |
| 687 | 687 | |
| 688 | 688 | /** |
@@ -721,7 +721,7 @@ discard block |
||
| 721 | 721 | */ |
| 722 | 722 | public function sscan(string $key, &$iterator, string $pattern = null, int $count = null) |
| 723 | 723 | { |
| 724 | - if ((string)$iterator === '0') { |
|
| 724 | + if ((string) $iterator === '0') { |
|
| 725 | 725 | return null; |
| 726 | 726 | } |
| 727 | 727 | $this->init(); |
@@ -747,7 +747,7 @@ discard block |
||
| 747 | 747 | { |
| 748 | 748 | $elements = $this->prepareArguments('lpush', ...$elements); |
| 749 | 749 | $this->init(); |
| 750 | - return (int)$this->driver->lpush($key, ...$elements); |
|
| 750 | + return (int) $this->driver->lpush($key, ...$elements); |
|
| 751 | 751 | } |
| 752 | 752 | |
| 753 | 753 | /** |
@@ -763,7 +763,7 @@ discard block |
||
| 763 | 763 | { |
| 764 | 764 | $elements = $this->prepareArguments('rpush', ...$elements); |
| 765 | 765 | $this->init(); |
| 766 | - return (int)$this->driver->rpush($key, ...$elements); |
|
| 766 | + return (int) $this->driver->rpush($key, ...$elements); |
|
| 767 | 767 | } |
| 768 | 768 | |
| 769 | 769 | /** |
@@ -822,7 +822,7 @@ discard block |
||
| 822 | 822 | } |
| 823 | 823 | return $return; |
| 824 | 824 | } |
| 825 | - return (int)$this->driver->zadd($key, ...$dictionary); |
|
| 825 | + return (int) $this->driver->zadd($key, ...$dictionary); |
|
| 826 | 826 | } |
| 827 | 827 | |
| 828 | 828 | /** |
@@ -835,7 +835,7 @@ discard block |
||
| 835 | 835 | public function zrem(string $key, ...$members): int |
| 836 | 836 | { |
| 837 | 837 | $members = $this->prepareArguments('zrem', ...$members); |
| 838 | - return (int)$this->driver->zrem($key, ...$members); |
|
| 838 | + return (int) $this->driver->zrem($key, ...$members); |
|
| 839 | 839 | } |
| 840 | 840 | |
| 841 | 841 | /** |
@@ -862,7 +862,7 @@ discard block |
||
| 862 | 862 | */ |
| 863 | 863 | public function zscan(string $key, &$iterator, ?string $pattern = null, ?int $count = null) |
| 864 | 864 | { |
| 865 | - if ((string)$iterator === '0') { |
|
| 865 | + if ((string) $iterator === '0') { |
|
| 866 | 866 | return null; |
| 867 | 867 | } |
| 868 | 868 | $this->init(); |
@@ -948,10 +948,10 @@ discard block |
||
| 948 | 948 | */ |
| 949 | 949 | private function prepareKeyValue(array $dictionary, string $command): array |
| 950 | 950 | { |
| 951 | - $keys = array_values(array_filter($dictionary, function ($key) { |
|
| 951 | + $keys = array_values(array_filter($dictionary, function($key) { |
|
| 952 | 952 | return $key % 2 == 0; |
| 953 | 953 | }, ARRAY_FILTER_USE_KEY)); |
| 954 | - $values = array_values(array_filter($dictionary, function ($key) { |
|
| 954 | + $values = array_values(array_filter($dictionary, function($key) { |
|
| 955 | 955 | return $key % 2 == 1; |
| 956 | 956 | }, ARRAY_FILTER_USE_KEY)); |
| 957 | 957 | |