Skip to content

Commit

Permalink
Fixed Redis->del() and RedisCluster->del()
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-sokolov committed Mar 25, 2019
1 parent e2f6629 commit 9e30977
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions redis/Redis.php
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,8 @@ public function setnx( $key, $value ) {}
/**
* Remove specified keys.
*
* @param string|array $key1 An array of keys, or an undefined number of parameters, each a key: key1 key2 key3 ... keyN
* @param string $key2 ...
* @param string $key3 ...
* @param int|string|array $key1 An array of keys, or an undefined number of parameters, each a key: key1 key2 key3 ... keyN
* @param int|string ...$otherKeys
* @return int Number of keys deleted.
* @link https://redis.io/commands/del
* @example
Expand All @@ -388,7 +387,7 @@ public function setnx( $key, $value ) {}
* $redis->delete(array('key3', 'key4')); // return 2
* </pre>
*/
public function del( $key1, $key2 = null, $key3 = null ) {}
public function del( $key1, ...$otherKeys) {}

/**
* @see del()
Expand Down
2 changes: 1 addition & 1 deletion redis/RedisCluster.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ public function msetnx(array $array) { }
* $redisCluster->del(array('key3', 'key4')); // return 2
* </pre>
*/
public function del($key1, $key2 = null, $key3 = null) { }
public function del($key1, ...$otherKeys) { }

/**
* Set the string value in argument as value of the key, with a time to live.
Expand Down

0 comments on commit 9e30977

Please sign in to comment.