diff --git a/src/Vluzrmos/Socketio/Broadcast.php b/src/Vluzrmos/Socketio/Broadcast.php index 8d2313d..e17f0df 100644 --- a/src/Vluzrmos/Socketio/Broadcast.php +++ b/src/Vluzrmos/Socketio/Broadcast.php @@ -3,7 +3,7 @@ namespace Vluzrmos\Socketio; use Illuminate\Contracts\Redis\Database as Redis; -class Broadcast { +class Broadcast implements Contracts\Broadcast{ /** * @var \Redis; @@ -18,10 +18,11 @@ public function __construct(Redis $redis){ } /** - * @param $channel - * @param $event - * @param $message - * @return int + * Publish a message to a channel + * @param String $channel Channel name + * @param String $event Event name + * @param String|Array|Serializable $message the message + * @return mixed */ public function publish($channel, $event, $message){ return $this->redis->publish($channel, json_encode([ diff --git a/src/Vluzrmos/Socketio/Contracts/Broadcast.php b/src/Vluzrmos/Socketio/Contracts/Broadcast.php new file mode 100644 index 0000000..e289be1 --- /dev/null +++ b/src/Vluzrmos/Socketio/Contracts/Broadcast.php @@ -0,0 +1,15 @@ +