Code Duplication    Length = 11-12 lines in 2 locations

src/PubSub/Drivers/RedisClient.php 2 locations

@@ 218-229 (lines=12) @@
215
     * @param  string  $data
216
     * @return void
217
     */
218
    public function joinChannel($appId, string $channel, string $socketId, string $data)
219
    {
220
        $this->publishClient->hset($this->getTopicName($appId, $channel), $socketId, $data);
221
222
        DashboardLogger::log($appId, DashboardLogger::TYPE_REPLICATOR_JOINED_CHANNEL, [
223
            'channel' => $channel,
224
            'serverId' => $this->getServerId(),
225
            'socketId' => $socketId,
226
            'data' => $data,
227
            'pubsub' => $this->getTopicName($appId, $channel),
228
        ]);
229
    }
230
231
    /**
232
     * Remove a member from the channel. To be called when they have
@@ 240-250 (lines=11) @@
237
     * @param  string  $socketId
238
     * @return void
239
     */
240
    public function leaveChannel($appId, string $channel, string $socketId)
241
    {
242
        $this->publishClient->hdel($this->getTopicName($appId, $channel), $socketId);
243
244
        DashboardLogger::log($appId, DashboardLogger::TYPE_REPLICATOR_LEFT_CHANNEL, [
245
            'channel' => $channel,
246
            'serverId' => $this->getServerId(),
247
            'socketId' => $socketId,
248
            'pubsub' => $this->getTopicName($appId, $channel),
249
        ]);
250
    }
251
252
    /**
253
     * Retrieve the full information about the members in a presence channel.