@@ -56,20 +56,24 @@ public function getType(string|int $type): string {
5656 return $ this ->data_types [$ type ] ?? 'unknown ' ;
5757 }
5858
59-
59+ /**
60+ * @throws RedisClusterException
61+ */
6062 public function getKeyType (string $ key ): string {
6163 $ type = $ this ->type ($ key );
6264
6365 if ($ type === Redis::REDIS_NOT_FOUND ) {
6466 $ this ->setOption (Redis::OPT_REPLY_LITERAL , true );
65- $ type = $ this ->rawCommand ($ key , 'TYPE ' , $ key );
67+ $ type = $ this ->rawcommand ($ key , 'TYPE ' , $ key );
6668 }
6769
6870 return $ this ->getType ($ type );
6971 }
7072
7173 /**
7274 * @return array<int|string, mixed>
75+ *
76+ * @throws RedisClusterException
7377 */
7478 public function getInfo (?string $ option = null ): array {
7579 static $ info = [];
@@ -101,6 +105,7 @@ public function getInfo(?string $option = null): array {
101105
102106 /**
103107 * @return array<int, string>
108+ * @throws RedisClusterException
104109 */
105110 public function scanKeys (string $ pattern , int $ count ): array {
106111 $ keys = [];
@@ -123,8 +128,11 @@ public function scanKeys(string $pattern, int $count): array {
123128 return $ keys ;
124129 }
125130
131+ /**
132+ * @throws RedisClusterException
133+ */
126134 public function listRem (string $ key , string $ value , int $ count ): int {
127- return $ this ->lRem ($ key , $ value , $ count );
135+ return $ this ->lrem ($ key , $ value , $ count );
128136 }
129137
130138 /**
@@ -147,12 +155,12 @@ public function pipelineKeys(array $keys): array {
147155 foreach ($ keys as $ key ) {
148156 $ ttl = $ this ->ttl ($ key );
149157 $ type = $ this ->type ($ key );
150- $ size = $ this ->rawCommand ($ key , 'MEMORY ' , 'USAGE ' , $ key );
151- $ scard = $ this ->rawCommand ($ key , 'SCARD ' , $ key );
152- $ llen = $ this ->rawCommand ($ key , 'LLEN ' , $ key );
153- $ zcard = $ this ->rawCommand ($ key , 'ZCARD ' , $ key );
154- $ hlen = $ this ->rawCommand ($ key , 'HLEN ' , $ key );
155- $ xlen = $ this ->rawCommand ($ key , 'XLEN ' , $ key );
158+ $ size = $ this ->rawcommand ($ key , 'MEMORY ' , 'USAGE ' , $ key );
159+ $ scard = $ this ->rawcommand ($ key , 'SCARD ' , $ key );
160+ $ llen = $ this ->rawcommand ($ key , 'LLEN ' , $ key );
161+ $ zcard = $ this ->rawcommand ($ key , 'ZCARD ' , $ key );
162+ $ hlen = $ this ->rawcommand ($ key , 'HLEN ' , $ key );
163+ $ xlen = $ this ->rawcommand ($ key , 'XLEN ' , $ key );
156164
157165 $ results = [$ ttl , $ type , $ size , $ scard , $ llen , $ zcard , $ hlen , $ xlen ];
158166
@@ -178,12 +186,18 @@ public function pipelineKeys(array $keys): array {
178186 return $ data ;
179187 }
180188
189+ /**
190+ * @throws RedisClusterException
191+ */
181192 public function size (string $ key ): int {
182- $ size = $ this ->rawCommand ($ key , 'MEMORY ' , 'USAGE ' , $ key );
193+ $ size = $ this ->rawcommand ($ key , 'MEMORY ' , 'USAGE ' , $ key );
183194
184195 return is_int ($ size ) ? $ size : 0 ;
185196 }
186197
198+ /**
199+ * @throws RedisClusterException
200+ */
187201 public function flushAllClusterDBs (): bool {
188202 $ nodes = $ this ->_masters ();
189203
@@ -194,6 +208,9 @@ public function flushAllClusterDBs(): bool {
194208 return true ;
195209 }
196210
211+ /**
212+ * @throws RedisClusterException
213+ */
197214 public function clusterDbSize (): int {
198215 $ nodes = $ this ->_masters ();
199216 $ total = 0 ;
0 commit comments