From 893215a1d4503466f2c7d0bb44f2bd42e3deac39 Mon Sep 17 00:00:00 2001 From: Daniele Alessandri Date: Wed, 12 Jul 2017 15:34:57 +0200 Subject: [PATCH] Push same changes of #446 to Predis\ClientContextInterface. This also adds a couple of missing changes into the original PR. --- src/ClientContextInterface.php | 26 +++++++++++++------------- src/ClientInterface.php | 4 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/ClientContextInterface.php b/src/ClientContextInterface.php index deb38659..7e13f26b 100644 --- a/src/ClientContextInterface.php +++ b/src/ClientContextInterface.php @@ -16,7 +16,7 @@ use Predis\Command\CommandInterface; /** * Interface defining a client-side context such as a pipeline or transaction. * - * @method $this del(array $keys) + * @method $this del(array|string $keys) * @method $this dump($key) * @method $this exists($key) * @method $this expire($key, $seconds) @@ -73,8 +73,8 @@ use Predis\Command\CommandInterface; * @method $this hsetnx($key, $field, $value) * @method $this hvals($key) * @method $this hstrlen($key, $field) - * @method $this blpop(array $keys, $timeout) - * @method $this brpop(array $keys, $timeout) + * @method $this blpop(array|string $keys, $timeout) + * @method $this brpop(array|string $keys, $timeout) * @method $this brpoplpush($source, $destination, $timeout) * @method $this lindex($key, $index) * @method $this linsert($key, $whence, $pivot, $value) @@ -92,10 +92,10 @@ use Predis\Command\CommandInterface; * @method $this rpushx($key, $value) * @method $this sadd($key, array $members) * @method $this scard($key) - * @method $this sdiff(array $keys) - * @method $this sdiffstore($destination, array $keys) - * @method $this sinter(array $keys) - * @method $this sinterstore($destination, array $keys) + * @method $this sdiff(array|string $keys) + * @method $this sdiffstore($destination, array|string $keys) + * @method $this sinter(array|string $keys) + * @method $this sinterstore($destination, array|string $keys) * @method $this sismember($key, $member) * @method $this smembers($key) * @method $this smove($source, $destination, $member) @@ -103,13 +103,13 @@ use Predis\Command\CommandInterface; * @method $this srandmember($key, $count = null) * @method $this srem($key, $member) * @method $this sscan($key, $cursor, array $options = null) - * @method $this sunion(array $keys) - * @method $this sunionstore($destination, array $keys) + * @method $this sunion(array|string $keys) + * @method $this sunionstore($destination, array|string $keys) * @method $this zadd($key, array $membersAndScoresDictionary) * @method $this zcard($key) * @method $this zcount($key, $min, $max) * @method $this zincrby($key, $increment, $member) - * @method $this zinterstore($destination, array $keys, array $options = null) + * @method $this zinterstore($destination, array|string $keys, array $options = null) * @method $this zrange($key, $start, $stop, array $options = null) * @method $this zrangebyscore($key, $min, $max, array $options = null) * @method $this zrank($key, $member) @@ -119,7 +119,7 @@ use Predis\Command\CommandInterface; * @method $this zrevrange($key, $start, $stop, array $options = null) * @method $this zrevrangebyscore($key, $min, $max, array $options = null) * @method $this zrevrank($key, $member) - * @method $this zunionstore($destination, array $keys, array $options = null) + * @method $this zunionstore($destination, array|string $keys, array $options = null) * @method $this zscore($key, $member) * @method $this zscan($key, $cursor, array $options = null) * @method $this zrangebylex($key, $start, $stop, array $options = null) @@ -127,8 +127,8 @@ use Predis\Command\CommandInterface; * @method $this zremrangebylex($key, $min, $max) * @method $this zlexcount($key, $min, $max) * @method $this pfadd($key, array $elements) - * @method $this pfmerge($destinationKey, array $sourceKeys) - * @method $this pfcount(array $keys) + * @method $this pfmerge($destinationKey, array|string $sourceKeys) + * @method $this pfcount(array|string $keys) * @method $this pubsub($subcommand, $argument) * @method $this publish($channel, $message) * @method $this discard() diff --git a/src/ClientInterface.php b/src/ClientInterface.php index ea965c98..ed7d8043 100644 --- a/src/ClientInterface.php +++ b/src/ClientInterface.php @@ -24,7 +24,7 @@ use Predis\Profile\ProfileInterface; * and more friendly interface to ease programming which is described in the * following list of methods: * - * @method int del(array $keys) + * @method int del(array|string $keys) * @method string dump($key) * @method int exists($key) * @method int expire($key, $seconds) @@ -135,7 +135,7 @@ use Predis\Profile\ProfileInterface; * @method int zremrangebylex($key, $min, $max) * @method int zlexcount($key, $min, $max) * @method int pfadd($key, array $elements) - * @method mixed pfmerge($destinationKey, array $sourceKeys) + * @method mixed pfmerge($destinationKey, array|string $sourceKeys) * @method int pfcount(array|string $keys) * @method mixed pubsub($subcommand, $argument) * @method int publish($channel, $message)