diff --git a/src/Nikapps/OrtcLaravel/Broadcasters/OrtcBroadcaster.php b/src/Broadcasters/OrtcBroadcaster.php similarity index 93% rename from src/Nikapps/OrtcLaravel/Broadcasters/OrtcBroadcaster.php rename to src/Broadcasters/OrtcBroadcaster.php index aa81218..473c184 100644 --- a/src/Nikapps/OrtcLaravel/Broadcasters/OrtcBroadcaster.php +++ b/src/Broadcasters/OrtcBroadcaster.php @@ -17,8 +17,7 @@ class OrtcBroadcaster implements Broadcaster /** * Create a new broadcaster instance. * - * @param Ortc $ortc - * @return void + * @param Ortc $ortc */ public function __construct(Ortc $ortc) { diff --git a/src/Nikapps/OrtcLaravel/Facades/Ortc.php b/src/Facades/Ortc.php similarity index 100% rename from src/Nikapps/OrtcLaravel/Facades/Ortc.php rename to src/Facades/Ortc.php diff --git a/src/Nikapps/OrtcLaravel/OrtcLaravelFactory.php b/src/OrtcLaravelFactory.php similarity index 96% rename from src/Nikapps/OrtcLaravel/OrtcLaravelFactory.php rename to src/OrtcLaravelFactory.php index bb64ade..e67f168 100644 --- a/src/Nikapps/OrtcLaravel/OrtcLaravelFactory.php +++ b/src/OrtcLaravelFactory.php @@ -17,8 +17,7 @@ class OrtcLaravelFactory /** * constructor - * - * @param ConfigRepository $config + * @param array $config */ public function __construct(array $config) { @@ -35,6 +34,7 @@ public function getOrtcConfig() /** * create OrtcConfig from laravel config + * @param array $config */ protected function createOrtcConfig(array $config) { @@ -168,17 +168,17 @@ public function send( * @param string $event * @param array $payload * @throws \Nikapps\OrtcPhp\Exceptions\BatchRequestException - * @return array \Nikapps\OrtcPhp\Models\Responses\SendMessageResponse + * @return \Nikapps\OrtcPhp\Models\Responses\SendMessageResponse[] */ public function trigger($channels, $event, array $payload = []) { - $message_arr = array( + $message_arr = [ 'event' => $event, 'payload' => $payload - ); + ]; $message = json_encode($message_arr); - $responses = array(); + $responses = []; foreach ($channels as $channel) { $responses[] = $this->send($channel, '', $message); diff --git a/src/Nikapps/OrtcLaravel/OrtcLaravelServiceProvider.php b/src/OrtcLaravelServiceProvider.php similarity index 78% rename from src/Nikapps/OrtcLaravel/OrtcLaravelServiceProvider.php rename to src/OrtcLaravelServiceProvider.php index 752997b..ca2d84e 100644 --- a/src/Nikapps/OrtcLaravel/OrtcLaravelServiceProvider.php +++ b/src/OrtcLaravelServiceProvider.php @@ -1,4 +1,4 @@ -app->make('Illuminate\Broadcasting\BroadcastManager')->extend( - 'realtime', function ($app, $config) { - - return new OrtcBroadcaster($app->make('Ortc')); - }); + $this->app + ->make('Illuminate\Broadcasting\BroadcastManager') + ->extend('realtime', function ($app) { + return new OrtcBroadcaster($app->make('Ortc')); + }); } - + /** * Register the service provider. * diff --git a/src/config/.gitkeep b/src/config/.gitkeep deleted file mode 100644 index e69de29..0000000