@@ -56,10 +56,7 @@ public function __construct()
56
56
public function webSocketMessage ($ appId )
57
57
{
58
58
$ 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 );
63
60
}
64
61
65
62
/**
@@ -71,10 +68,7 @@ public function webSocketMessage($appId)
71
68
public function apiMessage ($ appId )
72
69
{
73
70
$ 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 );
78
72
}
79
73
80
74
/**
@@ -127,18 +121,12 @@ public function disconnection($appId)
127
121
{
128
122
// Decrement the current connections count by 1.
129
123
$ 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 )
134
125
->then (function ($ currentConnectionsCount ) use ($ appId ) {
135
126
// Get the peak connections count from Redis.
136
127
$ this ->channelManager
137
128
->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 ' )
142
130
->then (function ($ currentPeakConnectionCount ) use ($ currentConnectionsCount , $ appId ) {
143
131
// Extract the greatest number between the current peak connection count
144
132
// and the current connection number.
0 commit comments