@@ -59,7 +59,7 @@ public function __construct(ChannelManager $channelManager, StatisticsDriver $dr
5959 public function webSocketMessage ($ appId )
6060 {
6161 $ this ->ensureAppIsSet ($ appId )
62- ->__call ( ' hincrby ' , [ $ this ->getHash ($ appId ), 'websocket_message_count ' , 1 ] );
62+ ->hincrby ( $ this ->getHash ($ appId ), 'websocket_message_count ' , 1 );
6363 }
6464
6565 /**
@@ -71,7 +71,7 @@ public function webSocketMessage($appId)
7171 public function apiMessage ($ appId )
7272 {
7373 $ this ->ensureAppIsSet ($ appId )
74- ->__call ( ' hincrby ' , [ $ this ->getHash ($ appId ), 'api_message_count ' , 1 ] );
74+ ->hincrby ( $ this ->getHash ($ appId ), 'api_message_count ' , 1 );
7575 }
7676
7777 /**
@@ -84,13 +84,13 @@ public function connection($appId)
8484 {
8585 // Increment the current connections count by 1.
8686 $ incremented = $ this ->ensureAppIsSet ($ appId )
87- ->__call ( ' hincrby ' , [ $ this ->getHash ($ appId ), 'current_connection_count ' , 1 ] );
87+ ->hincrby ( $ this ->getHash ($ appId ), 'current_connection_count ' , 1 );
8888
8989 $ incremented ->then (function ($ currentConnectionCount ) use ($ appId ) {
9090 // Get the peak connections count from Redis.
9191 $ peakConnectionCount = $ this ->replicator
9292 ->getPublishClient ()
93- ->__call ( ' hget ' , [ $ this ->getHash ($ appId ), 'peak_connection_count ' ] );
93+ ->hget ( $ this ->getHash ($ appId ), 'peak_connection_count ' );
9494
9595 $ peakConnectionCount ->then (function ($ currentPeakConnectionCount ) use ($ currentConnectionCount , $ appId ) {
9696 // Extract the greatest number between the current peak connection count
@@ -103,7 +103,7 @@ public function connection($appId)
103103 // Then set it to the database.
104104 $ this ->replicator
105105 ->getPublishClient ()
106- ->__call ( ' hset ' , [ $ this ->getHash ($ appId ), 'peak_connection_count ' , $ peakConnectionCount] );
106+ ->hset ( $ this ->getHash ($ appId ), 'peak_connection_count ' , $ peakConnectionCount );
107107 });
108108 });
109109 }
@@ -118,13 +118,13 @@ public function disconnection($appId)
118118 {
119119 // Decrement the current connections count by 1.
120120 $ decremented = $ this ->ensureAppIsSet ($ appId )
121- ->__call ( ' hincrby ' , [ $ this ->getHash ($ appId ), 'current_connection_count ' , -1 ] );
121+ ->hincrby ( $ this ->getHash ($ appId ), 'current_connection_count ' , -1 );
122122
123123 $ decremented ->then (function ($ currentConnectionCount ) use ($ appId ) {
124124 // Get the peak connections count from Redis.
125125 $ peakConnectionCount = $ this ->replicator
126126 ->getPublishClient ()
127- ->__call ( ' hget ' , [ $ this ->getHash ($ appId ), 'peak_connection_count ' ] );
127+ ->hget ( $ this ->getHash ($ appId ), 'peak_connection_count ' );
128128
129129 $ peakConnectionCount ->then (function ($ currentPeakConnectionCount ) use ($ currentConnectionCount , $ appId ) {
130130 // Extract the greatest number between the current peak connection count
@@ -137,7 +137,7 @@ public function disconnection($appId)
137137 // Then set it to the database.
138138 $ this ->replicator
139139 ->getPublishClient ()
140- ->__call ( ' hset ' , [ $ this ->getHash ($ appId ), 'peak_connection_count ' , $ peakConnectionCount] );
140+ ->hset ( $ this ->getHash ($ appId ), 'peak_connection_count ' , $ peakConnectionCount );
141141 });
142142 });
143143 }
@@ -152,13 +152,13 @@ public function save()
152152 $ this ->lock ()->get (function () {
153153 $ setMembers = $ this ->replicator
154154 ->getPublishClient ()
155- ->__call ( ' smembers ' , [ ' laravel-websockets:apps '] );
155+ ->smembers ( ' laravel-websockets:apps ' );
156156
157157 $ setMembers ->then (function ($ members ) {
158158 foreach ($ members as $ appId ) {
159159 $ member = $ this ->replicator
160160 ->getPublishClient ()
161- ->__call ( ' hgetall ' , [ $ this ->getHash ($ appId )] );
161+ ->hgetall ( $ this ->getHash ($ appId ));
162162
163163 $ member ->then (function ($ statistic ) use ($ appId ) {
164164 if (! $ statistic ) {
@@ -201,7 +201,7 @@ protected function ensureAppIsSet($appId)
201201 {
202202 $ this ->replicator
203203 ->getPublishClient ()
204- ->__call ( ' sadd ' , [ ' laravel-websockets:apps ' , $ appId] );
204+ ->sadd ( ' laravel-websockets:apps ' , $ appId );
205205
206206 return $ this ->replicator ->getPublishClient ();
207207 }
@@ -217,19 +217,19 @@ public function resetStatistics($appId, int $currentConnectionCount)
217217 {
218218 $ this ->replicator
219219 ->getPublishClient ()
220- ->__call ( ' hset ' , [ $ this ->getHash ($ appId ), 'current_connection_count ' , $ currentConnectionCount] );
220+ ->hset ( $ this ->getHash ($ appId ), 'current_connection_count ' , $ currentConnectionCount );
221221
222222 $ this ->replicator
223223 ->getPublishClient ()
224- ->__call ( ' hset ' , [ $ this ->getHash ($ appId ), 'peak_connection_count ' , $ currentConnectionCount] );
224+ ->hset ( $ this ->getHash ($ appId ), 'peak_connection_count ' , $ currentConnectionCount );
225225
226226 $ this ->replicator
227227 ->getPublishClient ()
228- ->__call ( ' hset ' , [ $ this ->getHash ($ appId ), 'websocket_message_count ' , 0 ] );
228+ ->hset ( $ this ->getHash ($ appId ), 'websocket_message_count ' , 0 );
229229
230230 $ this ->replicator
231231 ->getPublishClient ()
232- ->__call ( ' hset ' , [ $ this ->getHash ($ appId ), 'api_message_count ' , 0 ] );
232+ ->hset ( $ this ->getHash ($ appId ), 'api_message_count ' , 0 );
233233 }
234234
235235 /**
@@ -243,23 +243,23 @@ public function resetAppTraces($appId)
243243 {
244244 $ this ->replicator
245245 ->getPublishClient ()
246- ->__call ( ' hdel ' , [ $ this ->getHash ($ appId ), 'current_connection_count ' ] );
246+ ->hdel ( $ this ->getHash ($ appId ), 'current_connection_count ' );
247247
248248 $ this ->replicator
249249 ->getPublishClient ()
250- ->__call ( ' hdel ' , [ $ this ->getHash ($ appId ), 'peak_connection_count ' ] );
250+ ->hdel ( $ this ->getHash ($ appId ), 'peak_connection_count ' );
251251
252252 $ this ->replicator
253253 ->getPublishClient ()
254- ->__call ( ' hdel ' , [ $ this ->getHash ($ appId ), 'websocket_message_count ' ] );
254+ ->hdel ( $ this ->getHash ($ appId ), 'websocket_message_count ' );
255255
256256 $ this ->replicator
257257 ->getPublishClient ()
258- ->__call ( ' hdel ' , [ $ this ->getHash ($ appId ), 'api_message_count ' ] );
258+ ->hdel ( $ this ->getHash ($ appId ), 'api_message_count ' );
259259
260260 $ this ->replicator
261261 ->getPublishClient ()
262- ->__call ( ' srem ' , [ ' laravel-websockets:apps ' , $ appId] );
262+ ->srem ( ' laravel-websockets:apps ' , $ appId );
263263 }
264264
265265 /**
0 commit comments