@@ -56,10 +56,7 @@ public function __construct()
5656 public function webSocketMessage ($ appId )
5757 {
5858 $ this ->ensureAppIsInSet ($ appId )
59- ->hincrby (
60- $ this ->channelManager ->getRedisKey ($ appId , null , ['stats ' ]),
61- 'websocket_messages_count ' , 1
62- );
59+ ->hincrby ($ this ->channelManager ->getRedisKey ($ appId , null , ['stats ' ]), 'websocket_messages_count ' , 1 );
6360 }
6461
6562 /**
@@ -71,10 +68,7 @@ public function webSocketMessage($appId)
7168 public function apiMessage ($ appId )
7269 {
7370 $ this ->ensureAppIsInSet ($ appId )
74- ->hincrby (
75- $ this ->channelManager ->getRedisKey ($ appId , null , ['stats ' ]),
76- 'api_messages_count ' , 1
77- );
71+ ->hincrby ($ this ->channelManager ->getRedisKey ($ appId , null , ['stats ' ]), 'api_messages_count ' , 1 );
7872 }
7973
8074 /**
@@ -127,18 +121,12 @@ public function disconnection($appId)
127121 {
128122 // Decrement the current connections count by 1.
129123 $ this ->ensureAppIsInSet ($ appId )
130- ->hincrby (
131- $ this ->channelManager ->getRedisKey ($ appId , null , ['stats ' ]),
132- 'current_connections_count ' , -1
133- )
124+ ->hincrby ($ this ->channelManager ->getRedisKey ($ appId , null , ['stats ' ]), 'current_connections_count ' , -1 )
134125 ->then (function ($ currentConnectionsCount ) use ($ appId ) {
135126 // Get the peak connections count from Redis.
136127 $ this ->channelManager
137128 ->getPublishClient ()
138- ->hget (
139- $ this ->channelManager ->getRedisKey ($ appId , null , ['stats ' ]),
140- 'peak_connections_count '
141- )
129+ ->hget ($ this ->channelManager ->getRedisKey ($ appId , null , ['stats ' ]), 'peak_connections_count ' )
142130 ->then (function ($ currentPeakConnectionCount ) use ($ currentConnectionsCount , $ appId ) {
143131 // Extract the greatest number between the current peak connection count
144132 // and the current connection number.
0 commit comments