Skip to content

Commit

Permalink
Fix toMap calls
Browse files Browse the repository at this point in the history
  • Loading branch information
kelunik committed Aug 20, 2023
1 parent 758d594 commit 3838a6d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/Command/RedisCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Amp\Redis\Protocol\QueryException;
use Amp\Redis\RedisClient;
use function Amp\Redis\Internal;
use function Amp\Redis\Internal\toMap;

final class RedisCommands
{
Expand Down Expand Up @@ -501,7 +502,7 @@ public function getActiveChannels(?string $pattern = null): array
*/
public function getNumberOfSubscriptions(string ...$channels): array
{
return Internal\toMap($this->client->execute('pubsub', 'numsub', ...$channels));
return toMap($this->client->execute('pubsub', 'numsub', ...$channels));
}

/**
Expand Down
3 changes: 2 additions & 1 deletion src/Command/RedisMap.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Amp\ForbidCloning;
use Amp\ForbidSerialization;
use Amp\Redis\RedisClient;
use function Amp\Redis\Internal\toMap;

final class RedisMap
{
Expand Down Expand Up @@ -72,7 +73,7 @@ public function getSize(): int
*/
public function getAll(): array
{
return Internal\toMap($this->client->execute('hgetall', $this->key));
return toMap($this->client->execute('hgetall', $this->key));
}

/**
Expand Down
5 changes: 3 additions & 2 deletions src/Command/RedisSortedSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Amp\ForbidCloning;
use Amp\ForbidSerialization;
use Amp\Redis\RedisClient;
use function Amp\Redis\Internal\toMap;

final class RedisSortedSet
{
Expand Down Expand Up @@ -52,7 +53,7 @@ public function getRange(int $start, int $end, ?RangeOptions $options = null): a
public function getRangeWithScores(int $start, int $end, ?RangeOptions $options = null): array
{
$options ??= new RangeOptions();
return \array_map(\floatval(...), Internal\toMap($this->client->execute(
return \array_map(\floatval(...), toMap($this->client->execute(
'zrange',
$this->key,
$start,
Expand Down Expand Up @@ -84,7 +85,7 @@ public function getRangeByScore(ScoreBoundary $min, ScoreBoundary $max, ?RangeOp
public function getRangeByScoreWithScores(ScoreBoundary $min, ScoreBoundary $max, ?RangeOptions $options = null): array
{
$options ??= new RangeOptions();
return \array_map(\floatval(...), Internal\toMap($this->client->execute(
return \array_map(\floatval(...), toMap($this->client->execute(
'zrange',
$this->key,
$min->toQuery(),
Expand Down

0 comments on commit 3838a6d

Please sign in to comment.