Merge pull request #1 from deviouspk/analysis-z3nD5L
Apply fixes from StyleCI
This commit is contained in:
parent
d43ac821d9
commit
11e1f89b5e
|
|
@ -116,6 +116,7 @@ class StartWebSocketServer extends Command
|
||||||
protected function registerCustomRoutes()
|
protected function registerCustomRoutes()
|
||||||
{
|
{
|
||||||
WebSocketsRouter::customRoutes();
|
WebSocketsRouter::customRoutes();
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ use BeyondCode\LaravelWebSockets\PubSub\ReplicationInterface;
|
||||||
|
|
||||||
class EmptyClient implements ReplicationInterface
|
class EmptyClient implements ReplicationInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Boot the pub/sub provider (open connections, initial subscriptions, etc).
|
* Boot the pub/sub provider (open connections, initial subscriptions, etc).
|
||||||
*
|
*
|
||||||
|
|
@ -70,7 +69,6 @@ class EmptyClient implements ReplicationInterface
|
||||||
*/
|
*/
|
||||||
public function joinChannel(string $appId, string $channel, string $socketId, string $data)
|
public function joinChannel(string $appId, string $channel, string $socketId, string $data)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -83,7 +81,6 @@ class EmptyClient implements ReplicationInterface
|
||||||
*/
|
*/
|
||||||
public function leaveChannel(string $appId, string $channel, string $socketId)
|
public function leaveChannel(string $appId, string $channel, string $socketId)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,6 @@
|
||||||
|
|
||||||
namespace BeyondCode\LaravelWebSockets;
|
namespace BeyondCode\LaravelWebSockets;
|
||||||
|
|
||||||
use BeyondCode\LaravelWebSockets\PubSub\Broadcasters\RedisPusherBroadcaster;
|
|
||||||
use BeyondCode\LaravelWebSockets\PubSub\Drivers\EmptyClient;
|
|
||||||
use BeyondCode\LaravelWebSockets\PubSub\Drivers\RedisClient;
|
|
||||||
use BeyondCode\LaravelWebSockets\PubSub\ReplicationInterface;
|
|
||||||
use Pusher\Pusher;
|
use Pusher\Pusher;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
use Illuminate\Support\Facades\Gate;
|
use Illuminate\Support\Facades\Gate;
|
||||||
|
|
@ -14,9 +10,13 @@ use Illuminate\Support\ServiceProvider;
|
||||||
use Illuminate\Broadcasting\BroadcastManager;
|
use Illuminate\Broadcasting\BroadcastManager;
|
||||||
use BeyondCode\LaravelWebSockets\Server\Router;
|
use BeyondCode\LaravelWebSockets\Server\Router;
|
||||||
use BeyondCode\LaravelWebSockets\Apps\AppProvider;
|
use BeyondCode\LaravelWebSockets\Apps\AppProvider;
|
||||||
|
use BeyondCode\LaravelWebSockets\PubSub\Drivers\EmptyClient;
|
||||||
|
use BeyondCode\LaravelWebSockets\PubSub\Drivers\RedisClient;
|
||||||
|
use BeyondCode\LaravelWebSockets\PubSub\ReplicationInterface;
|
||||||
use BeyondCode\LaravelWebSockets\WebSockets\Channels\ChannelManager;
|
use BeyondCode\LaravelWebSockets\WebSockets\Channels\ChannelManager;
|
||||||
use BeyondCode\LaravelWebSockets\Dashboard\Http\Controllers\SendMessage;
|
use BeyondCode\LaravelWebSockets\Dashboard\Http\Controllers\SendMessage;
|
||||||
use BeyondCode\LaravelWebSockets\Dashboard\Http\Controllers\ShowDashboard;
|
use BeyondCode\LaravelWebSockets\Dashboard\Http\Controllers\ShowDashboard;
|
||||||
|
use BeyondCode\LaravelWebSockets\PubSub\Broadcasters\RedisPusherBroadcaster;
|
||||||
use BeyondCode\LaravelWebSockets\Dashboard\Http\Controllers\AuthenticateDashboard;
|
use BeyondCode\LaravelWebSockets\Dashboard\Http\Controllers\AuthenticateDashboard;
|
||||||
use BeyondCode\LaravelWebSockets\Dashboard\Http\Controllers\DashboardApiController;
|
use BeyondCode\LaravelWebSockets\Dashboard\Http\Controllers\DashboardApiController;
|
||||||
use BeyondCode\LaravelWebSockets\WebSockets\Channels\ChannelManagers\ArrayChannelManager;
|
use BeyondCode\LaravelWebSockets\WebSockets\Channels\ChannelManagers\ArrayChannelManager;
|
||||||
|
|
@ -50,15 +50,15 @@ class WebSocketsServiceProvider extends ServiceProvider
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$this->configurePubSub();
|
$this->configurePubSub();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function configurePubSub()
|
protected function configurePubSub()
|
||||||
{
|
{
|
||||||
if (config('websockets.replication.enabled') !== true || config('websockets.replication.driver') !== 'redis') {
|
if (config('websockets.replication.enabled') !== true || config('websockets.replication.driver') !== 'redis') {
|
||||||
$this->app->singleton(ReplicationInterface::class, function () {
|
$this->app->singleton(ReplicationInterface::class, function () {
|
||||||
return (new EmptyClient());
|
return new EmptyClient();
|
||||||
});
|
});
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
namespace BeyondCode\LaravelWebSockets\Tests;
|
namespace BeyondCode\LaravelWebSockets\Tests;
|
||||||
|
|
||||||
use BeyondCode\LaravelWebSockets\Tests\Mocks\FakeReplicationClient;
|
|
||||||
use Illuminate\Support\Facades\Config;
|
|
||||||
use React\EventLoop\Factory;
|
use React\EventLoop\Factory;
|
||||||
|
use Illuminate\Support\Facades\Config;
|
||||||
use BeyondCode\LaravelWebSockets\PubSub\ReplicationInterface;
|
use BeyondCode\LaravelWebSockets\PubSub\ReplicationInterface;
|
||||||
|
use BeyondCode\LaravelWebSockets\Tests\Mocks\FakeReplicationClient;
|
||||||
|
|
||||||
trait TestsReplication
|
trait TestsReplication
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue