From 60c21f3f7bf76310664d84bd63b34b4c6c0f502d Mon Sep 17 00:00:00 2001 From: rennokki Date: Sat, 19 Sep 2020 11:16:46 +0000 Subject: [PATCH] Apply fixes from StyleCI (#543) --- src/ChannelManagers/LocalChannelManager.php | 1 - src/ChannelManagers/RedisChannelManager.php | 2 +- src/Channels/PresenceChannel.php | 2 +- src/Statistics/Collectors/MemoryCollector.php | 1 - 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ChannelManagers/LocalChannelManager.php b/src/ChannelManagers/LocalChannelManager.php index d782fc7..4d4c835 100644 --- a/src/ChannelManagers/LocalChannelManager.php +++ b/src/ChannelManagers/LocalChannelManager.php @@ -10,7 +10,6 @@ use BeyondCode\LaravelWebSockets\Helpers; use Illuminate\Support\Str; use Ratchet\ConnectionInterface; use React\EventLoop\LoopInterface; -use React\Promise\FulfilledPromise; use React\Promise\PromiseInterface; use stdClass; diff --git a/src/ChannelManagers/RedisChannelManager.php b/src/ChannelManagers/RedisChannelManager.php index 6b02436..58ae6d4 100644 --- a/src/ChannelManagers/RedisChannelManager.php +++ b/src/ChannelManagers/RedisChannelManager.php @@ -202,7 +202,7 @@ class RedisChannelManager extends LocalChannelManager ->then(function () use ($connection, $channelName) { return $this->removeChannelFromSet($connection->app->id, $channelName); }) - ->then(function () use($connection) { + ->then(function () use ($connection) { return $this->removeConnectionFromSet($connection); }) ->then(function () use ($connection, $channelName, $payload) { diff --git a/src/Channels/PresenceChannel.php b/src/Channels/PresenceChannel.php index c265f81..3191be4 100644 --- a/src/Channels/PresenceChannel.php +++ b/src/Channels/PresenceChannel.php @@ -28,7 +28,7 @@ class PresenceChannel extends PrivateChannel $this->channelManager ->userJoinedPresenceChannel($connection, $user, $this->getName(), $payload) - ->then(function () use ($connection, $user) { + ->then(function () use ($connection) { $this->channelManager ->getChannelMembers($connection->app->id, $this->getName()) ->then(function ($users) use ($connection) { diff --git a/src/Statistics/Collectors/MemoryCollector.php b/src/Statistics/Collectors/MemoryCollector.php index 23f52cd..2bb2630 100644 --- a/src/Statistics/Collectors/MemoryCollector.php +++ b/src/Statistics/Collectors/MemoryCollector.php @@ -7,7 +7,6 @@ use BeyondCode\LaravelWebSockets\Contracts\StatisticsCollector; use BeyondCode\LaravelWebSockets\Facades\StatisticsStore; use BeyondCode\LaravelWebSockets\Helpers; use BeyondCode\LaravelWebSockets\Statistics\Statistic; -use React\Promise\FulfilledPromise; use React\Promise\PromiseInterface; class MemoryCollector implements StatisticsCollector