Skip to content

Commit 277811e

Browse files
Better phpdoc
1 parent e948520 commit 277811e

File tree

1 file changed

+63
-9
lines changed

1 file changed

+63
-9
lines changed

redis/RedisArray.php

Lines changed: 63 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,51 +16,51 @@ class RedisArray
1616
public function __construct(string|array $hosts, ?array $opts = null) {}
1717

1818
/**
19-
* @return bool|array returns a list of points on continuum; may be useful with custom distributor function.
19+
* @return false|array returns a list of points on continuum; may be useful with custom distributor function.
2020
*/
2121
public function _continuum(): bool|array {}
2222

2323
/**
24-
* @return bool|array returns a custom distributor function.
24+
* @return false|array returns a custom distributor function.
2525
*/
2626
public function _distributor(): bool|callable {}
2727

2828
/**
29-
* @return bool|callable the name of the function used to extract key parts during consistent hashing.
29+
* @return false|callable the name of the function used to extract key parts during consistent hashing.
3030
*/
3131
public function _function(): bool|callable {}
3232

3333
/**
34-
* @return bool|array list of hosts for the selected array or false
34+
* @return false|array list of hosts for the selected array or false
3535
*/
3636
public function _hosts(): bool|array {}
3737

3838
/**
3939
* @param string $host The host you want to retrieve the instance for
4040
*
41-
* @return bool|null|\Redis a redis instance connected to a specific node
41+
* @return false|null|\Redis a redis instance connected to a specific node
4242
*/
4343
public function _instance(string $host): bool|null|Redis {}
4444

4545
/**
4646
* Use this function when a new node is added and keys need to be rehashed.
4747
*
48-
* @return bool|null rehash result
48+
* @return false|null rehash result
4949
*/
5050
public function _rehash(callable $fn = null): bool|null {}
5151

5252
/**
5353
* @param string $key The key for which you want to lookup the host
5454
*
55-
* @return bool|string|null the host to be used for a certain key
55+
* @return false|string|null the host to be used for a certain key
5656
*/
5757
public function _target(string $key): bool|string|null {}
5858

5959
/**
6060
* @param string $host Host
6161
* @param int $mode \Redis::MULTI|\Redis::PIPELINE
6262
*
63-
* @return bool|string|null the host to be used for a certain key
63+
* @return false|string|null the host to be used for a certain key
6464
*/
6565
public function multi(string $host, int $mode = Redis::MULTI): bool|RedisArray {}
6666

@@ -198,7 +198,7 @@ public function multi(string $host, int $mode = Redis::MULTI): bool|RedisArray {
198198
* - cluster_enabled
199199
*
200200
* @link https://redis.io/commands/info
201-
* @return bool|array
201+
* @return false|array
202202
* @example
203203
* <pre>
204204
* $redis->info();
@@ -208,41 +208,95 @@ public function info(): bool|array {}
208208

209209
public function bgsave(): array {}
210210

211+
/**
212+
* @return false|int
213+
*/
211214
public function del(string|array $key, string ...$otherkeys): bool|int {}
212215

216+
/**
217+
* @return false|null
218+
*/
213219
public function discard(): bool|null {}
214220

221+
/**
222+
* @return false|null|array
223+
*/
215224
public function exec(): bool|null|array {}
216225

226+
/**
227+
* @return false|array
228+
*/
217229
public function flushall(): bool|array {}
218230

231+
/**
232+
* @return false|array
233+
*/
219234
public function flushdb(): bool|array {}
220235

236+
/**
237+
* @return false|array
238+
*/
221239
public function getOption(int $opt): bool|array {}
222240

241+
/**
242+
* @return false|array
243+
*/
223244
public function hscan(string $key, null|int|string &$iterator, ?string $pattern = null, int $count = 0): bool|array {}
224245

246+
/**
247+
* @return false|array
248+
*/
225249
public function keys(string $pattern): bool|array {}
226250

251+
/**
252+
* @return false|array
253+
*/
227254
public function mget(array $keys): bool|array {}
228255

229256
public function mset(array $pairs): bool {}
230257

258+
/**
259+
* @return false|array
260+
*/
231261
public function ping(): bool|array {}
232262

263+
/**
264+
* @return false|array
265+
*/
233266
public function save(): bool|array {}
234267

268+
/**
269+
* @return false|array
270+
*/
235271
public function scan(null|int|string &$iterator, string $node, ?string $pattern = null, int $count = 0): bool|array {}
236272

273+
/**
274+
* @return false|array
275+
*/
237276
public function select(int $index): bool|array {}
238277

278+
/**
279+
* @return false|array
280+
*/
239281
public function setOption(int $opt, string $value): bool|array {}
240282

283+
/**
284+
* @return false|array
285+
*/
241286
public function sscan(string $key, null|int|string &$iterator, ?string $pattern = null, int $count = 0): bool|array {}
242287

288+
/**
289+
* @return false|int
290+
*/
243291
public function unlink(string|array $key, string ...$otherkeys): bool|int {}
244292

293+
/**
294+
* @return false|null
295+
*/
245296
public function unwatch(): bool|null {}
246297

298+
/**
299+
* @return false|array
300+
*/
247301
public function zscan(string $key, null|int|string &$iterator, ?string $pattern = null, int $count = 0): bool|array {}
248302
}

0 commit comments

Comments
 (0)