@@ -132,7 +132,7 @@ Listing all available commands is out of scope here, please refer to the
132132
133133Any arguments passed to the method call will be forwarded as command arguments.
134134For example, the ` $redis->set('name', 'Alice') ` call will perform the equivalent of a
135- ` SET name Alice ` command. It's safe to pass integer arguments where applicable (for
135+ ` SET name Alice ` command. It's safe to pass numeric arguments where applicable (for
136136example ` $redis->expire($key, 60) ` ), but internally Redis requires all arguments to
137137always be coerced to string values.
138138
@@ -417,7 +417,7 @@ $redis = new Clue\React\Redis\RedisClient('localhost', $connector);
417417
418418#### __ call()
419419
420- The ` __call(string $name, string[] $args): PromiseInterface<mixed> ` method can be used to
420+ The ` __call(string $name, list< string|int|float> $args): PromiseInterface<mixed> ` method can be used to
421421invoke the given command.
422422
423423This is a magic method that will be invoked when calling any Redis command on this instance.
@@ -441,7 +441,7 @@ Listing all available commands is out of scope here, please refer to the
441441
442442Any arguments passed to the method call will be forwarded as command arguments.
443443For example, the ` $redis->set('name', 'Alice') ` call will perform the equivalent of a
444- ` SET name Alice ` command. It's safe to pass integer arguments where applicable (for
444+ ` SET name Alice ` command. It's safe to pass numeric arguments where applicable (for
445445example ` $redis->expire($key, 60) ` ), but internally Redis requires all arguments to
446446always be coerced to string values.
447447
@@ -451,9 +451,12 @@ that eventually *fulfills* with its *results* on success or *rejects* with an
451451
452452#### callAsync()
453453
454- The ` callAsync(string $command, string ...$args): PromiseInterface<mixed> ` method can be used to
454+ The ` callAsync(string $command, string|int|float ...$args): PromiseInterface<mixed> ` method can be used to
455455invoke a Redis command.
456456
457+ For example, the [ ` GET ` command] ( https://redis.io/commands/get ) can be invoked
458+ like this:
459+
457460``` php
458461$redis->callAsync('GET', 'name')->then(function (?string $name): void {
459462 echo 'Name: ' . ($name ?? 'Unknown') . PHP_EOL;
@@ -470,12 +473,10 @@ may understand this magic method. Listing all available commands is out
470473of scope here, please refer to the
471474[ Redis command reference] ( https://redis.io/commands ) .
472475
473- The optional ` string ...$args ` parameter can be used to pass any
474- additional arguments to the Redis command. Some commands may require or
475- support additional arguments that this method will simply forward as is.
476- Internally, Redis requires all arguments to be coerced to ` string ` values,
477- but you may also rely on PHP's type-juggling semantics and pass ` int ` or
478- ` float ` values:
476+ The optional ` string|int|float ...$args ` parameter can be used to pass
477+ any additional arguments that some Redis commands may require or support.
478+ Values get passed directly to Redis, with any numeric values converted
479+ automatically since Redis only works with ` string ` arguments internally:
479480
480481``` php
481482$redis->callAsync('SET', 'name', 'Alice', 'EX', 600);
0 commit comments