From 7bdea06fd8ca583ac122bf25361550c6a6bbd196 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Fri, 26 Aug 2022 10:57:39 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/API/Controller.php | 2 ++ src/API/TriggerEvent.php | 2 +- src/ChannelManagers/RedisChannelManager.php | 2 +- src/Channels/Channel.php | 2 ++ src/Channels/PresenceChannel.php | 2 ++ src/Channels/PrivateChannel.php | 2 ++ src/Server/Exceptions/ConnectionsOverCapacity.php | 1 + src/Server/Exceptions/InvalidSignature.php | 1 + src/Server/Messages/PusherChannelProtocolMessage.php | 2 ++ src/Statistics/Statistic.php | 2 +- 10 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/API/Controller.php b/src/API/Controller.php index 079637afd9..965b16d993 100644 --- a/src/API/Controller.php +++ b/src/API/Controller.php @@ -222,6 +222,7 @@ protected function sendAndClose(ConnectionInterface $connection, $response) * * @param mixed $appId * @return $this + * * @throws \Symfony\Component\HttpKernel\Exception\HttpException */ public function ensureValidAppId($appId) @@ -239,6 +240,7 @@ public function ensureValidAppId($appId) * * @param \GuzzleHttp\Psr7\ServerRequest $request * @return $this + * * @throws \Symfony\Component\HttpKernel\Exception\HttpException */ protected function ensureValidSignature(Request $request) diff --git a/src/API/TriggerEvent.php b/src/API/TriggerEvent.php index 8d4ebe313d..ec802ae82b 100644 --- a/src/API/TriggerEvent.php +++ b/src/API/TriggerEvent.php @@ -60,6 +60,6 @@ public function __invoke(Request $request) ]); } - return (object)[]; + return (object) []; } } diff --git a/src/ChannelManagers/RedisChannelManager.php b/src/ChannelManagers/RedisChannelManager.php index f96aff2567..a3b9ca0259 100644 --- a/src/ChannelManagers/RedisChannelManager.php +++ b/src/ChannelManagers/RedisChannelManager.php @@ -577,7 +577,7 @@ public function getConnectionsFromSet(int $start = 0, int $stop = 0, bool $stric * Add a channel to the set list. * * @param string|int $appId - * @param string $channel + * @param string $channel * @return PromiseInterface */ public function addChannelToSet($appId, string $channel): PromiseInterface diff --git a/src/Channels/Channel.php b/src/Channels/Channel.php index fd857e233f..65dc2f7e68 100644 --- a/src/Channels/Channel.php +++ b/src/Channels/Channel.php @@ -73,6 +73,7 @@ public function hasConnections(): bool * Add a new connection to the channel. * * @see https://pusher.com/docs/pusher_protocol#presence-channel-events + * * @param \Ratchet\ConnectionInterface $connection * @param \stdClass $payload * @return bool @@ -226,6 +227,7 @@ public function broadcastLocallyToEveryoneExcept(stdClass $payload, ?string $soc * @param \Ratchet\ConnectionInterface $connection * @param \stdClass $payload * @return void + * * @throws InvalidSignature */ protected function verifySignature(ConnectionInterface $connection, stdClass $payload) diff --git a/src/Channels/PresenceChannel.php b/src/Channels/PresenceChannel.php index 614fe8da50..1d75b1f05d 100644 --- a/src/Channels/PresenceChannel.php +++ b/src/Channels/PresenceChannel.php @@ -15,9 +15,11 @@ class PresenceChannel extends PrivateChannel * Subscribe to the channel. * * @see https://pusher.com/docs/pusher_protocol#presence-channel-events + * * @param \Ratchet\ConnectionInterface $connection * @param \stdClass $payload * @return bool + * * @throws InvalidSignature */ public function subscribe(ConnectionInterface $connection, stdClass $payload): bool diff --git a/src/Channels/PrivateChannel.php b/src/Channels/PrivateChannel.php index 93914e5e28..48dad61763 100644 --- a/src/Channels/PrivateChannel.php +++ b/src/Channels/PrivateChannel.php @@ -12,9 +12,11 @@ class PrivateChannel extends Channel * Subscribe to the channel. * * @see https://pusher.com/docs/pusher_protocol#presence-channel-events + * * @param \Ratchet\ConnectionInterface $connection * @param \stdClass $payload * @return bool + * * @throws InvalidSignature */ public function subscribe(ConnectionInterface $connection, stdClass $payload): bool diff --git a/src/Server/Exceptions/ConnectionsOverCapacity.php b/src/Server/Exceptions/ConnectionsOverCapacity.php index 37f04952ee..a4351e7a9f 100644 --- a/src/Server/Exceptions/ConnectionsOverCapacity.php +++ b/src/Server/Exceptions/ConnectionsOverCapacity.php @@ -8,6 +8,7 @@ class ConnectionsOverCapacity extends WebSocketException * Initialize the instance. * * @see https://pusher.com/docs/pusher_protocol#error-codes + * * @return void */ public function __construct() diff --git a/src/Server/Exceptions/InvalidSignature.php b/src/Server/Exceptions/InvalidSignature.php index b2aaf796ca..23b81252fe 100644 --- a/src/Server/Exceptions/InvalidSignature.php +++ b/src/Server/Exceptions/InvalidSignature.php @@ -8,6 +8,7 @@ class InvalidSignature extends WebSocketException * Initialize the instance. * * @see https://pusher.com/docs/pusher_protocol#error-codes + * * @return void */ public function __construct() diff --git a/src/Server/Messages/PusherChannelProtocolMessage.php b/src/Server/Messages/PusherChannelProtocolMessage.php index c6f4f13472..fc5e1ebb34 100644 --- a/src/Server/Messages/PusherChannelProtocolMessage.php +++ b/src/Server/Messages/PusherChannelProtocolMessage.php @@ -27,6 +27,7 @@ public function respond() * Ping the connection. * * @see https://pusher.com/docs/pusher_protocol#ping-pong + * * @param \Ratchet\ConnectionInterface $connection * @return void */ @@ -45,6 +46,7 @@ protected function ping(ConnectionInterface $connection) * Subscribe to channel. * * @see https://pusher.com/docs/pusher_protocol#pusher-subscribe + * * @param \Ratchet\ConnectionInterface $connection * @param \stdClass $payload * @return void diff --git a/src/Statistics/Statistic.php b/src/Statistics/Statistic.php index b31d547ceb..8de67c2a2e 100644 --- a/src/Statistics/Statistic.php +++ b/src/Statistics/Statistic.php @@ -45,7 +45,7 @@ class Statistic * Create a new statistic. * * @param string|int $appId - * @return void + * @return void */ public function __construct($appId) {