22
33namespace BeyondCode \LaravelWebSockets ;
44
5- use BeyondCode \LaravelWebSockets \PubSub \Broadcasters \RedisPusherBroadcaster ;
6- use BeyondCode \LaravelWebSockets \PubSub \Drivers \EmptyClient ;
7- use BeyondCode \LaravelWebSockets \PubSub \Drivers \RedisClient ;
8- use BeyondCode \LaravelWebSockets \PubSub \ReplicationInterface ;
95use Pusher \Pusher ;
106use Psr \Log \LoggerInterface ;
117use Illuminate \Support \Facades \Gate ;
1410use Illuminate \Broadcasting \BroadcastManager ;
1511use BeyondCode \LaravelWebSockets \Server \Router ;
1612use BeyondCode \LaravelWebSockets \Apps \AppProvider ;
13+ use BeyondCode \LaravelWebSockets \PubSub \Drivers \EmptyClient ;
14+ use BeyondCode \LaravelWebSockets \PubSub \Drivers \RedisClient ;
15+ use BeyondCode \LaravelWebSockets \PubSub \ReplicationInterface ;
1716use BeyondCode \LaravelWebSockets \WebSockets \Channels \ChannelManager ;
1817use BeyondCode \LaravelWebSockets \Dashboard \Http \Controllers \SendMessage ;
1918use BeyondCode \LaravelWebSockets \Dashboard \Http \Controllers \ShowDashboard ;
19+ use BeyondCode \LaravelWebSockets \PubSub \Broadcasters \RedisPusherBroadcaster ;
2020use BeyondCode \LaravelWebSockets \Dashboard \Http \Controllers \AuthenticateDashboard ;
2121use BeyondCode \LaravelWebSockets \Dashboard \Http \Controllers \DashboardApiController ;
2222use BeyondCode \LaravelWebSockets \WebSockets \Channels \ChannelManagers \ArrayChannelManager ;
@@ -29,36 +29,36 @@ class WebSocketsServiceProvider extends ServiceProvider
2929 public function boot ()
3030 {
3131 $ this ->publishes ([
32- __DIR__ . '/../config/websockets.php ' => base_path ('config/websockets.php ' ),
32+ __DIR__ . '/../config/websockets.php ' => base_path ('config/websockets.php ' ),
3333 ], 'config ' );
3434
35- if (!class_exists ('CreateWebSocketsStatisticsEntries ' )) {
35+ if (! class_exists ('CreateWebSocketsStatisticsEntries ' )) {
3636 $ this ->publishes ([
37- __DIR__ . '/../database/migrations/create_websockets_statistics_entries_table.php.stub ' => database_path ('migrations/ ' . date ('Y_m_d_His ' , time ()) . '_create_websockets_statistics_entries_table.php ' ),
37+ __DIR__ . '/../database/migrations/create_websockets_statistics_entries_table.php.stub ' => database_path ('migrations/ ' . date ('Y_m_d_His ' , time ()). '_create_websockets_statistics_entries_table.php ' ),
3838 ], 'migrations ' );
3939 }
4040
4141 $ this
4242 ->registerRoutes ()
4343 ->registerDashboardGate ();
4444
45- $ this ->loadViewsFrom (__DIR__ . '/../resources/views/ ' , 'websockets ' );
45+ $ this ->loadViewsFrom (__DIR__ . '/../resources/views/ ' , 'websockets ' );
4646
4747 $ this ->commands ([
4848 Console \StartWebSocketServer::class,
4949 Console \CleanStatistics::class,
5050 ]);
5151
5252 $ this ->configurePubSub ();
53-
5453 }
5554
5655 protected function configurePubSub ()
5756 {
5857 if (config ('websockets.replication.enabled ' ) !== true || config ('websockets.replication.driver ' ) !== 'redis ' ) {
5958 $ this ->app ->singleton (ReplicationInterface::class, function () {
60- return ( new EmptyClient () );
59+ return new EmptyClient ();
6160 });
61+
6262 return ;
6363 }
6464
@@ -87,7 +87,7 @@ protected function configurePubSub()
8787
8888 public function register ()
8989 {
90- $ this ->mergeConfigFrom (__DIR__ . '/../config/websockets.php ' , 'websockets ' );
90+ $ this ->mergeConfigFrom (__DIR__ . '/../config/websockets.php ' , 'websockets ' );
9191
9292 $ this ->app ->singleton ('websockets.router ' , function () {
9393 return new Router ();
0 commit comments