Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Commit 7a17d35

Browse files
committed
wip formatting
1 parent 6755b42 commit 7a17d35

File tree

1 file changed

+19
-23
lines changed

1 file changed

+19
-23
lines changed

src/ChannelManagers/RedisChannelManager.php

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ public function getLocalChannels($appId): PromiseInterface
123123
*/
124124
public function getGlobalChannels($appId): PromiseInterface
125125
{
126-
return $this->getPublishClient()->smembers(
126+
return $this->publishClient->smembers(
127127
$this->getRedisKey($appId, null, ['channels'])
128128
);
129129
}
@@ -382,8 +382,7 @@ public function getChannelsMembersCount($appId, array $channelNames): PromiseInt
382382
);
383383
}
384384

385-
return $this->publishClient
386-
->exec()
385+
return $this->publishClient->exec()
387386
->then(function ($data) use ($channelNames) {
388387
return array_combine($channelNames, $data);
389388
});
@@ -553,11 +552,10 @@ public function decrementSubscriptionsCount($appId, string $channel = null, int
553552
*/
554553
public function addConnectionToSet(ConnectionInterface $connection, $moment = null)
555554
{
556-
$this->getPublishClient()
557-
->zadd(
558-
$this->getRedisKey(null, null, ['sockets']),
559-
Carbon::parse($moment)->format('U'), "{$connection->app->id}:{$connection->socketId}"
560-
);
555+
$this->publishClient->zadd(
556+
$this->getRedisKey(null, null, ['sockets']),
557+
Carbon::parse($moment)->format('U'), "{$connection->app->id}:{$connection->socketId}"
558+
);
561559
}
562560

563561
/**
@@ -568,11 +566,10 @@ public function addConnectionToSet(ConnectionInterface $connection, $moment = nu
568566
*/
569567
public function removeConnectionFromSet(ConnectionInterface $connection)
570568
{
571-
$this->getPublishClient()
572-
->zrem(
573-
$this->getRedisKey(null, null, ['sockets']),
574-
"{$connection->app->id}:{$connection->socketId}"
575-
);
569+
$this->publishClient->zrem(
570+
$this->getRedisKey(null, null, ['sockets']),
571+
"{$connection->app->id}:{$connection->socketId}"
572+
);
576573
}
577574

578575
/**
@@ -585,14 +582,13 @@ public function removeConnectionFromSet(ConnectionInterface $connection)
585582
*/
586583
public function getConnectionsFromSet(int $start = 0, int $stop = 0)
587584
{
588-
return $this->getPublishClient()
589-
->zrange(
590-
$this->getRedisKey(null, null, ['sockets']),
591-
$start, $stop, 'withscores'
592-
)
593-
->then(function ($list) {
594-
return Helpers::redisListToArray($list);
595-
});
585+
return $this->publishClient->zrange(
586+
$this->getRedisKey(null, null, ['sockets']),
587+
$start, $stop, 'withscores'
588+
)
589+
->then(function ($list) {
590+
return Helpers::redisListToArray($list);
591+
});
596592
}
597593

598594
/**
@@ -604,7 +600,7 @@ public function getConnectionsFromSet(int $start = 0, int $stop = 0)
604600
*/
605601
public function addChannelToSet($appId, string $channel)
606602
{
607-
return $this->getPublishClient()->sadd(
603+
return $this->publishClient->sadd(
608604
$this->getRedisKey($appId, null, ['channels']),
609605
$channel
610606
);
@@ -619,7 +615,7 @@ public function addChannelToSet($appId, string $channel)
619615
*/
620616
public function removeChannelFromSet($appId, string $channel)
621617
{
622-
return $this->getPublishClient()->srem(
618+
return $this->publishClient->srem(
623619
$this->getRedisKey($appId, null, ['channels']),
624620
$channel
625621
);

0 commit comments

Comments
 (0)