@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | /** |
| 21 | 21 | * Construct |
| 22 | 22 | * |
| 23 | - * @param WebSocket\Client $websocket |
|
| 23 | + * @param Client $websocket |
|
| 24 | 24 | */ |
| 25 | 25 | public function __construct(Client $websocket) |
| 26 | 26 | { |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | * @param mixed $data |
| 45 | 45 | * @param Closure|null $callback |
| 46 | 46 | * |
| 47 | - * @return void |
|
| 47 | + * @return boolean |
|
| 48 | 48 | */ |
| 49 | 49 | public function publish($channel, $data, Closure $callback = null) |
| 50 | 50 | { |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | * @param array $data |
| 64 | 64 | * @param Closure|null $callback |
| 65 | 65 | * |
| 66 | - * @return void |
|
| 66 | + * @return boolean |
|
| 67 | 67 | */ |
| 68 | 68 | public function emit($event, array $data, Closure $callback = null) |
| 69 | 69 | { |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | /** |
| 101 | 101 | * Get Error |
| 102 | 102 | * |
| 103 | - * @return string|null |
|
| 103 | + * @return string |
|
| 104 | 104 | */ |
| 105 | 105 | public function error() |
| 106 | 106 | { |
@@ -33,19 +33,19 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | protected function registerSocketCluster() |
| 35 | 35 | { |
| 36 | - $this->app->singleton('SocketCluster', function ($app) { |
|
| 36 | + $this->app->singleton('SocketCluster', function($app) { |
|
| 37 | 37 | $config = $app['config']['broadcasting']['connections']['socketcluster']; |
| 38 | 38 | |
| 39 | 39 | if (empty($config['uri'])) { |
| 40 | - $scheme = $config['secure']==true ? 'wss' : 'ws'; |
|
| 40 | + $scheme = $config['secure'] == true ? 'wss' : 'ws'; |
|
| 41 | 41 | $host = trim($config['host'], "/"); |
| 42 | 42 | $port = !empty($config['port']) ? ":".$config['port'] : ''; |
| 43 | 43 | $path = trim($config['path'], "/"); |
| 44 | - $path = !empty($path) ? $path . "/" : ''; |
|
| 44 | + $path = !empty($path) ? $path."/" : ''; |
|
| 45 | 45 | $config['uri'] = sprintf("%s://%s%s/%s", $scheme, $host, $port, $path); |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | - $websocket = new WebSocketClient($config['uri']); |
|
| 48 | + $websocket = new WebSocketClient($config['uri']); |
|
| 49 | 49 | return new SocketCluster($websocket); |
| 50 | 50 | }); |
| 51 | 51 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | { |
| 62 | 62 | $this->app |
| 63 | 63 | ->make(BroadcastManager::class) |
| 64 | - ->extend('socketcluster', function ($app) { |
|
| 64 | + ->extend('socketcluster', function($app) { |
|
| 65 | 65 | return new SCBroadcaster($app['SocketCluster']); |
| 66 | 66 | }); |
| 67 | 67 | } |