diff --git a/src/Autoloader.php b/src/Autoloader.php index 6100fcd0..17ec2ff1 100644 --- a/src/Autoloader.php +++ b/src/Autoloader.php @@ -29,7 +29,7 @@ class Autoloader public function __construct($baseDirectory = __DIR__) { $this->directory = $baseDirectory; - $this->prefix = __NAMESPACE__ . '\\'; + $this->prefix = __NAMESPACE__.'\\'; $this->prefixLength = strlen($this->prefix); } @@ -40,7 +40,7 @@ class Autoloader */ public static function register($prepend = false) { - spl_autoload_register(array(new self, 'autoload'), true, $prepend); + spl_autoload_register(array(new self(), 'autoload'), true, $prepend); } /** @@ -55,7 +55,7 @@ class Autoloader $filepath = $this->directory.DIRECTORY_SEPARATOR.implode(DIRECTORY_SEPARATOR, $parts).'.php'; if (is_file($filepath)) { - require($filepath); + require $filepath; } } } diff --git a/src/Client.php b/src/Client.php index 7ef9abd5..9730dfda 100644 --- a/src/Client.php +++ b/src/Client.php @@ -80,7 +80,7 @@ class Client implements ClientInterface return $options; } - throw new InvalidArgumentException("Invalid type for client options."); + throw new InvalidArgumentException('Invalid type for client options.'); } /** @@ -433,7 +433,7 @@ class Client implements ClientInterface $class = 'Predis\Pipeline\Pipeline'; } - /** + /* * @var ClientContextInterface */ $pipeline = new $class($this); diff --git a/src/ClientContextInterface.php b/src/ClientContextInterface.php index 2964e4f3..7f695b78 100644 --- a/src/ClientContextInterface.php +++ b/src/ClientContextInterface.php @@ -159,7 +159,6 @@ use Predis\Command\CommandInterface; */ interface ClientContextInterface { - /** * Sends the specified command instance to Redis. * diff --git a/src/Cluster/ClusterStrategy.php b/src/Cluster/ClusterStrategy.php index fee7d2ff..c36dd941 100644 --- a/src/Cluster/ClusterStrategy.php +++ b/src/Cluster/ClusterStrategy.php @@ -44,126 +44,126 @@ abstract class ClusterStrategy implements StrategyInterface return array( /* commands operating on the key space */ - 'EXISTS' => $getKeyFromFirstArgument, - 'DEL' => $getKeyFromAllArguments, - 'TYPE' => $getKeyFromFirstArgument, - 'EXPIRE' => $getKeyFromFirstArgument, - 'EXPIREAT' => $getKeyFromFirstArgument, - 'PERSIST' => $getKeyFromFirstArgument, - 'PEXPIRE' => $getKeyFromFirstArgument, - 'PEXPIREAT' => $getKeyFromFirstArgument, - 'TTL' => $getKeyFromFirstArgument, - 'PTTL' => $getKeyFromFirstArgument, - 'SORT' => $getKeyFromFirstArgument, // TODO - 'DUMP' => $getKeyFromFirstArgument, - 'RESTORE' => $getKeyFromFirstArgument, + 'EXISTS' => $getKeyFromFirstArgument, + 'DEL' => $getKeyFromAllArguments, + 'TYPE' => $getKeyFromFirstArgument, + 'EXPIRE' => $getKeyFromFirstArgument, + 'EXPIREAT' => $getKeyFromFirstArgument, + 'PERSIST' => $getKeyFromFirstArgument, + 'PEXPIRE' => $getKeyFromFirstArgument, + 'PEXPIREAT' => $getKeyFromFirstArgument, + 'TTL' => $getKeyFromFirstArgument, + 'PTTL' => $getKeyFromFirstArgument, + 'SORT' => $getKeyFromFirstArgument, // TODO + 'DUMP' => $getKeyFromFirstArgument, + 'RESTORE' => $getKeyFromFirstArgument, /* commands operating on string values */ - 'APPEND' => $getKeyFromFirstArgument, - 'DECR' => $getKeyFromFirstArgument, - 'DECRBY' => $getKeyFromFirstArgument, - 'GET' => $getKeyFromFirstArgument, - 'GETBIT' => $getKeyFromFirstArgument, - 'MGET' => $getKeyFromAllArguments, - 'SET' => $getKeyFromFirstArgument, - 'GETRANGE' => $getKeyFromFirstArgument, - 'GETSET' => $getKeyFromFirstArgument, - 'INCR' => $getKeyFromFirstArgument, - 'INCRBY' => $getKeyFromFirstArgument, - 'INCRBYFLOAT' => $getKeyFromFirstArgument, - 'SETBIT' => $getKeyFromFirstArgument, - 'SETEX' => $getKeyFromFirstArgument, - 'MSET' => array($this, 'getKeyFromInterleavedArguments'), - 'MSETNX' => array($this, 'getKeyFromInterleavedArguments'), - 'SETNX' => $getKeyFromFirstArgument, - 'SETRANGE' => $getKeyFromFirstArgument, - 'STRLEN' => $getKeyFromFirstArgument, - 'SUBSTR' => $getKeyFromFirstArgument, - 'BITOP' => array($this, 'getKeyFromBitOp'), - 'BITCOUNT' => $getKeyFromFirstArgument, + 'APPEND' => $getKeyFromFirstArgument, + 'DECR' => $getKeyFromFirstArgument, + 'DECRBY' => $getKeyFromFirstArgument, + 'GET' => $getKeyFromFirstArgument, + 'GETBIT' => $getKeyFromFirstArgument, + 'MGET' => $getKeyFromAllArguments, + 'SET' => $getKeyFromFirstArgument, + 'GETRANGE' => $getKeyFromFirstArgument, + 'GETSET' => $getKeyFromFirstArgument, + 'INCR' => $getKeyFromFirstArgument, + 'INCRBY' => $getKeyFromFirstArgument, + 'INCRBYFLOAT' => $getKeyFromFirstArgument, + 'SETBIT' => $getKeyFromFirstArgument, + 'SETEX' => $getKeyFromFirstArgument, + 'MSET' => array($this, 'getKeyFromInterleavedArguments'), + 'MSETNX' => array($this, 'getKeyFromInterleavedArguments'), + 'SETNX' => $getKeyFromFirstArgument, + 'SETRANGE' => $getKeyFromFirstArgument, + 'STRLEN' => $getKeyFromFirstArgument, + 'SUBSTR' => $getKeyFromFirstArgument, + 'BITOP' => array($this, 'getKeyFromBitOp'), + 'BITCOUNT' => $getKeyFromFirstArgument, /* commands operating on lists */ - 'LINSERT' => $getKeyFromFirstArgument, - 'LINDEX' => $getKeyFromFirstArgument, - 'LLEN' => $getKeyFromFirstArgument, - 'LPOP' => $getKeyFromFirstArgument, - 'RPOP' => $getKeyFromFirstArgument, - 'RPOPLPUSH' => $getKeyFromAllArguments, - 'BLPOP' => array($this, 'getKeyFromBlockingListCommands'), - 'BRPOP' => array($this, 'getKeyFromBlockingListCommands'), - 'BRPOPLPUSH' => array($this, 'getKeyFromBlockingListCommands'), - 'LPUSH' => $getKeyFromFirstArgument, - 'LPUSHX' => $getKeyFromFirstArgument, - 'RPUSH' => $getKeyFromFirstArgument, - 'RPUSHX' => $getKeyFromFirstArgument, - 'LRANGE' => $getKeyFromFirstArgument, - 'LREM' => $getKeyFromFirstArgument, - 'LSET' => $getKeyFromFirstArgument, - 'LTRIM' => $getKeyFromFirstArgument, + 'LINSERT' => $getKeyFromFirstArgument, + 'LINDEX' => $getKeyFromFirstArgument, + 'LLEN' => $getKeyFromFirstArgument, + 'LPOP' => $getKeyFromFirstArgument, + 'RPOP' => $getKeyFromFirstArgument, + 'RPOPLPUSH' => $getKeyFromAllArguments, + 'BLPOP' => array($this, 'getKeyFromBlockingListCommands'), + 'BRPOP' => array($this, 'getKeyFromBlockingListCommands'), + 'BRPOPLPUSH' => array($this, 'getKeyFromBlockingListCommands'), + 'LPUSH' => $getKeyFromFirstArgument, + 'LPUSHX' => $getKeyFromFirstArgument, + 'RPUSH' => $getKeyFromFirstArgument, + 'RPUSHX' => $getKeyFromFirstArgument, + 'LRANGE' => $getKeyFromFirstArgument, + 'LREM' => $getKeyFromFirstArgument, + 'LSET' => $getKeyFromFirstArgument, + 'LTRIM' => $getKeyFromFirstArgument, /* commands operating on sets */ - 'SADD' => $getKeyFromFirstArgument, - 'SCARD' => $getKeyFromFirstArgument, - 'SDIFF' => $getKeyFromAllArguments, - 'SDIFFSTORE' => $getKeyFromAllArguments, - 'SINTER' => $getKeyFromAllArguments, - 'SINTERSTORE' => $getKeyFromAllArguments, - 'SUNION' => $getKeyFromAllArguments, - 'SUNIONSTORE' => $getKeyFromAllArguments, - 'SISMEMBER' => $getKeyFromFirstArgument, - 'SMEMBERS' => $getKeyFromFirstArgument, - 'SSCAN' => $getKeyFromFirstArgument, - 'SPOP' => $getKeyFromFirstArgument, - 'SRANDMEMBER' => $getKeyFromFirstArgument, - 'SREM' => $getKeyFromFirstArgument, + 'SADD' => $getKeyFromFirstArgument, + 'SCARD' => $getKeyFromFirstArgument, + 'SDIFF' => $getKeyFromAllArguments, + 'SDIFFSTORE' => $getKeyFromAllArguments, + 'SINTER' => $getKeyFromAllArguments, + 'SINTERSTORE' => $getKeyFromAllArguments, + 'SUNION' => $getKeyFromAllArguments, + 'SUNIONSTORE' => $getKeyFromAllArguments, + 'SISMEMBER' => $getKeyFromFirstArgument, + 'SMEMBERS' => $getKeyFromFirstArgument, + 'SSCAN' => $getKeyFromFirstArgument, + 'SPOP' => $getKeyFromFirstArgument, + 'SRANDMEMBER' => $getKeyFromFirstArgument, + 'SREM' => $getKeyFromFirstArgument, /* commands operating on sorted sets */ - 'ZADD' => $getKeyFromFirstArgument, - 'ZCARD' => $getKeyFromFirstArgument, - 'ZCOUNT' => $getKeyFromFirstArgument, - 'ZINCRBY' => $getKeyFromFirstArgument, - 'ZINTERSTORE' => array($this, 'getKeyFromZsetAggregationCommands'), - 'ZRANGE' => $getKeyFromFirstArgument, - 'ZRANGEBYSCORE' => $getKeyFromFirstArgument, - 'ZRANK' => $getKeyFromFirstArgument, - 'ZREM' => $getKeyFromFirstArgument, - 'ZREMRANGEBYRANK' => $getKeyFromFirstArgument, - 'ZREMRANGEBYSCORE' => $getKeyFromFirstArgument, - 'ZREVRANGE' => $getKeyFromFirstArgument, - 'ZREVRANGEBYSCORE' => $getKeyFromFirstArgument, - 'ZREVRANK' => $getKeyFromFirstArgument, - 'ZSCORE' => $getKeyFromFirstArgument, - 'ZUNIONSTORE' => array($this, 'getKeyFromZsetAggregationCommands'), - 'ZSCAN' => $getKeyFromFirstArgument, - 'ZLEXCOUNT' => $getKeyFromFirstArgument, - 'ZRANGEBYLEX' => $getKeyFromFirstArgument, - 'ZREMRANGEBYLEX' => $getKeyFromFirstArgument, - 'ZREVRANGEBYLEX' => $getKeyFromFirstArgument, + 'ZADD' => $getKeyFromFirstArgument, + 'ZCARD' => $getKeyFromFirstArgument, + 'ZCOUNT' => $getKeyFromFirstArgument, + 'ZINCRBY' => $getKeyFromFirstArgument, + 'ZINTERSTORE' => array($this, 'getKeyFromZsetAggregationCommands'), + 'ZRANGE' => $getKeyFromFirstArgument, + 'ZRANGEBYSCORE' => $getKeyFromFirstArgument, + 'ZRANK' => $getKeyFromFirstArgument, + 'ZREM' => $getKeyFromFirstArgument, + 'ZREMRANGEBYRANK' => $getKeyFromFirstArgument, + 'ZREMRANGEBYSCORE' => $getKeyFromFirstArgument, + 'ZREVRANGE' => $getKeyFromFirstArgument, + 'ZREVRANGEBYSCORE' => $getKeyFromFirstArgument, + 'ZREVRANK' => $getKeyFromFirstArgument, + 'ZSCORE' => $getKeyFromFirstArgument, + 'ZUNIONSTORE' => array($this, 'getKeyFromZsetAggregationCommands'), + 'ZSCAN' => $getKeyFromFirstArgument, + 'ZLEXCOUNT' => $getKeyFromFirstArgument, + 'ZRANGEBYLEX' => $getKeyFromFirstArgument, + 'ZREMRANGEBYLEX' => $getKeyFromFirstArgument, + 'ZREVRANGEBYLEX' => $getKeyFromFirstArgument, /* commands operating on hashes */ - 'HDEL' => $getKeyFromFirstArgument, - 'HEXISTS' => $getKeyFromFirstArgument, - 'HGET' => $getKeyFromFirstArgument, - 'HGETALL' => $getKeyFromFirstArgument, - 'HMGET' => $getKeyFromFirstArgument, - 'HMSET' => $getKeyFromFirstArgument, - 'HINCRBY' => $getKeyFromFirstArgument, - 'HINCRBYFLOAT' => $getKeyFromFirstArgument, - 'HKEYS' => $getKeyFromFirstArgument, - 'HLEN' => $getKeyFromFirstArgument, - 'HSET' => $getKeyFromFirstArgument, - 'HSETNX' => $getKeyFromFirstArgument, - 'HVALS' => $getKeyFromFirstArgument, - 'HSCAN' => $getKeyFromFirstArgument, + 'HDEL' => $getKeyFromFirstArgument, + 'HEXISTS' => $getKeyFromFirstArgument, + 'HGET' => $getKeyFromFirstArgument, + 'HGETALL' => $getKeyFromFirstArgument, + 'HMGET' => $getKeyFromFirstArgument, + 'HMSET' => $getKeyFromFirstArgument, + 'HINCRBY' => $getKeyFromFirstArgument, + 'HINCRBYFLOAT' => $getKeyFromFirstArgument, + 'HKEYS' => $getKeyFromFirstArgument, + 'HLEN' => $getKeyFromFirstArgument, + 'HSET' => $getKeyFromFirstArgument, + 'HSETNX' => $getKeyFromFirstArgument, + 'HVALS' => $getKeyFromFirstArgument, + 'HSCAN' => $getKeyFromFirstArgument, /* commands operating on HyperLogLog */ - 'PFADD' => $getKeyFromFirstArgument, - 'PFCOUNT' => $getKeyFromAllArguments, - 'PFMERGE' => $getKeyFromAllArguments, + 'PFADD' => $getKeyFromFirstArgument, + 'PFCOUNT' => $getKeyFromAllArguments, + 'PFMERGE' => $getKeyFromAllArguments, /* scripting */ - 'EVAL' => array($this, 'getKeyFromScriptingCommands'), - 'EVALSHA' => array($this, 'getKeyFromScriptingCommands'), + 'EVAL' => array($this, 'getKeyFromScriptingCommands'), + 'EVALSHA' => array($this, 'getKeyFromScriptingCommands'), ); } @@ -203,7 +203,7 @@ abstract class ClusterStrategy implements StrategyInterface if (!is_callable($callback)) { throw new InvalidArgumentException( - "The argument must be a callable object or NULL." + 'The argument must be a callable object or NULL.' ); } @@ -364,7 +364,7 @@ abstract class ClusterStrategy implements StrategyInterface $currentSlot = $this->getSlotByKey($keys[0]); - for ($i = 1; $i < $count; $i++) { + for ($i = 1; $i < $count; ++$i) { $nextSlot = $this->getSlotByKey($keys[$i]); if ($currentSlot !== $nextSlot) { diff --git a/src/Cluster/Distributor/HashRing.php b/src/Cluster/Distributor/HashRing.php index a2c14db7..db864d91 100644 --- a/src/Cluster/Distributor/HashRing.php +++ b/src/Cluster/Distributor/HashRing.php @@ -24,7 +24,7 @@ use Predis\Cluster\Hash\HashGeneratorInterface; class HashRing implements DistributorInterface, HashGeneratorInterface { const DEFAULT_REPLICAS = 128; - const DEFAULT_WEIGHT = 100; + const DEFAULT_WEIGHT = 100; private $ring; private $ringKeys; @@ -55,7 +55,7 @@ class HashRing implements DistributorInterface, HashGeneratorInterface // last wins, thus the order in which nodes are added is significant. $this->nodes[] = array( 'object' => $node, - 'weight' => (int) $weight ?: $this::DEFAULT_WEIGHT + 'weight' => (int) $weight ?: $this::DEFAULT_WEIGHT, ); $this->reset(); @@ -160,7 +160,7 @@ class HashRing implements DistributorInterface, HashGeneratorInterface $nodeHash = $this->getNodeHash($nodeObject); $replicas = (int) round($weightRatio * $totalNodes * $replicas); - for ($i = 0; $i < $replicas; $i++) { + for ($i = 0; $i < $replicas; ++$i) { $key = crc32("$nodeHash:$i"); $ring[$key] = $nodeObject; } diff --git a/src/Cluster/Distributor/KetamaRing.php b/src/Cluster/Distributor/KetamaRing.php index 5a715977..dc77f320 100644 --- a/src/Cluster/Distributor/KetamaRing.php +++ b/src/Cluster/Distributor/KetamaRing.php @@ -40,7 +40,7 @@ class KetamaRing extends HashRing $nodeHash = $this->getNodeHash($nodeObject); $replicas = (int) floor($weightRatio * $totalNodes * ($replicas / 4)); - for ($i = 0; $i < $replicas; $i++) { + for ($i = 0; $i < $replicas; ++$i) { $unpackedDigest = unpack('V4', md5("$nodeHash-$i", true)); foreach ($unpackedDigest as $key) { diff --git a/src/Cluster/Hash/CRC16.php b/src/Cluster/Hash/CRC16.php index 7e9ad0a0..3add0cef 100644 --- a/src/Cluster/Hash/CRC16.php +++ b/src/Cluster/Hash/CRC16.php @@ -63,7 +63,7 @@ class CRC16 implements HashGeneratorInterface $CCITT_16 = self::$CCITT_16; $strlen = strlen($value); - for ($i = 0; $i < $strlen; $i++) { + for ($i = 0; $i < $strlen; ++$i) { $crc = (($crc << 8) ^ $CCITT_16[($crc >> 8) ^ ord($value[$i])]) & 0xFFFF; } diff --git a/src/Cluster/PredisStrategy.php b/src/Cluster/PredisStrategy.php index bb9adaf2..20668427 100644 --- a/src/Cluster/PredisStrategy.php +++ b/src/Cluster/PredisStrategy.php @@ -56,7 +56,7 @@ class PredisStrategy extends ClusterStrategy $currentKey = $this->extractKeyTag($keys[0]); - for ($i = 1; $i < $count; $i++) { + for ($i = 1; $i < $count; ++$i) { $nextKey = $this->extractKeyTag($keys[$i]); if ($currentKey !== $nextKey) { diff --git a/src/Cluster/RedisStrategy.php b/src/Cluster/RedisStrategy.php index ff0e25e2..f3968db7 100644 --- a/src/Cluster/RedisStrategy.php +++ b/src/Cluster/RedisStrategy.php @@ -40,7 +40,7 @@ class RedisStrategy extends ClusterStrategy */ public function getSlotByKey($key) { - $key = $this->extractKeyTag($key); + $key = $this->extractKeyTag($key); $slot = $this->hashGenerator->hash($key) & 0x3FFF; return $slot; diff --git a/src/Collection/Iterator/CursorBasedIterator.php b/src/Collection/Iterator/CursorBasedIterator.php index 54160b1e..940c7aee 100644 --- a/src/Collection/Iterator/CursorBasedIterator.php +++ b/src/Collection/Iterator/CursorBasedIterator.php @@ -133,7 +133,7 @@ abstract class CursorBasedIterator implements Iterator */ protected function extractNext() { - $this->position++; + ++$this->position; $this->current = array_shift($this->elements); } diff --git a/src/Collection/Iterator/HashKey.php b/src/Collection/Iterator/HashKey.php index 196ecbc4..aa8aeaf0 100644 --- a/src/Collection/Iterator/HashKey.php +++ b/src/Collection/Iterator/HashKey.php @@ -18,6 +18,7 @@ use Predis\ClientInterface; * HSCAN command (Redis >= 2.8) wrapped in a fully-rewindable PHP iterator. * * @author Daniele Alessandri + * * @link http://redis.io/commands/scan */ class HashKey extends CursorBasedIterator diff --git a/src/Collection/Iterator/Keyspace.php b/src/Collection/Iterator/Keyspace.php index 43b1baac..5d985b9b 100644 --- a/src/Collection/Iterator/Keyspace.php +++ b/src/Collection/Iterator/Keyspace.php @@ -18,6 +18,7 @@ use Predis\ClientInterface; * SCAN command (Redis >= 2.8) wrapped in a fully-rewindable PHP iterator. * * @author Daniele Alessandri + * * @link http://redis.io/commands/scan */ class Keyspace extends CursorBasedIterator diff --git a/src/Collection/Iterator/ListKey.php b/src/Collection/Iterator/ListKey.php index e8d31ec1..89879262 100644 --- a/src/Collection/Iterator/ListKey.php +++ b/src/Collection/Iterator/ListKey.php @@ -27,6 +27,7 @@ use Predis\NotSupportedException; * times (trimmed, deleted, overwritten) during the iteration process. * * @author Daniele Alessandri + * * @link http://redis.io/commands/lrange */ class ListKey implements Iterator @@ -122,7 +123,7 @@ class ListKey implements Iterator */ protected function extractNext() { - $this->position++; + ++$this->position; $this->current = array_shift($this->elements); } diff --git a/src/Collection/Iterator/SetKey.php b/src/Collection/Iterator/SetKey.php index 32be218f..bf254397 100644 --- a/src/Collection/Iterator/SetKey.php +++ b/src/Collection/Iterator/SetKey.php @@ -18,6 +18,7 @@ use Predis\ClientInterface; * command (Redis >= 2.8) wrapped in a fully-rewindable PHP iterator. * * @author Daniele Alessandri + * * @link http://redis.io/commands/scan */ class SetKey extends CursorBasedIterator diff --git a/src/Collection/Iterator/SortedSetKey.php b/src/Collection/Iterator/SortedSetKey.php index f887c40c..e2f17892 100644 --- a/src/Collection/Iterator/SortedSetKey.php +++ b/src/Collection/Iterator/SortedSetKey.php @@ -18,6 +18,7 @@ use Predis\ClientInterface; * ZSCAN command (Redis >= 2.8) wrapped in a fully-rewindable PHP iterator. * * @author Daniele Alessandri + * * @link http://redis.io/commands/scan */ class SortedSetKey extends CursorBasedIterator diff --git a/src/Command/ConnectionAuth.php b/src/Command/ConnectionAuth.php index 86439b5d..c8c9dedc 100644 --- a/src/Command/ConnectionAuth.php +++ b/src/Command/ConnectionAuth.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/auth + * * @author Daniele Alessandri */ class ConnectionAuth extends Command diff --git a/src/Command/ConnectionEcho.php b/src/Command/ConnectionEcho.php index ce80eb31..fd496097 100644 --- a/src/Command/ConnectionEcho.php +++ b/src/Command/ConnectionEcho.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/echo + * * @author Daniele Alessandri */ class ConnectionEcho extends Command diff --git a/src/Command/ConnectionPing.php b/src/Command/ConnectionPing.php index f7e29ae9..fa9d7346 100644 --- a/src/Command/ConnectionPing.php +++ b/src/Command/ConnectionPing.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/ping + * * @author Daniele Alessandri */ class ConnectionPing extends Command diff --git a/src/Command/ConnectionQuit.php b/src/Command/ConnectionQuit.php index bbd9f0b5..e59e31e3 100644 --- a/src/Command/ConnectionQuit.php +++ b/src/Command/ConnectionQuit.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/quit + * * @author Daniele Alessandri */ class ConnectionQuit extends Command diff --git a/src/Command/ConnectionSelect.php b/src/Command/ConnectionSelect.php index 82a4ba4e..1da82567 100644 --- a/src/Command/ConnectionSelect.php +++ b/src/Command/ConnectionSelect.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/select + * * @author Daniele Alessandri */ class ConnectionSelect extends Command diff --git a/src/Command/HashDelete.php b/src/Command/HashDelete.php index fb102884..d5d4c38c 100644 --- a/src/Command/HashDelete.php +++ b/src/Command/HashDelete.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/hdel + * * @author Daniele Alessandri */ class HashDelete extends Command diff --git a/src/Command/HashExists.php b/src/Command/HashExists.php index 207f3965..ed8dc89f 100644 --- a/src/Command/HashExists.php +++ b/src/Command/HashExists.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/hexists + * * @author Daniele Alessandri */ class HashExists extends Command diff --git a/src/Command/HashGet.php b/src/Command/HashGet.php index a1a59ef8..20f33da5 100644 --- a/src/Command/HashGet.php +++ b/src/Command/HashGet.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/hget + * * @author Daniele Alessandri */ class HashGet extends Command diff --git a/src/Command/HashGetAll.php b/src/Command/HashGetAll.php index 232bd3c6..d6986752 100644 --- a/src/Command/HashGetAll.php +++ b/src/Command/HashGetAll.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/hgetall + * * @author Daniele Alessandri */ class HashGetAll extends Command @@ -32,7 +33,7 @@ class HashGetAll extends Command { $result = array(); - for ($i = 0; $i < count($data); $i++) { + for ($i = 0; $i < count($data); ++$i) { $result[$data[$i]] = $data[++$i]; } diff --git a/src/Command/HashGetMultiple.php b/src/Command/HashGetMultiple.php index d50db4d5..820ce958 100644 --- a/src/Command/HashGetMultiple.php +++ b/src/Command/HashGetMultiple.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/hmget + * * @author Daniele Alessandri */ class HashGetMultiple extends Command diff --git a/src/Command/HashIncrementBy.php b/src/Command/HashIncrementBy.php index 812afeb4..a37359ff 100644 --- a/src/Command/HashIncrementBy.php +++ b/src/Command/HashIncrementBy.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/hincrby + * * @author Daniele Alessandri */ class HashIncrementBy extends Command diff --git a/src/Command/HashIncrementByFloat.php b/src/Command/HashIncrementByFloat.php index 887d0646..bce9714f 100644 --- a/src/Command/HashIncrementByFloat.php +++ b/src/Command/HashIncrementByFloat.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/hincrbyfloat + * * @author Daniele Alessandri */ class HashIncrementByFloat extends Command diff --git a/src/Command/HashKeys.php b/src/Command/HashKeys.php index 0a0b9317..28266020 100644 --- a/src/Command/HashKeys.php +++ b/src/Command/HashKeys.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/hkeys + * * @author Daniele Alessandri */ class HashKeys extends Command diff --git a/src/Command/HashLength.php b/src/Command/HashLength.php index 8ae21b83..d70926f1 100644 --- a/src/Command/HashLength.php +++ b/src/Command/HashLength.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/hlen + * * @author Daniele Alessandri */ class HashLength extends Command diff --git a/src/Command/HashScan.php b/src/Command/HashScan.php index 0f104b85..afde74eb 100644 --- a/src/Command/HashScan.php +++ b/src/Command/HashScan.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/hscan + * * @author Daniele Alessandri */ class HashScan extends Command @@ -72,7 +73,7 @@ class HashScan extends Command $fields = $data[1]; $result = array(); - for ($i = 0; $i < count($fields); $i++) { + for ($i = 0; $i < count($fields); ++$i) { $result[$fields[$i]] = $fields[++$i]; } diff --git a/src/Command/HashSet.php b/src/Command/HashSet.php index f042c1e7..cfff3c2d 100644 --- a/src/Command/HashSet.php +++ b/src/Command/HashSet.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/hset + * * @author Daniele Alessandri */ class HashSet extends Command diff --git a/src/Command/HashSetMultiple.php b/src/Command/HashSetMultiple.php index d1e93e55..6069e2ad 100644 --- a/src/Command/HashSetMultiple.php +++ b/src/Command/HashSetMultiple.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/hmset + * * @author Daniele Alessandri */ class HashSetMultiple extends Command diff --git a/src/Command/HashSetPreserve.php b/src/Command/HashSetPreserve.php index c4a619ff..7a291164 100644 --- a/src/Command/HashSetPreserve.php +++ b/src/Command/HashSetPreserve.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/hsetnx + * * @author Daniele Alessandri */ class HashSetPreserve extends Command diff --git a/src/Command/HashValues.php b/src/Command/HashValues.php index 1437f447..0a5ea5f6 100644 --- a/src/Command/HashValues.php +++ b/src/Command/HashValues.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/hvals + * * @author Daniele Alessandri */ class HashValues extends Command diff --git a/src/Command/HyperLogLogAdd.php b/src/Command/HyperLogLogAdd.php index 772db9fc..8fe49fc9 100644 --- a/src/Command/HyperLogLogAdd.php +++ b/src/Command/HyperLogLogAdd.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/pfadd + * * @author Daniele Alessandri */ class HyperLogLogAdd extends Command diff --git a/src/Command/HyperLogLogCount.php b/src/Command/HyperLogLogCount.php index 231c6f41..0afe5427 100644 --- a/src/Command/HyperLogLogCount.php +++ b/src/Command/HyperLogLogCount.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/pfcount + * * @author Daniele Alessandri */ class HyperLogLogCount extends Command diff --git a/src/Command/HyperLogLogMerge.php b/src/Command/HyperLogLogMerge.php index 96746ac2..c160be5b 100644 --- a/src/Command/HyperLogLogMerge.php +++ b/src/Command/HyperLogLogMerge.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/pfmerge + * * @author Daniele Alessandri */ class HyperLogLogMerge extends Command diff --git a/src/Command/KeyDelete.php b/src/Command/KeyDelete.php index 04d617f9..89bdfdb7 100644 --- a/src/Command/KeyDelete.php +++ b/src/Command/KeyDelete.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/del + * * @author Daniele Alessandri */ class KeyDelete extends Command diff --git a/src/Command/KeyDump.php b/src/Command/KeyDump.php index 90ba927a..6d9c4880 100644 --- a/src/Command/KeyDump.php +++ b/src/Command/KeyDump.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/dump + * * @author Daniele Alessandri */ class KeyDump extends Command diff --git a/src/Command/KeyExists.php b/src/Command/KeyExists.php index aa4516dc..29e06480 100644 --- a/src/Command/KeyExists.php +++ b/src/Command/KeyExists.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/exists + * * @author Daniele Alessandri */ class KeyExists extends Command diff --git a/src/Command/KeyExpire.php b/src/Command/KeyExpire.php index da384363..66f44066 100644 --- a/src/Command/KeyExpire.php +++ b/src/Command/KeyExpire.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/expire + * * @author Daniele Alessandri */ class KeyExpire extends Command diff --git a/src/Command/KeyExpireAt.php b/src/Command/KeyExpireAt.php index 8d7b87c0..0ae1b2d4 100644 --- a/src/Command/KeyExpireAt.php +++ b/src/Command/KeyExpireAt.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/expireat + * * @author Daniele Alessandri */ class KeyExpireAt extends Command diff --git a/src/Command/KeyKeys.php b/src/Command/KeyKeys.php index 2c19ffc4..6d74c40d 100644 --- a/src/Command/KeyKeys.php +++ b/src/Command/KeyKeys.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/keys + * * @author Daniele Alessandri */ class KeyKeys extends Command diff --git a/src/Command/KeyMigrate.php b/src/Command/KeyMigrate.php index cce0a448..3324ef94 100644 --- a/src/Command/KeyMigrate.php +++ b/src/Command/KeyMigrate.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/migrate + * * @author Daniele Alessandri */ class KeyMigrate extends Command diff --git a/src/Command/KeyMove.php b/src/Command/KeyMove.php index 0726c9f2..c849f08d 100644 --- a/src/Command/KeyMove.php +++ b/src/Command/KeyMove.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/move + * * @author Daniele Alessandri */ class KeyMove extends Command diff --git a/src/Command/KeyPersist.php b/src/Command/KeyPersist.php index 1d17f450..f0cb679b 100644 --- a/src/Command/KeyPersist.php +++ b/src/Command/KeyPersist.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/persist + * * @author Daniele Alessandri */ class KeyPersist extends Command diff --git a/src/Command/KeyPreciseExpire.php b/src/Command/KeyPreciseExpire.php index 3fb86787..258ec476 100644 --- a/src/Command/KeyPreciseExpire.php +++ b/src/Command/KeyPreciseExpire.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/pexpire + * * @author Daniele Alessandri */ class KeyPreciseExpire extends KeyExpire diff --git a/src/Command/KeyPreciseExpireAt.php b/src/Command/KeyPreciseExpireAt.php index 14697f2a..e4192187 100644 --- a/src/Command/KeyPreciseExpireAt.php +++ b/src/Command/KeyPreciseExpireAt.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/pexpireat + * * @author Daniele Alessandri */ class KeyPreciseExpireAt extends KeyExpireAt diff --git a/src/Command/KeyPreciseTimeToLive.php b/src/Command/KeyPreciseTimeToLive.php index 92e3a029..bdcd34b9 100644 --- a/src/Command/KeyPreciseTimeToLive.php +++ b/src/Command/KeyPreciseTimeToLive.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/pttl + * * @author Daniele Alessandri */ class KeyPreciseTimeToLive extends KeyTimeToLive diff --git a/src/Command/KeyRandom.php b/src/Command/KeyRandom.php index dd26b5e5..b208b2db 100644 --- a/src/Command/KeyRandom.php +++ b/src/Command/KeyRandom.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/randomkey + * * @author Daniele Alessandri */ class KeyRandom extends Command diff --git a/src/Command/KeyRename.php b/src/Command/KeyRename.php index 06980d4c..82e44fb2 100644 --- a/src/Command/KeyRename.php +++ b/src/Command/KeyRename.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/rename + * * @author Daniele Alessandri */ class KeyRename extends Command diff --git a/src/Command/KeyRenamePreserve.php b/src/Command/KeyRenamePreserve.php index 37a110d2..97933599 100644 --- a/src/Command/KeyRenamePreserve.php +++ b/src/Command/KeyRenamePreserve.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/renamenx + * * @author Daniele Alessandri */ class KeyRenamePreserve extends KeyRename diff --git a/src/Command/KeyRestore.php b/src/Command/KeyRestore.php index a4457a48..a5b0b2db 100644 --- a/src/Command/KeyRestore.php +++ b/src/Command/KeyRestore.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/restore + * * @author Daniele Alessandri */ class KeyRestore extends Command diff --git a/src/Command/KeyScan.php b/src/Command/KeyScan.php index ed1ced9d..05f5bb3a 100644 --- a/src/Command/KeyScan.php +++ b/src/Command/KeyScan.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/scan + * * @author Daniele Alessandri */ class KeyScan extends Command diff --git a/src/Command/KeySort.php b/src/Command/KeySort.php index 1971cd23..fd449f13 100644 --- a/src/Command/KeySort.php +++ b/src/Command/KeySort.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/sort + * * @author Daniele Alessandri */ class KeySort extends Command @@ -59,7 +60,6 @@ class KeySort extends Command if (isset($sortParams['LIMIT']) && is_array($sortParams['LIMIT']) && count($sortParams['LIMIT']) == 2) { - $query[] = 'LIMIT'; $query[] = $sortParams['LIMIT'][0]; $query[] = $sortParams['LIMIT'][1]; diff --git a/src/Command/KeyTimeToLive.php b/src/Command/KeyTimeToLive.php index a3c56cc5..67697a6f 100644 --- a/src/Command/KeyTimeToLive.php +++ b/src/Command/KeyTimeToLive.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/ttl + * * @author Daniele Alessandri */ class KeyTimeToLive extends Command diff --git a/src/Command/KeyType.php b/src/Command/KeyType.php index 4bce3b03..f4f06e45 100644 --- a/src/Command/KeyType.php +++ b/src/Command/KeyType.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/type + * * @author Daniele Alessandri */ class KeyType extends Command diff --git a/src/Command/ListIndex.php b/src/Command/ListIndex.php index 2aa46f1b..27c64be7 100644 --- a/src/Command/ListIndex.php +++ b/src/Command/ListIndex.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/lindex + * * @author Daniele Alessandri */ class ListIndex extends Command diff --git a/src/Command/ListInsert.php b/src/Command/ListInsert.php index 857bcb5a..7d53d11b 100644 --- a/src/Command/ListInsert.php +++ b/src/Command/ListInsert.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/linsert + * * @author Daniele Alessandri */ class ListInsert extends Command diff --git a/src/Command/ListLength.php b/src/Command/ListLength.php index 2e6e7c37..6495beb7 100644 --- a/src/Command/ListLength.php +++ b/src/Command/ListLength.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/llen + * * @author Daniele Alessandri */ class ListLength extends Command diff --git a/src/Command/ListPopFirst.php b/src/Command/ListPopFirst.php index 1c9a6fe2..84d5d673 100644 --- a/src/Command/ListPopFirst.php +++ b/src/Command/ListPopFirst.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/lpop + * * @author Daniele Alessandri */ class ListPopFirst extends Command diff --git a/src/Command/ListPopFirstBlocking.php b/src/Command/ListPopFirstBlocking.php index 2e5942dd..7dc7c000 100644 --- a/src/Command/ListPopFirstBlocking.php +++ b/src/Command/ListPopFirstBlocking.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/blpop + * * @author Daniele Alessandri */ class ListPopFirstBlocking extends Command diff --git a/src/Command/ListPopLast.php b/src/Command/ListPopLast.php index 748d0e9b..9e92db5f 100644 --- a/src/Command/ListPopLast.php +++ b/src/Command/ListPopLast.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/rpop + * * @author Daniele Alessandri */ class ListPopLast extends Command diff --git a/src/Command/ListPopLastBlocking.php b/src/Command/ListPopLastBlocking.php index fc3d4214..781eb919 100644 --- a/src/Command/ListPopLastBlocking.php +++ b/src/Command/ListPopLastBlocking.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/brpop + * * @author Daniele Alessandri */ class ListPopLastBlocking extends ListPopFirstBlocking diff --git a/src/Command/ListPopLastPushHead.php b/src/Command/ListPopLastPushHead.php index e75ac62b..f430eb22 100644 --- a/src/Command/ListPopLastPushHead.php +++ b/src/Command/ListPopLastPushHead.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/rpoplpush + * * @author Daniele Alessandri */ class ListPopLastPushHead extends Command diff --git a/src/Command/ListPopLastPushHeadBlocking.php b/src/Command/ListPopLastPushHeadBlocking.php index b8aa94db..ee9c93c8 100644 --- a/src/Command/ListPopLastPushHeadBlocking.php +++ b/src/Command/ListPopLastPushHeadBlocking.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/brpoplpush + * * @author Daniele Alessandri */ class ListPopLastPushHeadBlocking extends Command diff --git a/src/Command/ListPushHead.php b/src/Command/ListPushHead.php index 6dcb61ba..74bf7c49 100644 --- a/src/Command/ListPushHead.php +++ b/src/Command/ListPushHead.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/lpush + * * @author Daniele Alessandri */ class ListPushHead extends ListPushTail diff --git a/src/Command/ListPushHeadX.php b/src/Command/ListPushHeadX.php index 98fa28c7..8e136b88 100644 --- a/src/Command/ListPushHeadX.php +++ b/src/Command/ListPushHeadX.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/lpushx + * * @author Daniele Alessandri */ class ListPushHeadX extends Command diff --git a/src/Command/ListPushTail.php b/src/Command/ListPushTail.php index 204b4e84..f2a057c0 100644 --- a/src/Command/ListPushTail.php +++ b/src/Command/ListPushTail.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/rpush + * * @author Daniele Alessandri */ class ListPushTail extends Command diff --git a/src/Command/ListPushTailX.php b/src/Command/ListPushTailX.php index bb530a94..1af3645b 100644 --- a/src/Command/ListPushTailX.php +++ b/src/Command/ListPushTailX.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/rpushx + * * @author Daniele Alessandri */ class ListPushTailX extends Command diff --git a/src/Command/ListRange.php b/src/Command/ListRange.php index cac7c3c0..32a21a6e 100644 --- a/src/Command/ListRange.php +++ b/src/Command/ListRange.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/lrange + * * @author Daniele Alessandri */ class ListRange extends Command diff --git a/src/Command/ListRemove.php b/src/Command/ListRemove.php index 384e7c78..c5800899 100644 --- a/src/Command/ListRemove.php +++ b/src/Command/ListRemove.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/lrem + * * @author Daniele Alessandri */ class ListRemove extends Command diff --git a/src/Command/ListSet.php b/src/Command/ListSet.php index 0af2dcbc..5e59864d 100644 --- a/src/Command/ListSet.php +++ b/src/Command/ListSet.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/lset + * * @author Daniele Alessandri */ class ListSet extends Command diff --git a/src/Command/ListTrim.php b/src/Command/ListTrim.php index 0ee49df6..19314180 100644 --- a/src/Command/ListTrim.php +++ b/src/Command/ListTrim.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/ltrim + * * @author Daniele Alessandri */ class ListTrim extends Command diff --git a/src/Command/Processor/KeyPrefixProcessor.php b/src/Command/Processor/KeyPrefixProcessor.php index bbf6734b..1ad0bf82 100644 --- a/src/Command/Processor/KeyPrefixProcessor.php +++ b/src/Command/Processor/KeyPrefixProcessor.php @@ -34,130 +34,130 @@ class KeyPrefixProcessor implements ProcessorInterface $this->prefix = $prefix; $this->commands = array( /* ---------------- Redis 1.2 ---------------- */ - 'EXISTS' => 'self::first', - 'DEL' => 'self::all', - 'TYPE' => 'self::first', - 'KEYS' => 'self::first', - 'RENAME' => 'self::all', - 'RENAMENX' => 'self::all', - 'EXPIRE' => 'self::first', - 'EXPIREAT' => 'self::first', - 'TTL' => 'self::first', - 'MOVE' => 'self::first', - 'SORT' => 'self::sort', - 'DUMP' => 'self::first', - 'RESTORE' => 'self::first', - 'SET' => 'self::first', - 'SETNX' => 'self::first', - 'MSET' => 'self::interleaved', - 'MSETNX' => 'self::interleaved', - 'GET' => 'self::first', - 'MGET' => 'self::all', - 'GETSET' => 'self::first', - 'INCR' => 'self::first', - 'INCRBY' => 'self::first', - 'DECR' => 'self::first', - 'DECRBY' => 'self::first', - 'RPUSH' => 'self::first', - 'LPUSH' => 'self::first', - 'LLEN' => 'self::first', - 'LRANGE' => 'self::first', - 'LTRIM' => 'self::first', - 'LINDEX' => 'self::first', - 'LSET' => 'self::first', - 'LREM' => 'self::first', - 'LPOP' => 'self::first', - 'RPOP' => 'self::first', - 'RPOPLPUSH' => 'self::all', - 'SADD' => 'self::first', - 'SREM' => 'self::first', - 'SPOP' => 'self::first', - 'SMOVE' => 'self::skipLast', - 'SCARD' => 'self::first', - 'SISMEMBER' => 'self::first', - 'SINTER' => 'self::all', - 'SINTERSTORE' => 'self::all', - 'SUNION' => 'self::all', - 'SUNIONSTORE' => 'self::all', - 'SDIFF' => 'self::all', - 'SDIFFSTORE' => 'self::all', - 'SMEMBERS' => 'self::first', - 'SRANDMEMBER' => 'self::first', - 'ZADD' => 'self::first', - 'ZINCRBY' => 'self::first', - 'ZREM' => 'self::first', - 'ZRANGE' => 'self::first', - 'ZREVRANGE' => 'self::first', - 'ZRANGEBYSCORE' => 'self::first', - 'ZCARD' => 'self::first', - 'ZSCORE' => 'self::first', - 'ZREMRANGEBYSCORE' => 'self::first', + 'EXISTS' => 'self::first', + 'DEL' => 'self::all', + 'TYPE' => 'self::first', + 'KEYS' => 'self::first', + 'RENAME' => 'self::all', + 'RENAMENX' => 'self::all', + 'EXPIRE' => 'self::first', + 'EXPIREAT' => 'self::first', + 'TTL' => 'self::first', + 'MOVE' => 'self::first', + 'SORT' => 'self::sort', + 'DUMP' => 'self::first', + 'RESTORE' => 'self::first', + 'SET' => 'self::first', + 'SETNX' => 'self::first', + 'MSET' => 'self::interleaved', + 'MSETNX' => 'self::interleaved', + 'GET' => 'self::first', + 'MGET' => 'self::all', + 'GETSET' => 'self::first', + 'INCR' => 'self::first', + 'INCRBY' => 'self::first', + 'DECR' => 'self::first', + 'DECRBY' => 'self::first', + 'RPUSH' => 'self::first', + 'LPUSH' => 'self::first', + 'LLEN' => 'self::first', + 'LRANGE' => 'self::first', + 'LTRIM' => 'self::first', + 'LINDEX' => 'self::first', + 'LSET' => 'self::first', + 'LREM' => 'self::first', + 'LPOP' => 'self::first', + 'RPOP' => 'self::first', + 'RPOPLPUSH' => 'self::all', + 'SADD' => 'self::first', + 'SREM' => 'self::first', + 'SPOP' => 'self::first', + 'SMOVE' => 'self::skipLast', + 'SCARD' => 'self::first', + 'SISMEMBER' => 'self::first', + 'SINTER' => 'self::all', + 'SINTERSTORE' => 'self::all', + 'SUNION' => 'self::all', + 'SUNIONSTORE' => 'self::all', + 'SDIFF' => 'self::all', + 'SDIFFSTORE' => 'self::all', + 'SMEMBERS' => 'self::first', + 'SRANDMEMBER' => 'self::first', + 'ZADD' => 'self::first', + 'ZINCRBY' => 'self::first', + 'ZREM' => 'self::first', + 'ZRANGE' => 'self::first', + 'ZREVRANGE' => 'self::first', + 'ZRANGEBYSCORE' => 'self::first', + 'ZCARD' => 'self::first', + 'ZSCORE' => 'self::first', + 'ZREMRANGEBYSCORE' => 'self::first', /* ---------------- Redis 2.0 ---------------- */ - 'SETEX' => 'self::first', - 'APPEND' => 'self::first', - 'SUBSTR' => 'self::first', - 'BLPOP' => 'self::skipLast', - 'BRPOP' => 'self::skipLast', - 'ZUNIONSTORE' => 'self::zsetStore', - 'ZINTERSTORE' => 'self::zsetStore', - 'ZCOUNT' => 'self::first', - 'ZRANK' => 'self::first', - 'ZREVRANK' => 'self::first', - 'ZREMRANGEBYRANK' => 'self::first', - 'HSET' => 'self::first', - 'HSETNX' => 'self::first', - 'HMSET' => 'self::first', - 'HINCRBY' => 'self::first', - 'HGET' => 'self::first', - 'HMGET' => 'self::first', - 'HDEL' => 'self::first', - 'HEXISTS' => 'self::first', - 'HLEN' => 'self::first', - 'HKEYS' => 'self::first', - 'HVALS' => 'self::first', - 'HGETALL' => 'self::first', - 'SUBSCRIBE' => 'self::all', - 'UNSUBSCRIBE' => 'self::all', - 'PSUBSCRIBE' => 'self::all', - 'PUNSUBSCRIBE' => 'self::all', - 'PUBLISH' => 'self::first', + 'SETEX' => 'self::first', + 'APPEND' => 'self::first', + 'SUBSTR' => 'self::first', + 'BLPOP' => 'self::skipLast', + 'BRPOP' => 'self::skipLast', + 'ZUNIONSTORE' => 'self::zsetStore', + 'ZINTERSTORE' => 'self::zsetStore', + 'ZCOUNT' => 'self::first', + 'ZRANK' => 'self::first', + 'ZREVRANK' => 'self::first', + 'ZREMRANGEBYRANK' => 'self::first', + 'HSET' => 'self::first', + 'HSETNX' => 'self::first', + 'HMSET' => 'self::first', + 'HINCRBY' => 'self::first', + 'HGET' => 'self::first', + 'HMGET' => 'self::first', + 'HDEL' => 'self::first', + 'HEXISTS' => 'self::first', + 'HLEN' => 'self::first', + 'HKEYS' => 'self::first', + 'HVALS' => 'self::first', + 'HGETALL' => 'self::first', + 'SUBSCRIBE' => 'self::all', + 'UNSUBSCRIBE' => 'self::all', + 'PSUBSCRIBE' => 'self::all', + 'PUNSUBSCRIBE' => 'self::all', + 'PUBLISH' => 'self::first', /* ---------------- Redis 2.2 ---------------- */ - 'PERSIST' => 'self::first', - 'STRLEN' => 'self::first', - 'SETRANGE' => 'self::first', - 'GETRANGE' => 'self::first', - 'SETBIT' => 'self::first', - 'GETBIT' => 'self::first', - 'RPUSHX' => 'self::first', - 'LPUSHX' => 'self::first', - 'LINSERT' => 'self::first', - 'BRPOPLPUSH' => 'self::skipLast', - 'ZREVRANGEBYSCORE' => 'self::first', - 'WATCH' => 'self::all', + 'PERSIST' => 'self::first', + 'STRLEN' => 'self::first', + 'SETRANGE' => 'self::first', + 'GETRANGE' => 'self::first', + 'SETBIT' => 'self::first', + 'GETBIT' => 'self::first', + 'RPUSHX' => 'self::first', + 'LPUSHX' => 'self::first', + 'LINSERT' => 'self::first', + 'BRPOPLPUSH' => 'self::skipLast', + 'ZREVRANGEBYSCORE' => 'self::first', + 'WATCH' => 'self::all', /* ---------------- Redis 2.6 ---------------- */ - 'PTTL' => 'self::first', - 'PEXPIRE' => 'self::first', - 'PEXPIREAT' => 'self::first', - 'PSETEX' => 'self::first', - 'INCRBYFLOAT' => 'self::first', - 'BITOP' => 'self::skipFirst', - 'BITCOUNT' => 'self::first', - 'HINCRBYFLOAT' => 'self::first', - 'EVAL' => 'self::evalKeys', - 'EVALSHA' => 'self::evalKeys', - 'MIGRATE' => 'self::migrate', + 'PTTL' => 'self::first', + 'PEXPIRE' => 'self::first', + 'PEXPIREAT' => 'self::first', + 'PSETEX' => 'self::first', + 'INCRBYFLOAT' => 'self::first', + 'BITOP' => 'self::skipFirst', + 'BITCOUNT' => 'self::first', + 'HINCRBYFLOAT' => 'self::first', + 'EVAL' => 'self::evalKeys', + 'EVALSHA' => 'self::evalKeys', + 'MIGRATE' => 'self::migrate', /* ---------------- Redis 2.8 ---------------- */ - 'SSCAN' => 'self::first', - 'ZSCAN' => 'self::first', - 'HSCAN' => 'self::first', - 'PFADD' => 'self::first', - 'PFCOUNT' => 'self::all', - 'PFMERGE' => 'self::all', - 'ZLEXCOUNT' => 'self::first', - 'ZRANGEBYLEX' => 'self::first', - 'ZREMRANGEBYLEX' => 'self::first', - 'ZREVRANGEBYLEX' => 'self::first', - 'BITPOS' => 'self::first', + 'SSCAN' => 'self::first', + 'ZSCAN' => 'self::first', + 'HSCAN' => 'self::first', + 'PFADD' => 'self::first', + 'PFCOUNT' => 'self::all', + 'PFMERGE' => 'self::all', + 'ZLEXCOUNT' => 'self::first', + 'ZRANGEBYLEX' => 'self::first', + 'ZREMRANGEBYLEX' => 'self::first', + 'ZREVRANGEBYLEX' => 'self::first', + 'BITPOS' => 'self::first', ); } @@ -221,7 +221,7 @@ class KeyPrefixProcessor implements ProcessorInterface if (!is_callable($callback)) { throw new InvalidArgumentException( - "Callback must be a valid callable object or NULL" + 'Callback must be a valid callable object or NULL' ); } @@ -297,7 +297,7 @@ class KeyPrefixProcessor implements ProcessorInterface if ($arguments = $command->getArguments()) { $length = count($arguments); - for ($i = 1; $i < $length; $i++) { + for ($i = 1; $i < $length; ++$i) { $arguments[$i] = "$prefix{$arguments[$i]}"; } @@ -316,7 +316,7 @@ class KeyPrefixProcessor implements ProcessorInterface if ($arguments = $command->getArguments()) { $length = count($arguments); - for ($i = 0; $i < $length - 1; $i++) { + for ($i = 0; $i < $length - 1; ++$i) { $arguments[$i] = "$prefix{$arguments[$i]}"; } @@ -336,7 +336,7 @@ class KeyPrefixProcessor implements ProcessorInterface $arguments[0] = "$prefix{$arguments[0]}"; if (($count = count($arguments)) > 1) { - for ($i = 1; $i < $count; $i++) { + for ($i = 1; $i < $count; ++$i) { switch ($arguments[$i]) { case 'BY': case 'STORE': @@ -370,7 +370,7 @@ class KeyPrefixProcessor implements ProcessorInterface public static function evalKeys(CommandInterface $command, $prefix) { if ($arguments = $command->getArguments()) { - for ($i = 2; $i < $arguments[1] + 2; $i++) { + for ($i = 2; $i < $arguments[1] + 2; ++$i) { $arguments[$i] = "$prefix{$arguments[$i]}"; } @@ -390,7 +390,7 @@ class KeyPrefixProcessor implements ProcessorInterface $arguments[0] = "$prefix{$arguments[0]}"; $length = ((int) $arguments[1]) + 2; - for ($i = 2; $i < $length; $i++) { + for ($i = 2; $i < $length; ++$i) { $arguments[$i] = "$prefix{$arguments[$i]}"; } diff --git a/src/Command/Processor/ProcessorChain.php b/src/Command/Processor/ProcessorChain.php index 018a9872..e5f0071b 100644 --- a/src/Command/Processor/ProcessorChain.php +++ b/src/Command/Processor/ProcessorChain.php @@ -58,7 +58,7 @@ class ProcessorChain implements ArrayAccess, ProcessorInterface */ public function process(CommandInterface $command) { - for ($i = 0; $i < $count = count($this->processors); $i++) { + for ($i = 0; $i < $count = count($this->processors); ++$i) { $this->processors[$i]->process($command); } } @@ -114,7 +114,7 @@ class ProcessorChain implements ArrayAccess, ProcessorInterface { if (!$processor instanceof ProcessorInterface) { throw new InvalidArgumentException( - "A processor chain accepts only instances of ". + 'A processor chain accepts only instances of '. "'Predis\Command\Processor\ProcessorInterface'." ); } diff --git a/src/Command/PubSubPublish.php b/src/Command/PubSubPublish.php index d332ee9b..55508f8d 100644 --- a/src/Command/PubSubPublish.php +++ b/src/Command/PubSubPublish.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/publish + * * @author Daniele Alessandri */ class PubSubPublish extends Command diff --git a/src/Command/PubSubPubsub.php b/src/Command/PubSubPubsub.php index 12ad116a..8cf81297 100644 --- a/src/Command/PubSubPubsub.php +++ b/src/Command/PubSubPubsub.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/pubsub + * * @author Daniele Alessandri */ class PubSubPubsub extends Command @@ -51,7 +52,7 @@ class PubSubPubsub extends Command $processed = array(); $count = count($channels); - for ($i = 0; $i < $count; $i++) { + for ($i = 0; $i < $count; ++$i) { $processed[$channels[$i]] = $channels[++$i]; } diff --git a/src/Command/PubSubSubscribe.php b/src/Command/PubSubSubscribe.php index f965e6c7..e477b313 100644 --- a/src/Command/PubSubSubscribe.php +++ b/src/Command/PubSubSubscribe.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/subscribe + * * @author Daniele Alessandri */ class PubSubSubscribe extends Command diff --git a/src/Command/PubSubSubscribeByPattern.php b/src/Command/PubSubSubscribeByPattern.php index 7629e6df..01182806 100644 --- a/src/Command/PubSubSubscribeByPattern.php +++ b/src/Command/PubSubSubscribeByPattern.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/psubscribe + * * @author Daniele Alessandri */ class PubSubSubscribeByPattern extends PubSubSubscribe diff --git a/src/Command/PubSubUnsubscribe.php b/src/Command/PubSubUnsubscribe.php index ad972808..d57c3ac6 100644 --- a/src/Command/PubSubUnsubscribe.php +++ b/src/Command/PubSubUnsubscribe.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/unsubscribe + * * @author Daniele Alessandri */ class PubSubUnsubscribe extends Command diff --git a/src/Command/PubSubUnsubscribeByPattern.php b/src/Command/PubSubUnsubscribeByPattern.php index f846e658..4d76508b 100644 --- a/src/Command/PubSubUnsubscribeByPattern.php +++ b/src/Command/PubSubUnsubscribeByPattern.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/punsubscribe + * * @author Daniele Alessandri */ class PubSubUnsubscribeByPattern extends PubSubUnsubscribe diff --git a/src/Command/ScriptCommand.php b/src/Command/ScriptCommand.php index 1ea20333..a30bc1d2 100644 --- a/src/Command/ScriptCommand.php +++ b/src/Command/ScriptCommand.php @@ -16,6 +16,7 @@ namespace Predis\Command; * on Lua scripting with EVAL and EVALSHA. * * @link http://redis.io/commands/eval + * * @author Daniele Alessandri */ abstract class ScriptCommand extends ServerEvalSHA diff --git a/src/Command/ServerBackgroundRewriteAOF.php b/src/Command/ServerBackgroundRewriteAOF.php index 8b1f1af1..c66a294e 100644 --- a/src/Command/ServerBackgroundRewriteAOF.php +++ b/src/Command/ServerBackgroundRewriteAOF.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/bgrewriteaof + * * @author Daniele Alessandri */ class ServerBackgroundRewriteAOF extends Command diff --git a/src/Command/ServerBackgroundSave.php b/src/Command/ServerBackgroundSave.php index e5b08505..4bf67ef3 100644 --- a/src/Command/ServerBackgroundSave.php +++ b/src/Command/ServerBackgroundSave.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/bgsave + * * @author Daniele Alessandri */ class ServerBackgroundSave extends Command diff --git a/src/Command/ServerClient.php b/src/Command/ServerClient.php index a30f53f0..d00ebbff 100644 --- a/src/Command/ServerClient.php +++ b/src/Command/ServerClient.php @@ -16,6 +16,7 @@ namespace Predis\Command; * @link http://redis.io/commands/client-kill * @link http://redis.io/commands/client-getname * @link http://redis.io/commands/client-setname + * * @author Daniele Alessandri */ class ServerClient extends Command diff --git a/src/Command/ServerCommand.php b/src/Command/ServerCommand.php index 62bacf7f..e9b3393c 100644 --- a/src/Command/ServerCommand.php +++ b/src/Command/ServerCommand.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/command + * * @author Daniele Alessandri */ class ServerCommand extends Command diff --git a/src/Command/ServerConfig.php b/src/Command/ServerConfig.php index 22a6c2aa..81e497ae 100644 --- a/src/Command/ServerConfig.php +++ b/src/Command/ServerConfig.php @@ -16,6 +16,7 @@ namespace Predis\Command; * @link http://redis.io/commands/config-get * @link http://redis.io/commands/config-resetstat * @link http://redis.io/commands/config-rewrite + * * @author Daniele Alessandri */ class ServerConfig extends Command @@ -36,7 +37,7 @@ class ServerConfig extends Command if (is_array($data)) { $result = array(); - for ($i = 0; $i < count($data); $i++) { + for ($i = 0; $i < count($data); ++$i) { $result[$data[$i]] = $data[++$i]; } diff --git a/src/Command/ServerDatabaseSize.php b/src/Command/ServerDatabaseSize.php index 746b7e43..6bc89724 100644 --- a/src/Command/ServerDatabaseSize.php +++ b/src/Command/ServerDatabaseSize.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/dbsize + * * @author Daniele Alessandri */ class ServerDatabaseSize extends Command diff --git a/src/Command/ServerEval.php b/src/Command/ServerEval.php index 16cd7b36..f5eefd81 100644 --- a/src/Command/ServerEval.php +++ b/src/Command/ServerEval.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/eval + * * @author Daniele Alessandri */ class ServerEval extends Command diff --git a/src/Command/ServerEvalSHA.php b/src/Command/ServerEvalSHA.php index a670390f..520a8e98 100644 --- a/src/Command/ServerEvalSHA.php +++ b/src/Command/ServerEvalSHA.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/evalsha + * * @author Daniele Alessandri */ class ServerEvalSHA extends ServerEval diff --git a/src/Command/ServerFlushAll.php b/src/Command/ServerFlushAll.php index 98531d26..c35b2ad6 100644 --- a/src/Command/ServerFlushAll.php +++ b/src/Command/ServerFlushAll.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/flushall + * * @author Daniele Alessandri */ class ServerFlushAll extends Command diff --git a/src/Command/ServerFlushDatabase.php b/src/Command/ServerFlushDatabase.php index e79955eb..3da6b320 100644 --- a/src/Command/ServerFlushDatabase.php +++ b/src/Command/ServerFlushDatabase.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/flushdb + * * @author Daniele Alessandri */ class ServerFlushDatabase extends Command diff --git a/src/Command/ServerInfo.php b/src/Command/ServerInfo.php index 3cfabd3c..96d6adad 100644 --- a/src/Command/ServerInfo.php +++ b/src/Command/ServerInfo.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/info + * * @author Daniele Alessandri */ class ServerInfo extends Command @@ -30,7 +31,7 @@ class ServerInfo extends Command */ public function parseResponse($data) { - $info = array(); + $info = array(); $infoLines = preg_split('/\r?\n/', $data); foreach ($infoLines as $row) { diff --git a/src/Command/ServerInfoV26x.php b/src/Command/ServerInfoV26x.php index c5034eaf..90c9b716 100644 --- a/src/Command/ServerInfoV26x.php +++ b/src/Command/ServerInfoV26x.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/info + * * @author Daniele Alessandri */ class ServerInfoV26x extends ServerInfo diff --git a/src/Command/ServerLastSave.php b/src/Command/ServerLastSave.php index a9f59a36..feeb19a8 100644 --- a/src/Command/ServerLastSave.php +++ b/src/Command/ServerLastSave.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/lastsave + * * @author Daniele Alessandri */ class ServerLastSave extends Command diff --git a/src/Command/ServerMonitor.php b/src/Command/ServerMonitor.php index 729d9579..1c3d3309 100644 --- a/src/Command/ServerMonitor.php +++ b/src/Command/ServerMonitor.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/monitor + * * @author Daniele Alessandri */ class ServerMonitor extends Command diff --git a/src/Command/ServerObject.php b/src/Command/ServerObject.php index d57302a1..f921701c 100644 --- a/src/Command/ServerObject.php +++ b/src/Command/ServerObject.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/object + * * @author Daniele Alessandri */ class ServerObject extends Command diff --git a/src/Command/ServerSave.php b/src/Command/ServerSave.php index 2fdb6e50..addefe20 100644 --- a/src/Command/ServerSave.php +++ b/src/Command/ServerSave.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/save + * * @author Daniele Alessandri */ class ServerSave extends Command diff --git a/src/Command/ServerScript.php b/src/Command/ServerScript.php index d0114408..7a01018d 100644 --- a/src/Command/ServerScript.php +++ b/src/Command/ServerScript.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/script + * * @author Daniele Alessandri */ class ServerScript extends Command diff --git a/src/Command/ServerSentinel.php b/src/Command/ServerSentinel.php index cbd1ed59..c0962db3 100644 --- a/src/Command/ServerSentinel.php +++ b/src/Command/ServerSentinel.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/topics/sentinel + * * @author Daniele Alessandri */ class ServerSentinel extends Command @@ -53,7 +54,7 @@ class ServerSentinel extends Command $processed = array(); $count = count($node); - for ($i = 0; $i < $count; $i++) { + for ($i = 0; $i < $count; ++$i) { $processed[$node[$i]] = $node[++$i]; } diff --git a/src/Command/ServerShutdown.php b/src/Command/ServerShutdown.php index 5649f8dc..f5b745a2 100644 --- a/src/Command/ServerShutdown.php +++ b/src/Command/ServerShutdown.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/shutdown + * * @author Daniele Alessandri */ class ServerShutdown extends Command diff --git a/src/Command/ServerSlaveOf.php b/src/Command/ServerSlaveOf.php index b39fb9f1..4ff44556 100644 --- a/src/Command/ServerSlaveOf.php +++ b/src/Command/ServerSlaveOf.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/slaveof + * * @author Daniele Alessandri */ class ServerSlaveOf extends Command diff --git a/src/Command/ServerSlowlog.php b/src/Command/ServerSlowlog.php index 8a2faa17..137ff59e 100644 --- a/src/Command/ServerSlowlog.php +++ b/src/Command/ServerSlowlog.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/slowlog + * * @author Daniele Alessandri */ class ServerSlowlog extends Command diff --git a/src/Command/ServerTime.php b/src/Command/ServerTime.php index 4f04faa8..589f92c5 100644 --- a/src/Command/ServerTime.php +++ b/src/Command/ServerTime.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/time + * * @author Daniele Alessandri */ class ServerTime extends Command diff --git a/src/Command/SetAdd.php b/src/Command/SetAdd.php index 4fb8bea3..c1188181 100644 --- a/src/Command/SetAdd.php +++ b/src/Command/SetAdd.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/sadd + * * @author Daniele Alessandri */ class SetAdd extends Command diff --git a/src/Command/SetCardinality.php b/src/Command/SetCardinality.php index 80807d75..a9f959b7 100644 --- a/src/Command/SetCardinality.php +++ b/src/Command/SetCardinality.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/scard + * * @author Daniele Alessandri */ class SetCardinality extends Command diff --git a/src/Command/SetDifference.php b/src/Command/SetDifference.php index 14d3f211..35f23f98 100644 --- a/src/Command/SetDifference.php +++ b/src/Command/SetDifference.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/sdiff + * * @author Daniele Alessandri */ class SetDifference extends SetIntersection diff --git a/src/Command/SetDifferenceStore.php b/src/Command/SetDifferenceStore.php index 1fae8b7a..0cb78155 100644 --- a/src/Command/SetDifferenceStore.php +++ b/src/Command/SetDifferenceStore.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/sdiffstore + * * @author Daniele Alessandri */ class SetDifferenceStore extends SetIntersectionStore diff --git a/src/Command/SetIntersection.php b/src/Command/SetIntersection.php index 663f5b37..d18258fd 100644 --- a/src/Command/SetIntersection.php +++ b/src/Command/SetIntersection.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/sinter + * * @author Daniele Alessandri */ class SetIntersection extends Command diff --git a/src/Command/SetIntersectionStore.php b/src/Command/SetIntersectionStore.php index ef0fb7ad..b748618a 100644 --- a/src/Command/SetIntersectionStore.php +++ b/src/Command/SetIntersectionStore.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/sinterstore + * * @author Daniele Alessandri */ class SetIntersectionStore extends Command diff --git a/src/Command/SetIsMember.php b/src/Command/SetIsMember.php index 4c6d9d5d..77425224 100644 --- a/src/Command/SetIsMember.php +++ b/src/Command/SetIsMember.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/sismember + * * @author Daniele Alessandri */ class SetIsMember extends Command diff --git a/src/Command/SetMembers.php b/src/Command/SetMembers.php index 93ac2321..f4076ae8 100644 --- a/src/Command/SetMembers.php +++ b/src/Command/SetMembers.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/smembers + * * @author Daniele Alessandri */ class SetMembers extends Command diff --git a/src/Command/SetMove.php b/src/Command/SetMove.php index 46783dd7..edd4e515 100644 --- a/src/Command/SetMove.php +++ b/src/Command/SetMove.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/smove + * * @author Daniele Alessandri */ class SetMove extends Command diff --git a/src/Command/SetPop.php b/src/Command/SetPop.php index 1f07e6cc..b78d3f33 100644 --- a/src/Command/SetPop.php +++ b/src/Command/SetPop.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/spop + * * @author Daniele Alessandri */ class SetPop extends Command diff --git a/src/Command/SetRandomMember.php b/src/Command/SetRandomMember.php index 561d9ab3..2cb79a04 100644 --- a/src/Command/SetRandomMember.php +++ b/src/Command/SetRandomMember.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/srandmember + * * @author Daniele Alessandri */ class SetRandomMember extends Command diff --git a/src/Command/SetRemove.php b/src/Command/SetRemove.php index f4ded6a9..b34710c6 100644 --- a/src/Command/SetRemove.php +++ b/src/Command/SetRemove.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/srem + * * @author Daniele Alessandri */ class SetRemove extends Command diff --git a/src/Command/SetScan.php b/src/Command/SetScan.php index 4c63088c..d42b28df 100644 --- a/src/Command/SetScan.php +++ b/src/Command/SetScan.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/sscan + * * @author Daniele Alessandri */ class SetScan extends Command diff --git a/src/Command/SetUnion.php b/src/Command/SetUnion.php index c9f322b2..7da842b4 100644 --- a/src/Command/SetUnion.php +++ b/src/Command/SetUnion.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/sunion + * * @author Daniele Alessandri */ class SetUnion extends SetIntersection diff --git a/src/Command/SetUnionStore.php b/src/Command/SetUnionStore.php index daf66c33..eac821ad 100644 --- a/src/Command/SetUnionStore.php +++ b/src/Command/SetUnionStore.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/sunionstore + * * @author Daniele Alessandri */ class SetUnionStore extends SetIntersectionStore diff --git a/src/Command/StringAppend.php b/src/Command/StringAppend.php index b2aba343..dac8b847 100644 --- a/src/Command/StringAppend.php +++ b/src/Command/StringAppend.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/append + * * @author Daniele Alessandri */ class StringAppend extends Command diff --git a/src/Command/StringBitCount.php b/src/Command/StringBitCount.php index 7a18af53..193cce91 100644 --- a/src/Command/StringBitCount.php +++ b/src/Command/StringBitCount.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/bitcount + * * @author Daniele Alessandri */ class StringBitCount extends Command diff --git a/src/Command/StringBitOp.php b/src/Command/StringBitOp.php index 87106d47..e04ee79c 100644 --- a/src/Command/StringBitOp.php +++ b/src/Command/StringBitOp.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/bitop + * * @author Daniele Alessandri */ class StringBitOp extends Command @@ -31,7 +32,7 @@ class StringBitOp extends Command protected function filterArguments(array $arguments) { if (count($arguments) === 3 && is_array($arguments[2])) { - list($operation, $destination, ) = $arguments; + list($operation, $destination) = $arguments; $arguments = $arguments[2]; array_unshift($arguments, $operation, $destination); } diff --git a/src/Command/StringBitPos.php b/src/Command/StringBitPos.php index 41f22721..42957665 100644 --- a/src/Command/StringBitPos.php +++ b/src/Command/StringBitPos.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/bitpos + * * @author Daniele Alessandri */ class StringBitPos extends Command diff --git a/src/Command/StringDecrement.php b/src/Command/StringDecrement.php index 93321f09..aa5808cd 100644 --- a/src/Command/StringDecrement.php +++ b/src/Command/StringDecrement.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/decr + * * @author Daniele Alessandri */ class StringDecrement extends Command diff --git a/src/Command/StringDecrementBy.php b/src/Command/StringDecrementBy.php index 852660cb..cbf3e112 100644 --- a/src/Command/StringDecrementBy.php +++ b/src/Command/StringDecrementBy.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/decrby + * * @author Daniele Alessandri */ class StringDecrementBy extends Command diff --git a/src/Command/StringGet.php b/src/Command/StringGet.php index 27656951..138e915c 100644 --- a/src/Command/StringGet.php +++ b/src/Command/StringGet.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/get + * * @author Daniele Alessandri */ class StringGet extends Command diff --git a/src/Command/StringGetBit.php b/src/Command/StringGetBit.php index 32c1692f..3c5b4f9b 100644 --- a/src/Command/StringGetBit.php +++ b/src/Command/StringGetBit.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/getbit + * * @author Daniele Alessandri */ class StringGetBit extends Command diff --git a/src/Command/StringGetMultiple.php b/src/Command/StringGetMultiple.php index 93b41fc5..e340f9cf 100644 --- a/src/Command/StringGetMultiple.php +++ b/src/Command/StringGetMultiple.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/mget + * * @author Daniele Alessandri */ class StringGetMultiple extends Command diff --git a/src/Command/StringGetRange.php b/src/Command/StringGetRange.php index b6171cc8..bb10565b 100644 --- a/src/Command/StringGetRange.php +++ b/src/Command/StringGetRange.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/getrange + * * @author Daniele Alessandri */ class StringGetRange extends Command diff --git a/src/Command/StringGetSet.php b/src/Command/StringGetSet.php index 4f96436b..b68870d4 100644 --- a/src/Command/StringGetSet.php +++ b/src/Command/StringGetSet.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/getset + * * @author Daniele Alessandri */ class StringGetSet extends Command diff --git a/src/Command/StringIncrement.php b/src/Command/StringIncrement.php index 7e570a5f..fa1846e2 100644 --- a/src/Command/StringIncrement.php +++ b/src/Command/StringIncrement.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/incr + * * @author Daniele Alessandri */ class StringIncrement extends Command diff --git a/src/Command/StringIncrementBy.php b/src/Command/StringIncrementBy.php index 3d993944..9d8241a2 100644 --- a/src/Command/StringIncrementBy.php +++ b/src/Command/StringIncrementBy.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/incrby + * * @author Daniele Alessandri */ class StringIncrementBy extends Command diff --git a/src/Command/StringIncrementByFloat.php b/src/Command/StringIncrementByFloat.php index ed95e0ab..164a0869 100644 --- a/src/Command/StringIncrementByFloat.php +++ b/src/Command/StringIncrementByFloat.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/incrbyfloat + * * @author Daniele Alessandri */ class StringIncrementByFloat extends Command diff --git a/src/Command/StringPreciseSetExpire.php b/src/Command/StringPreciseSetExpire.php index da2cbadb..2faa954d 100644 --- a/src/Command/StringPreciseSetExpire.php +++ b/src/Command/StringPreciseSetExpire.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/psetex + * * @author Daniele Alessandri */ class StringPreciseSetExpire extends StringSetExpire diff --git a/src/Command/StringSet.php b/src/Command/StringSet.php index d1e64d0c..b1469945 100644 --- a/src/Command/StringSet.php +++ b/src/Command/StringSet.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/set + * * @author Daniele Alessandri */ class StringSet extends Command diff --git a/src/Command/StringSetBit.php b/src/Command/StringSetBit.php index 414b4d48..7933b6be 100644 --- a/src/Command/StringSetBit.php +++ b/src/Command/StringSetBit.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/setbit + * * @author Daniele Alessandri */ class StringSetBit extends Command diff --git a/src/Command/StringSetExpire.php b/src/Command/StringSetExpire.php index d9634c61..f0881708 100644 --- a/src/Command/StringSetExpire.php +++ b/src/Command/StringSetExpire.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/setex + * * @author Daniele Alessandri */ class StringSetExpire extends Command diff --git a/src/Command/StringSetMultiple.php b/src/Command/StringSetMultiple.php index 9f5fc6dd..a3c5324d 100644 --- a/src/Command/StringSetMultiple.php +++ b/src/Command/StringSetMultiple.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/mset + * * @author Daniele Alessandri */ class StringSetMultiple extends Command diff --git a/src/Command/StringSetMultiplePreserve.php b/src/Command/StringSetMultiplePreserve.php index b50de33a..b46a88c3 100644 --- a/src/Command/StringSetMultiplePreserve.php +++ b/src/Command/StringSetMultiplePreserve.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/msetnx + * * @author Daniele Alessandri */ class StringSetMultiplePreserve extends StringSetMultiple diff --git a/src/Command/StringSetPreserve.php b/src/Command/StringSetPreserve.php index 07ec6ff5..e89c9749 100644 --- a/src/Command/StringSetPreserve.php +++ b/src/Command/StringSetPreserve.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/setnx + * * @author Daniele Alessandri */ class StringSetPreserve extends Command diff --git a/src/Command/StringSetRange.php b/src/Command/StringSetRange.php index 62c24f65..4d9389f4 100644 --- a/src/Command/StringSetRange.php +++ b/src/Command/StringSetRange.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/setrange + * * @author Daniele Alessandri */ class StringSetRange extends Command diff --git a/src/Command/StringStrlen.php b/src/Command/StringStrlen.php index 69c99a7c..10f492fd 100644 --- a/src/Command/StringStrlen.php +++ b/src/Command/StringStrlen.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/strlen + * * @author Daniele Alessandri */ class StringStrlen extends Command diff --git a/src/Command/StringSubstr.php b/src/Command/StringSubstr.php index f63560df..3aab7ade 100644 --- a/src/Command/StringSubstr.php +++ b/src/Command/StringSubstr.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/substr + * * @author Daniele Alessandri */ class StringSubstr extends Command diff --git a/src/Command/TransactionDiscard.php b/src/Command/TransactionDiscard.php index df65598d..44aca2b1 100644 --- a/src/Command/TransactionDiscard.php +++ b/src/Command/TransactionDiscard.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/discard + * * @author Daniele Alessandri */ class TransactionDiscard extends Command diff --git a/src/Command/TransactionExec.php b/src/Command/TransactionExec.php index bc16d5b7..dbd81aae 100644 --- a/src/Command/TransactionExec.php +++ b/src/Command/TransactionExec.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/exec + * * @author Daniele Alessandri */ class TransactionExec extends Command diff --git a/src/Command/TransactionMulti.php b/src/Command/TransactionMulti.php index d57535a0..673bf55d 100644 --- a/src/Command/TransactionMulti.php +++ b/src/Command/TransactionMulti.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/multi + * * @author Daniele Alessandri */ class TransactionMulti extends Command diff --git a/src/Command/TransactionUnwatch.php b/src/Command/TransactionUnwatch.php index a28abec2..79255544 100644 --- a/src/Command/TransactionUnwatch.php +++ b/src/Command/TransactionUnwatch.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/unwatch + * * @author Daniele Alessandri */ class TransactionUnwatch extends Command diff --git a/src/Command/TransactionWatch.php b/src/Command/TransactionWatch.php index 1fc78808..d3607801 100644 --- a/src/Command/TransactionWatch.php +++ b/src/Command/TransactionWatch.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/watch + * * @author Daniele Alessandri */ class TransactionWatch extends Command diff --git a/src/Command/ZSetAdd.php b/src/Command/ZSetAdd.php index 98185c0e..55e4729e 100644 --- a/src/Command/ZSetAdd.php +++ b/src/Command/ZSetAdd.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/zadd + * * @author Daniele Alessandri */ class ZSetAdd extends Command diff --git a/src/Command/ZSetCardinality.php b/src/Command/ZSetCardinality.php index c899c58a..10332009 100644 --- a/src/Command/ZSetCardinality.php +++ b/src/Command/ZSetCardinality.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/zcard + * * @author Daniele Alessandri */ class ZSetCardinality extends Command diff --git a/src/Command/ZSetCount.php b/src/Command/ZSetCount.php index 70ec09ec..918bd2b8 100644 --- a/src/Command/ZSetCount.php +++ b/src/Command/ZSetCount.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/zcount + * * @author Daniele Alessandri */ class ZSetCount extends Command diff --git a/src/Command/ZSetIncrementBy.php b/src/Command/ZSetIncrementBy.php index b76e04a3..245a8e0f 100644 --- a/src/Command/ZSetIncrementBy.php +++ b/src/Command/ZSetIncrementBy.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/zincrby + * * @author Daniele Alessandri */ class ZSetIncrementBy extends Command diff --git a/src/Command/ZSetIntersectionStore.php b/src/Command/ZSetIntersectionStore.php index 9f6b1094..572a7a32 100644 --- a/src/Command/ZSetIntersectionStore.php +++ b/src/Command/ZSetIntersectionStore.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/zinterstore + * * @author Daniele Alessandri */ class ZSetIntersectionStore extends ZSetUnionStore diff --git a/src/Command/ZSetLexCount.php b/src/Command/ZSetLexCount.php index 8af2c1fa..447b8eb3 100644 --- a/src/Command/ZSetLexCount.php +++ b/src/Command/ZSetLexCount.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/zlexcount + * * @author Daniele Alessandri */ class ZSetLexCount extends Command diff --git a/src/Command/ZSetRange.php b/src/Command/ZSetRange.php index 6e20fc8f..ce72c7c0 100644 --- a/src/Command/ZSetRange.php +++ b/src/Command/ZSetRange.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/zrange + * * @author Daniele Alessandri */ class ZSetRange extends Command @@ -92,7 +93,7 @@ class ZSetRange extends Command if ($this->withScores()) { $result = array(); - for ($i = 0; $i < count($data); $i++) { + for ($i = 0; $i < count($data); ++$i) { $result[$data[$i]] = $data[++$i]; } diff --git a/src/Command/ZSetRangeByLex.php b/src/Command/ZSetRangeByLex.php index 58b6768d..9b2991a8 100644 --- a/src/Command/ZSetRangeByLex.php +++ b/src/Command/ZSetRangeByLex.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/zrangebylex + * * @author Daniele Alessandri */ class ZSetRangeByLex extends ZSetRange diff --git a/src/Command/ZSetRangeByScore.php b/src/Command/ZSetRangeByScore.php index cfe73aab..961a5bc2 100644 --- a/src/Command/ZSetRangeByScore.php +++ b/src/Command/ZSetRangeByScore.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/zrangebyscore + * * @author Daniele Alessandri */ class ZSetRangeByScore extends ZSetRange @@ -51,7 +52,7 @@ class ZSetRangeByScore extends ZSetRange { $arguments = $this->getArguments(); - for ($i = 3; $i < count($arguments); $i++) { + for ($i = 3; $i < count($arguments); ++$i) { switch (strtoupper($arguments[$i])) { case 'WITHSCORES': return true; diff --git a/src/Command/ZSetRank.php b/src/Command/ZSetRank.php index d088bb25..d0c9c536 100644 --- a/src/Command/ZSetRank.php +++ b/src/Command/ZSetRank.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/zrank + * * @author Daniele Alessandri */ class ZSetRank extends Command diff --git a/src/Command/ZSetRemove.php b/src/Command/ZSetRemove.php index 9a11332d..cd8ada05 100644 --- a/src/Command/ZSetRemove.php +++ b/src/Command/ZSetRemove.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/zrem + * * @author Daniele Alessandri */ class ZSetRemove extends Command diff --git a/src/Command/ZSetRemoveRangeByLex.php b/src/Command/ZSetRemoveRangeByLex.php index 69402874..9ea2d9e5 100644 --- a/src/Command/ZSetRemoveRangeByLex.php +++ b/src/Command/ZSetRemoveRangeByLex.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/zremrangebylex + * * @author Daniele Alessandri */ class ZSetRemoveRangeByLex extends Command diff --git a/src/Command/ZSetRemoveRangeByRank.php b/src/Command/ZSetRemoveRangeByRank.php index d7ea38fa..89cd5baf 100644 --- a/src/Command/ZSetRemoveRangeByRank.php +++ b/src/Command/ZSetRemoveRangeByRank.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/zremrangebyrank + * * @author Daniele Alessandri */ class ZSetRemoveRangeByRank extends Command diff --git a/src/Command/ZSetRemoveRangeByScore.php b/src/Command/ZSetRemoveRangeByScore.php index 1dbbb4d8..a7c30814 100644 --- a/src/Command/ZSetRemoveRangeByScore.php +++ b/src/Command/ZSetRemoveRangeByScore.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/zremrangebyscore + * * @author Daniele Alessandri */ class ZSetRemoveRangeByScore extends Command diff --git a/src/Command/ZSetReverseRange.php b/src/Command/ZSetReverseRange.php index e7344e0a..6a46a7a5 100644 --- a/src/Command/ZSetReverseRange.php +++ b/src/Command/ZSetReverseRange.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/zrevrange + * * @author Daniele Alessandri */ class ZSetReverseRange extends ZSetRange diff --git a/src/Command/ZSetReverseRangeByScore.php b/src/Command/ZSetReverseRangeByScore.php index cded7c1c..1078eb72 100644 --- a/src/Command/ZSetReverseRangeByScore.php +++ b/src/Command/ZSetReverseRangeByScore.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/zrevrangebyscore + * * @author Daniele Alessandri */ class ZSetReverseRangeByScore extends ZSetRangeByScore diff --git a/src/Command/ZSetReverseRank.php b/src/Command/ZSetReverseRank.php index 2ff1903a..33fb8158 100644 --- a/src/Command/ZSetReverseRank.php +++ b/src/Command/ZSetReverseRank.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/zrevrank + * * @author Daniele Alessandri */ class ZSetReverseRank extends Command diff --git a/src/Command/ZSetScan.php b/src/Command/ZSetScan.php index 947393b7..1dc2352e 100644 --- a/src/Command/ZSetScan.php +++ b/src/Command/ZSetScan.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/zscan + * * @author Daniele Alessandri */ class ZSetScan extends Command @@ -72,7 +73,7 @@ class ZSetScan extends Command $members = $data[1]; $result = array(); - for ($i = 0; $i < count($members); $i++) { + for ($i = 0; $i < count($members); ++$i) { $result[$members[$i]] = (float) $members[++$i]; } diff --git a/src/Command/ZSetScore.php b/src/Command/ZSetScore.php index d4e9fbbe..2e7fce8e 100644 --- a/src/Command/ZSetScore.php +++ b/src/Command/ZSetScore.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/zscore + * * @author Daniele Alessandri */ class ZSetScore extends Command diff --git a/src/Command/ZSetUnionStore.php b/src/Command/ZSetUnionStore.php index daf858f5..befc5ce7 100644 --- a/src/Command/ZSetUnionStore.php +++ b/src/Command/ZSetUnionStore.php @@ -13,6 +13,7 @@ namespace Predis\Command; /** * @link http://redis.io/commands/zunionstore + * * @author Daniele Alessandri */ class ZSetUnionStore extends Command diff --git a/src/Configuration/Options.php b/src/Configuration/Options.php index f2fcac60..6f3b331b 100644 --- a/src/Configuration/Options.php +++ b/src/Configuration/Options.php @@ -43,11 +43,11 @@ class Options implements OptionsInterface protected function getHandlers() { return array( - 'cluster' => 'Predis\Configuration\ClusterOption', + 'cluster' => 'Predis\Configuration\ClusterOption', 'connections' => 'Predis\Configuration\ConnectionFactoryOption', - 'exceptions' => 'Predis\Configuration\ExceptionsOption', - 'prefix' => 'Predis\Configuration\PrefixOption', - 'profile' => 'Predis\Configuration\ProfileOption', + 'exceptions' => 'Predis\Configuration\ExceptionsOption', + 'prefix' => 'Predis\Configuration\PrefixOption', + 'profile' => 'Predis\Configuration\ProfileOption', 'replication' => 'Predis\Configuration\ReplicationOption', ); } @@ -117,6 +117,6 @@ class Options implements OptionsInterface return $this->options[$option] = $this->getDefault($option); } - return null; + return; } } diff --git a/src/Connection/AbstractConnection.php b/src/Connection/AbstractConnection.php index 5fabc0b3..c6893e06 100644 --- a/src/Connection/AbstractConnection.php +++ b/src/Connection/AbstractConnection.php @@ -11,7 +11,6 @@ namespace Predis\Connection; -use InvalidArgumentException; use Predis\CommunicationException; use Predis\Command\CommandInterface; use Predis\Protocol\ProtocolException; diff --git a/src/Connection/Aggregate/MasterSlaveReplication.php b/src/Connection/Aggregate/MasterSlaveReplication.php index 200aac43..93a679fe 100644 --- a/src/Connection/Aggregate/MasterSlaveReplication.php +++ b/src/Connection/Aggregate/MasterSlaveReplication.php @@ -133,7 +133,7 @@ class MasterSlaveReplication implements ReplicationInterface return $this->slaves[$connectionId]; } - return null; + return; } /** diff --git a/src/Connection/Aggregate/PredisCluster.php b/src/Connection/Aggregate/PredisCluster.php index d67621c8..8286a9fa 100644 --- a/src/Connection/Aggregate/PredisCluster.php +++ b/src/Connection/Aggregate/PredisCluster.php @@ -25,6 +25,7 @@ use Predis\Connection\NodeConnectionInterface; * implementing client-side sharding based on pluggable distribution strategies. * * @author Daniele Alessandri + * * @todo Add the ability to remove connections from pool. */ class PredisCluster implements ClusterInterface, IteratorAggregate, Countable diff --git a/src/Connection/Aggregate/RedisCluster.php b/src/Connection/Aggregate/RedisCluster.php index 7a23f302..4d87c16d 100644 --- a/src/Connection/Aggregate/RedisCluster.php +++ b/src/Connection/Aggregate/RedisCluster.php @@ -431,8 +431,9 @@ class RedisCluster implements ClusterInterface, IteratorAggregate, Countable * Handles -ASK responses by executing again the command against the node * indicated by the Redis response. * - * @param CommandInterface $command Command that generated the -ASK response. - * @param string $details Parameters of the -ASK response. + * @param CommandInterface $command Command that generated the -ASK response. + * @param string $details Parameters of the -ASK response. + * * @return mixed */ protected function onAskResponse(CommandInterface $command, $details) diff --git a/src/Connection/Factory.php b/src/Connection/Factory.php index c7d991b5..f2882804 100644 --- a/src/Connection/Factory.php +++ b/src/Connection/Factory.php @@ -24,10 +24,10 @@ use Predis\Command\RawCommand; class Factory implements FactoryInterface { protected $schemes = array( - 'tcp' => 'Predis\Connection\StreamConnection', - 'unix' => 'Predis\Connection\StreamConnection', + 'tcp' => 'Predis\Connection\StreamConnection', + 'unix' => 'Predis\Connection\StreamConnection', 'redis' => 'Predis\Connection\StreamConnection', - 'http' => 'Predis\Connection\WebdisConnection', + 'http' => 'Predis\Connection\WebdisConnection', ); /** @@ -100,7 +100,7 @@ class Factory implements FactoryInterface if (!$connection instanceof NodeConnectionInterface) { throw new UnexpectedValueException( - "Objects returned by connection initializers must implement ". + 'Objects returned by connection initializers must implement '. "'Predis\Connection\NodeConnectionInterface'." ); } diff --git a/src/Connection/PhpiredisSocketConnection.php b/src/Connection/PhpiredisSocketConnection.php index 05e36fee..602e9cb6 100644 --- a/src/Connection/PhpiredisSocketConnection.php +++ b/src/Connection/PhpiredisSocketConnection.php @@ -40,6 +40,7 @@ use Predis\Response\Status as StatusResponse; * - read_write_timeout: timeout of read / write operations. * * @link http://github.com/nrk/phpiredis + * * @author Daniele Alessandri */ class PhpiredisSocketConnection extends AbstractConnection @@ -96,7 +97,7 @@ class PhpiredisSocketConnection extends AbstractConnection if (isset($parameters->persistent)) { throw new NotSupportedException( - "Persistent connections are not supported by this connection backend." + 'Persistent connections are not supported by this connection backend.' ); } diff --git a/src/Connection/PhpiredisStreamConnection.php b/src/Connection/PhpiredisStreamConnection.php index 73c8d7c3..6c50644f 100644 --- a/src/Connection/PhpiredisStreamConnection.php +++ b/src/Connection/PhpiredisStreamConnection.php @@ -43,6 +43,7 @@ use Predis\Response\Status as StatusResponse; * - persistent: the connection is left intact after a GC collection. * * @link https://github.com/nrk/phpiredis + * * @author Daniele Alessandri */ class PhpiredisStreamConnection extends StreamConnection @@ -112,7 +113,7 @@ class PhpiredisStreamConnection extends StreamConnection $rwtimeout = $rwtimeout > 0 ? $rwtimeout : -1; $timeout = array( - 'sec' => $timeoutSeconds = floor($rwtimeout), + 'sec' => $timeoutSeconds = floor($rwtimeout), 'usec' => ($rwtimeout - $timeoutSeconds) * 1000000, ); diff --git a/src/Connection/StreamConnection.php b/src/Connection/StreamConnection.php index a33bdb42..68888e3a 100644 --- a/src/Connection/StreamConnection.php +++ b/src/Connection/StreamConnection.php @@ -17,7 +17,7 @@ use Predis\Response\Status as StatusResponse; /** * Standard connection to Redis servers implemented on top of PHP's streams. - * The connection parameters supported by this class are: + * The connection parameters supported by this class are:. * * - scheme: it can be either 'redis', 'tcp' or 'unix'. * - host: hostname or IP address of the server. @@ -95,7 +95,7 @@ class StreamConnection extends AbstractConnection if (isset($parameters->read_write_timeout)) { $rwtimeout = (float) $parameters->read_write_timeout; $rwtimeout = $rwtimeout > 0 ? $rwtimeout : -1; - $timeoutSeconds = floor($rwtimeout); + $timeoutSeconds = floor($rwtimeout); $timeoutUSeconds = ($rwtimeout - $timeoutSeconds) * 1000000; stream_set_timeout($resource, $timeoutSeconds, $timeoutUSeconds); } @@ -137,7 +137,7 @@ class StreamConnection extends AbstractConnection if (isset($parameters->read_write_timeout)) { $rwtimeout = (float) $parameters->read_write_timeout; $rwtimeout = $rwtimeout > 0 ? $rwtimeout : -1; - $timeoutSeconds = floor($rwtimeout); + $timeoutSeconds = floor($rwtimeout); $timeoutUSeconds = ($rwtimeout - $timeoutSeconds) * 1000000; stream_set_timeout($resource, $timeoutSeconds, $timeoutUSeconds); } @@ -216,7 +216,7 @@ class StreamConnection extends AbstractConnection $size = (int) $payload; if ($size === -1) { - return null; + return; } $bulkData = ''; @@ -239,12 +239,12 @@ class StreamConnection extends AbstractConnection $count = (int) $payload; if ($count === -1) { - return null; + return; } $multibulk = array(); - for ($i = 0; $i < $count; $i++) { + for ($i = 0; $i < $count; ++$i) { $multibulk[$i] = $this->read(); } @@ -276,7 +276,7 @@ class StreamConnection extends AbstractConnection $buffer = "*{$reqlen}\r\n\${$cmdlen}\r\n{$commandID}\r\n"; - for ($i = 0, $reqlen--; $i < $reqlen; $i++) { + for ($i = 0, $reqlen--; $i < $reqlen; ++$i) { $argument = $arguments[$i]; $arglen = strlen($argument); $buffer .= "\${$arglen}\r\n{$argument}\r\n"; diff --git a/src/Connection/WebdisConnection.php b/src/Connection/WebdisConnection.php index 96d01326..192d93e7 100644 --- a/src/Connection/WebdisConnection.php +++ b/src/Connection/WebdisConnection.php @@ -41,6 +41,7 @@ use Predis\Response\Status as StatusResponse; * @link http://webd.is * @link http://github.com/nicolasff/webdis * @link http://github.com/seppo0010/phpiredis + * * @author Daniele Alessandri */ class WebdisConnection implements NodeConnectionInterface diff --git a/src/Monitor/Consumer.php b/src/Monitor/Consumer.php index 2b189262..58e9d2b9 100644 --- a/src/Monitor/Consumer.php +++ b/src/Monitor/Consumer.php @@ -120,7 +120,7 @@ class Consumer implements Iterator */ public function next() { - $this->position++; + ++$this->position; } /** @@ -165,9 +165,9 @@ class Consumer implements Iterator return (object) array( 'timestamp' => (float) $timestamp, - 'database' => $database, - 'client' => $client, - 'command' => substr($command, 1, -1), + 'database' => $database, + 'client' => $client, + 'command' => substr($command, 1, -1), 'arguments' => $arguments, ); } diff --git a/src/Pipeline/Atomic.php b/src/Pipeline/Atomic.php index 9e6742bd..16d36ca8 100644 --- a/src/Pipeline/Atomic.php +++ b/src/Pipeline/Atomic.php @@ -100,8 +100,8 @@ class Atomic extends Pipeline $sizeOfPipe = count($commands); $exceptions = $this->throwServerExceptions(); - for ($i = 0; $i < $sizeOfPipe; $i++) { - $command = $commands->dequeue(); + for ($i = 0; $i < $sizeOfPipe; ++$i) { + $command = $commands->dequeue(); $response = $executed[$i]; if (!$response instanceof ResponseInterface) { diff --git a/src/Pipeline/ConnectionErrorProof.php b/src/Pipeline/ConnectionErrorProof.php index abda8622..ea864d5f 100644 --- a/src/Pipeline/ConnectionErrorProof.php +++ b/src/Pipeline/ConnectionErrorProof.php @@ -23,6 +23,7 @@ use Predis\Connection\Aggregate\ClusterInterface; * returns the exception instances as the rest of the response elements. * * @todo Awful naming! + * * @author Daniele Alessandri */ class ConnectionErrorProof extends Pipeline @@ -56,7 +57,7 @@ class ConnectionErrorProof extends Pipeline */ protected function executeSingleNode(NodeConnectionInterface $connection, SplQueue $commands) { - $responses = array(); + $responses = array(); $sizeOfPipe = count($commands); foreach ($commands as $command) { @@ -67,7 +68,7 @@ class ConnectionErrorProof extends Pipeline } } - for ($i = 0; $i < $sizeOfPipe; $i++) { + for ($i = 0; $i < $sizeOfPipe; ++$i) { $command = $commands->dequeue(); try { @@ -106,7 +107,7 @@ class ConnectionErrorProof extends Pipeline } } - for ($i = 0; $i < $sizeOfPipe; $i++) { + for ($i = 0; $i < $sizeOfPipe; ++$i) { $command = $commands->dequeue(); $cmdConnection = $connection->getConnection($command); diff --git a/src/Profile/Factory.php b/src/Profile/Factory.php index f1f02475..bbd881a1 100644 --- a/src/Profile/Factory.php +++ b/src/Profile/Factory.php @@ -23,14 +23,14 @@ use Predis\ClientException; final class Factory { private static $profiles = array( - '2.0' => 'Predis\Profile\RedisVersion200', - '2.2' => 'Predis\Profile\RedisVersion220', - '2.4' => 'Predis\Profile\RedisVersion240', - '2.6' => 'Predis\Profile\RedisVersion260', - '2.8' => 'Predis\Profile\RedisVersion280', - '3.0' => 'Predis\Profile\RedisVersion300', + '2.0' => 'Predis\Profile\RedisVersion200', + '2.2' => 'Predis\Profile\RedisVersion220', + '2.4' => 'Predis\Profile\RedisVersion240', + '2.6' => 'Predis\Profile\RedisVersion260', + '2.8' => 'Predis\Profile\RedisVersion280', + '3.0' => 'Predis\Profile\RedisVersion300', 'default' => 'Predis\Profile\RedisVersion300', - 'dev' => 'Predis\Profile\RedisUnstable', + 'dev' => 'Predis\Profile\RedisUnstable', ); /** diff --git a/src/Profile/RedisVersion200.php b/src/Profile/RedisVersion200.php index 5b9ae514..234d53c0 100644 --- a/src/Profile/RedisVersion200.php +++ b/src/Profile/RedisVersion200.php @@ -35,139 +35,139 @@ class RedisVersion200 extends RedisProfile /* ---------------- Redis 1.2 ---------------- */ /* commands operating on the key space */ - 'EXISTS' => 'Predis\Command\KeyExists', - 'DEL' => 'Predis\Command\KeyDelete', - 'TYPE' => 'Predis\Command\KeyType', - 'KEYS' => 'Predis\Command\KeyKeys', - 'RANDOMKEY' => 'Predis\Command\KeyRandom', - 'RENAME' => 'Predis\Command\KeyRename', - 'RENAMENX' => 'Predis\Command\KeyRenamePreserve', - 'EXPIRE' => 'Predis\Command\KeyExpire', - 'EXPIREAT' => 'Predis\Command\KeyExpireAt', - 'TTL' => 'Predis\Command\KeyTimeToLive', - 'MOVE' => 'Predis\Command\KeyMove', - 'SORT' => 'Predis\Command\KeySort', + 'EXISTS' => 'Predis\Command\KeyExists', + 'DEL' => 'Predis\Command\KeyDelete', + 'TYPE' => 'Predis\Command\KeyType', + 'KEYS' => 'Predis\Command\KeyKeys', + 'RANDOMKEY' => 'Predis\Command\KeyRandom', + 'RENAME' => 'Predis\Command\KeyRename', + 'RENAMENX' => 'Predis\Command\KeyRenamePreserve', + 'EXPIRE' => 'Predis\Command\KeyExpire', + 'EXPIREAT' => 'Predis\Command\KeyExpireAt', + 'TTL' => 'Predis\Command\KeyTimeToLive', + 'MOVE' => 'Predis\Command\KeyMove', + 'SORT' => 'Predis\Command\KeySort', /* commands operating on string values */ - 'SET' => 'Predis\Command\StringSet', - 'SETNX' => 'Predis\Command\StringSetPreserve', - 'MSET' => 'Predis\Command\StringSetMultiple', - 'MSETNX' => 'Predis\Command\StringSetMultiplePreserve', - 'GET' => 'Predis\Command\StringGet', - 'MGET' => 'Predis\Command\StringGetMultiple', - 'GETSET' => 'Predis\Command\StringGetSet', - 'INCR' => 'Predis\Command\StringIncrement', - 'INCRBY' => 'Predis\Command\StringIncrementBy', - 'DECR' => 'Predis\Command\StringDecrement', - 'DECRBY' => 'Predis\Command\StringDecrementBy', + 'SET' => 'Predis\Command\StringSet', + 'SETNX' => 'Predis\Command\StringSetPreserve', + 'MSET' => 'Predis\Command\StringSetMultiple', + 'MSETNX' => 'Predis\Command\StringSetMultiplePreserve', + 'GET' => 'Predis\Command\StringGet', + 'MGET' => 'Predis\Command\StringGetMultiple', + 'GETSET' => 'Predis\Command\StringGetSet', + 'INCR' => 'Predis\Command\StringIncrement', + 'INCRBY' => 'Predis\Command\StringIncrementBy', + 'DECR' => 'Predis\Command\StringDecrement', + 'DECRBY' => 'Predis\Command\StringDecrementBy', /* commands operating on lists */ - 'RPUSH' => 'Predis\Command\ListPushTail', - 'LPUSH' => 'Predis\Command\ListPushHead', - 'LLEN' => 'Predis\Command\ListLength', - 'LRANGE' => 'Predis\Command\ListRange', - 'LTRIM' => 'Predis\Command\ListTrim', - 'LINDEX' => 'Predis\Command\ListIndex', - 'LSET' => 'Predis\Command\ListSet', - 'LREM' => 'Predis\Command\ListRemove', - 'LPOP' => 'Predis\Command\ListPopFirst', - 'RPOP' => 'Predis\Command\ListPopLast', - 'RPOPLPUSH' => 'Predis\Command\ListPopLastPushHead', + 'RPUSH' => 'Predis\Command\ListPushTail', + 'LPUSH' => 'Predis\Command\ListPushHead', + 'LLEN' => 'Predis\Command\ListLength', + 'LRANGE' => 'Predis\Command\ListRange', + 'LTRIM' => 'Predis\Command\ListTrim', + 'LINDEX' => 'Predis\Command\ListIndex', + 'LSET' => 'Predis\Command\ListSet', + 'LREM' => 'Predis\Command\ListRemove', + 'LPOP' => 'Predis\Command\ListPopFirst', + 'RPOP' => 'Predis\Command\ListPopLast', + 'RPOPLPUSH' => 'Predis\Command\ListPopLastPushHead', /* commands operating on sets */ - 'SADD' => 'Predis\Command\SetAdd', - 'SREM' => 'Predis\Command\SetRemove', - 'SPOP' => 'Predis\Command\SetPop', - 'SMOVE' => 'Predis\Command\SetMove', - 'SCARD' => 'Predis\Command\SetCardinality', - 'SISMEMBER' => 'Predis\Command\SetIsMember', - 'SINTER' => 'Predis\Command\SetIntersection', - 'SINTERSTORE' => 'Predis\Command\SetIntersectionStore', - 'SUNION' => 'Predis\Command\SetUnion', - 'SUNIONSTORE' => 'Predis\Command\SetUnionStore', - 'SDIFF' => 'Predis\Command\SetDifference', - 'SDIFFSTORE' => 'Predis\Command\SetDifferenceStore', - 'SMEMBERS' => 'Predis\Command\SetMembers', - 'SRANDMEMBER' => 'Predis\Command\SetRandomMember', + 'SADD' => 'Predis\Command\SetAdd', + 'SREM' => 'Predis\Command\SetRemove', + 'SPOP' => 'Predis\Command\SetPop', + 'SMOVE' => 'Predis\Command\SetMove', + 'SCARD' => 'Predis\Command\SetCardinality', + 'SISMEMBER' => 'Predis\Command\SetIsMember', + 'SINTER' => 'Predis\Command\SetIntersection', + 'SINTERSTORE' => 'Predis\Command\SetIntersectionStore', + 'SUNION' => 'Predis\Command\SetUnion', + 'SUNIONSTORE' => 'Predis\Command\SetUnionStore', + 'SDIFF' => 'Predis\Command\SetDifference', + 'SDIFFSTORE' => 'Predis\Command\SetDifferenceStore', + 'SMEMBERS' => 'Predis\Command\SetMembers', + 'SRANDMEMBER' => 'Predis\Command\SetRandomMember', /* commands operating on sorted sets */ - 'ZADD' => 'Predis\Command\ZSetAdd', - 'ZINCRBY' => 'Predis\Command\ZSetIncrementBy', - 'ZREM' => 'Predis\Command\ZSetRemove', - 'ZRANGE' => 'Predis\Command\ZSetRange', - 'ZREVRANGE' => 'Predis\Command\ZSetReverseRange', - 'ZRANGEBYSCORE' => 'Predis\Command\ZSetRangeByScore', - 'ZCARD' => 'Predis\Command\ZSetCardinality', - 'ZSCORE' => 'Predis\Command\ZSetScore', - 'ZREMRANGEBYSCORE' => 'Predis\Command\ZSetRemoveRangeByScore', + 'ZADD' => 'Predis\Command\ZSetAdd', + 'ZINCRBY' => 'Predis\Command\ZSetIncrementBy', + 'ZREM' => 'Predis\Command\ZSetRemove', + 'ZRANGE' => 'Predis\Command\ZSetRange', + 'ZREVRANGE' => 'Predis\Command\ZSetReverseRange', + 'ZRANGEBYSCORE' => 'Predis\Command\ZSetRangeByScore', + 'ZCARD' => 'Predis\Command\ZSetCardinality', + 'ZSCORE' => 'Predis\Command\ZSetScore', + 'ZREMRANGEBYSCORE' => 'Predis\Command\ZSetRemoveRangeByScore', /* connection related commands */ - 'PING' => 'Predis\Command\ConnectionPing', - 'AUTH' => 'Predis\Command\ConnectionAuth', - 'SELECT' => 'Predis\Command\ConnectionSelect', - 'ECHO' => 'Predis\Command\ConnectionEcho', - 'QUIT' => 'Predis\Command\ConnectionQuit', + 'PING' => 'Predis\Command\ConnectionPing', + 'AUTH' => 'Predis\Command\ConnectionAuth', + 'SELECT' => 'Predis\Command\ConnectionSelect', + 'ECHO' => 'Predis\Command\ConnectionEcho', + 'QUIT' => 'Predis\Command\ConnectionQuit', /* remote server control commands */ - 'INFO' => 'Predis\Command\ServerInfo', - 'SLAVEOF' => 'Predis\Command\ServerSlaveOf', - 'MONITOR' => 'Predis\Command\ServerMonitor', - 'DBSIZE' => 'Predis\Command\ServerDatabaseSize', - 'FLUSHDB' => 'Predis\Command\ServerFlushDatabase', - 'FLUSHALL' => 'Predis\Command\ServerFlushAll', - 'SAVE' => 'Predis\Command\ServerSave', - 'BGSAVE' => 'Predis\Command\ServerBackgroundSave', - 'LASTSAVE' => 'Predis\Command\ServerLastSave', - 'SHUTDOWN' => 'Predis\Command\ServerShutdown', - 'BGREWRITEAOF' => 'Predis\Command\ServerBackgroundRewriteAOF', + 'INFO' => 'Predis\Command\ServerInfo', + 'SLAVEOF' => 'Predis\Command\ServerSlaveOf', + 'MONITOR' => 'Predis\Command\ServerMonitor', + 'DBSIZE' => 'Predis\Command\ServerDatabaseSize', + 'FLUSHDB' => 'Predis\Command\ServerFlushDatabase', + 'FLUSHALL' => 'Predis\Command\ServerFlushAll', + 'SAVE' => 'Predis\Command\ServerSave', + 'BGSAVE' => 'Predis\Command\ServerBackgroundSave', + 'LASTSAVE' => 'Predis\Command\ServerLastSave', + 'SHUTDOWN' => 'Predis\Command\ServerShutdown', + 'BGREWRITEAOF' => 'Predis\Command\ServerBackgroundRewriteAOF', /* ---------------- Redis 2.0 ---------------- */ /* commands operating on string values */ - 'SETEX' => 'Predis\Command\StringSetExpire', - 'APPEND' => 'Predis\Command\StringAppend', - 'SUBSTR' => 'Predis\Command\StringSubstr', + 'SETEX' => 'Predis\Command\StringSetExpire', + 'APPEND' => 'Predis\Command\StringAppend', + 'SUBSTR' => 'Predis\Command\StringSubstr', /* commands operating on lists */ - 'BLPOP' => 'Predis\Command\ListPopFirstBlocking', - 'BRPOP' => 'Predis\Command\ListPopLastBlocking', + 'BLPOP' => 'Predis\Command\ListPopFirstBlocking', + 'BRPOP' => 'Predis\Command\ListPopLastBlocking', /* commands operating on sorted sets */ - 'ZUNIONSTORE' => 'Predis\Command\ZSetUnionStore', - 'ZINTERSTORE' => 'Predis\Command\ZSetIntersectionStore', - 'ZCOUNT' => 'Predis\Command\ZSetCount', - 'ZRANK' => 'Predis\Command\ZSetRank', - 'ZREVRANK' => 'Predis\Command\ZSetReverseRank', - 'ZREMRANGEBYRANK' => 'Predis\Command\ZSetRemoveRangeByRank', + 'ZUNIONSTORE' => 'Predis\Command\ZSetUnionStore', + 'ZINTERSTORE' => 'Predis\Command\ZSetIntersectionStore', + 'ZCOUNT' => 'Predis\Command\ZSetCount', + 'ZRANK' => 'Predis\Command\ZSetRank', + 'ZREVRANK' => 'Predis\Command\ZSetReverseRank', + 'ZREMRANGEBYRANK' => 'Predis\Command\ZSetRemoveRangeByRank', /* commands operating on hashes */ - 'HSET' => 'Predis\Command\HashSet', - 'HSETNX' => 'Predis\Command\HashSetPreserve', - 'HMSET' => 'Predis\Command\HashSetMultiple', - 'HINCRBY' => 'Predis\Command\HashIncrementBy', - 'HGET' => 'Predis\Command\HashGet', - 'HMGET' => 'Predis\Command\HashGetMultiple', - 'HDEL' => 'Predis\Command\HashDelete', - 'HEXISTS' => 'Predis\Command\HashExists', - 'HLEN' => 'Predis\Command\HashLength', - 'HKEYS' => 'Predis\Command\HashKeys', - 'HVALS' => 'Predis\Command\HashValues', - 'HGETALL' => 'Predis\Command\HashGetAll', + 'HSET' => 'Predis\Command\HashSet', + 'HSETNX' => 'Predis\Command\HashSetPreserve', + 'HMSET' => 'Predis\Command\HashSetMultiple', + 'HINCRBY' => 'Predis\Command\HashIncrementBy', + 'HGET' => 'Predis\Command\HashGet', + 'HMGET' => 'Predis\Command\HashGetMultiple', + 'HDEL' => 'Predis\Command\HashDelete', + 'HEXISTS' => 'Predis\Command\HashExists', + 'HLEN' => 'Predis\Command\HashLength', + 'HKEYS' => 'Predis\Command\HashKeys', + 'HVALS' => 'Predis\Command\HashValues', + 'HGETALL' => 'Predis\Command\HashGetAll', /* transactions */ - 'MULTI' => 'Predis\Command\TransactionMulti', - 'EXEC' => 'Predis\Command\TransactionExec', - 'DISCARD' => 'Predis\Command\TransactionDiscard', + 'MULTI' => 'Predis\Command\TransactionMulti', + 'EXEC' => 'Predis\Command\TransactionExec', + 'DISCARD' => 'Predis\Command\TransactionDiscard', /* publish - subscribe */ - 'SUBSCRIBE' => 'Predis\Command\PubSubSubscribe', - 'UNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribe', - 'PSUBSCRIBE' => 'Predis\Command\PubSubSubscribeByPattern', - 'PUNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribeByPattern', - 'PUBLISH' => 'Predis\Command\PubSubPublish', + 'SUBSCRIBE' => 'Predis\Command\PubSubSubscribe', + 'UNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribe', + 'PSUBSCRIBE' => 'Predis\Command\PubSubSubscribeByPattern', + 'PUNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribeByPattern', + 'PUBLISH' => 'Predis\Command\PubSubPublish', /* remote server control commands */ - 'CONFIG' => 'Predis\Command\ServerConfig', + 'CONFIG' => 'Predis\Command\ServerConfig', ); } } diff --git a/src/Profile/RedisVersion220.php b/src/Profile/RedisVersion220.php index 146fbe83..899014e2 100644 --- a/src/Profile/RedisVersion220.php +++ b/src/Profile/RedisVersion220.php @@ -35,168 +35,168 @@ class RedisVersion220 extends RedisProfile /* ---------------- Redis 1.2 ---------------- */ /* commands operating on the key space */ - 'EXISTS' => 'Predis\Command\KeyExists', - 'DEL' => 'Predis\Command\KeyDelete', - 'TYPE' => 'Predis\Command\KeyType', - 'KEYS' => 'Predis\Command\KeyKeys', - 'RANDOMKEY' => 'Predis\Command\KeyRandom', - 'RENAME' => 'Predis\Command\KeyRename', - 'RENAMENX' => 'Predis\Command\KeyRenamePreserve', - 'EXPIRE' => 'Predis\Command\KeyExpire', - 'EXPIREAT' => 'Predis\Command\KeyExpireAt', - 'TTL' => 'Predis\Command\KeyTimeToLive', - 'MOVE' => 'Predis\Command\KeyMove', - 'SORT' => 'Predis\Command\KeySort', + 'EXISTS' => 'Predis\Command\KeyExists', + 'DEL' => 'Predis\Command\KeyDelete', + 'TYPE' => 'Predis\Command\KeyType', + 'KEYS' => 'Predis\Command\KeyKeys', + 'RANDOMKEY' => 'Predis\Command\KeyRandom', + 'RENAME' => 'Predis\Command\KeyRename', + 'RENAMENX' => 'Predis\Command\KeyRenamePreserve', + 'EXPIRE' => 'Predis\Command\KeyExpire', + 'EXPIREAT' => 'Predis\Command\KeyExpireAt', + 'TTL' => 'Predis\Command\KeyTimeToLive', + 'MOVE' => 'Predis\Command\KeyMove', + 'SORT' => 'Predis\Command\KeySort', /* commands operating on string values */ - 'SET' => 'Predis\Command\StringSet', - 'SETNX' => 'Predis\Command\StringSetPreserve', - 'MSET' => 'Predis\Command\StringSetMultiple', - 'MSETNX' => 'Predis\Command\StringSetMultiplePreserve', - 'GET' => 'Predis\Command\StringGet', - 'MGET' => 'Predis\Command\StringGetMultiple', - 'GETSET' => 'Predis\Command\StringGetSet', - 'INCR' => 'Predis\Command\StringIncrement', - 'INCRBY' => 'Predis\Command\StringIncrementBy', - 'DECR' => 'Predis\Command\StringDecrement', - 'DECRBY' => 'Predis\Command\StringDecrementBy', + 'SET' => 'Predis\Command\StringSet', + 'SETNX' => 'Predis\Command\StringSetPreserve', + 'MSET' => 'Predis\Command\StringSetMultiple', + 'MSETNX' => 'Predis\Command\StringSetMultiplePreserve', + 'GET' => 'Predis\Command\StringGet', + 'MGET' => 'Predis\Command\StringGetMultiple', + 'GETSET' => 'Predis\Command\StringGetSet', + 'INCR' => 'Predis\Command\StringIncrement', + 'INCRBY' => 'Predis\Command\StringIncrementBy', + 'DECR' => 'Predis\Command\StringDecrement', + 'DECRBY' => 'Predis\Command\StringDecrementBy', /* commands operating on lists */ - 'RPUSH' => 'Predis\Command\ListPushTail', - 'LPUSH' => 'Predis\Command\ListPushHead', - 'LLEN' => 'Predis\Command\ListLength', - 'LRANGE' => 'Predis\Command\ListRange', - 'LTRIM' => 'Predis\Command\ListTrim', - 'LINDEX' => 'Predis\Command\ListIndex', - 'LSET' => 'Predis\Command\ListSet', - 'LREM' => 'Predis\Command\ListRemove', - 'LPOP' => 'Predis\Command\ListPopFirst', - 'RPOP' => 'Predis\Command\ListPopLast', - 'RPOPLPUSH' => 'Predis\Command\ListPopLastPushHead', + 'RPUSH' => 'Predis\Command\ListPushTail', + 'LPUSH' => 'Predis\Command\ListPushHead', + 'LLEN' => 'Predis\Command\ListLength', + 'LRANGE' => 'Predis\Command\ListRange', + 'LTRIM' => 'Predis\Command\ListTrim', + 'LINDEX' => 'Predis\Command\ListIndex', + 'LSET' => 'Predis\Command\ListSet', + 'LREM' => 'Predis\Command\ListRemove', + 'LPOP' => 'Predis\Command\ListPopFirst', + 'RPOP' => 'Predis\Command\ListPopLast', + 'RPOPLPUSH' => 'Predis\Command\ListPopLastPushHead', /* commands operating on sets */ - 'SADD' => 'Predis\Command\SetAdd', - 'SREM' => 'Predis\Command\SetRemove', - 'SPOP' => 'Predis\Command\SetPop', - 'SMOVE' => 'Predis\Command\SetMove', - 'SCARD' => 'Predis\Command\SetCardinality', - 'SISMEMBER' => 'Predis\Command\SetIsMember', - 'SINTER' => 'Predis\Command\SetIntersection', - 'SINTERSTORE' => 'Predis\Command\SetIntersectionStore', - 'SUNION' => 'Predis\Command\SetUnion', - 'SUNIONSTORE' => 'Predis\Command\SetUnionStore', - 'SDIFF' => 'Predis\Command\SetDifference', - 'SDIFFSTORE' => 'Predis\Command\SetDifferenceStore', - 'SMEMBERS' => 'Predis\Command\SetMembers', - 'SRANDMEMBER' => 'Predis\Command\SetRandomMember', + 'SADD' => 'Predis\Command\SetAdd', + 'SREM' => 'Predis\Command\SetRemove', + 'SPOP' => 'Predis\Command\SetPop', + 'SMOVE' => 'Predis\Command\SetMove', + 'SCARD' => 'Predis\Command\SetCardinality', + 'SISMEMBER' => 'Predis\Command\SetIsMember', + 'SINTER' => 'Predis\Command\SetIntersection', + 'SINTERSTORE' => 'Predis\Command\SetIntersectionStore', + 'SUNION' => 'Predis\Command\SetUnion', + 'SUNIONSTORE' => 'Predis\Command\SetUnionStore', + 'SDIFF' => 'Predis\Command\SetDifference', + 'SDIFFSTORE' => 'Predis\Command\SetDifferenceStore', + 'SMEMBERS' => 'Predis\Command\SetMembers', + 'SRANDMEMBER' => 'Predis\Command\SetRandomMember', /* commands operating on sorted sets */ - 'ZADD' => 'Predis\Command\ZSetAdd', - 'ZINCRBY' => 'Predis\Command\ZSetIncrementBy', - 'ZREM' => 'Predis\Command\ZSetRemove', - 'ZRANGE' => 'Predis\Command\ZSetRange', - 'ZREVRANGE' => 'Predis\Command\ZSetReverseRange', - 'ZRANGEBYSCORE' => 'Predis\Command\ZSetRangeByScore', - 'ZCARD' => 'Predis\Command\ZSetCardinality', - 'ZSCORE' => 'Predis\Command\ZSetScore', - 'ZREMRANGEBYSCORE' => 'Predis\Command\ZSetRemoveRangeByScore', + 'ZADD' => 'Predis\Command\ZSetAdd', + 'ZINCRBY' => 'Predis\Command\ZSetIncrementBy', + 'ZREM' => 'Predis\Command\ZSetRemove', + 'ZRANGE' => 'Predis\Command\ZSetRange', + 'ZREVRANGE' => 'Predis\Command\ZSetReverseRange', + 'ZRANGEBYSCORE' => 'Predis\Command\ZSetRangeByScore', + 'ZCARD' => 'Predis\Command\ZSetCardinality', + 'ZSCORE' => 'Predis\Command\ZSetScore', + 'ZREMRANGEBYSCORE' => 'Predis\Command\ZSetRemoveRangeByScore', /* connection related commands */ - 'PING' => 'Predis\Command\ConnectionPing', - 'AUTH' => 'Predis\Command\ConnectionAuth', - 'SELECT' => 'Predis\Command\ConnectionSelect', - 'ECHO' => 'Predis\Command\ConnectionEcho', - 'QUIT' => 'Predis\Command\ConnectionQuit', + 'PING' => 'Predis\Command\ConnectionPing', + 'AUTH' => 'Predis\Command\ConnectionAuth', + 'SELECT' => 'Predis\Command\ConnectionSelect', + 'ECHO' => 'Predis\Command\ConnectionEcho', + 'QUIT' => 'Predis\Command\ConnectionQuit', /* remote server control commands */ - 'INFO' => 'Predis\Command\ServerInfo', - 'SLAVEOF' => 'Predis\Command\ServerSlaveOf', - 'MONITOR' => 'Predis\Command\ServerMonitor', - 'DBSIZE' => 'Predis\Command\ServerDatabaseSize', - 'FLUSHDB' => 'Predis\Command\ServerFlushDatabase', - 'FLUSHALL' => 'Predis\Command\ServerFlushAll', - 'SAVE' => 'Predis\Command\ServerSave', - 'BGSAVE' => 'Predis\Command\ServerBackgroundSave', - 'LASTSAVE' => 'Predis\Command\ServerLastSave', - 'SHUTDOWN' => 'Predis\Command\ServerShutdown', - 'BGREWRITEAOF' => 'Predis\Command\ServerBackgroundRewriteAOF', + 'INFO' => 'Predis\Command\ServerInfo', + 'SLAVEOF' => 'Predis\Command\ServerSlaveOf', + 'MONITOR' => 'Predis\Command\ServerMonitor', + 'DBSIZE' => 'Predis\Command\ServerDatabaseSize', + 'FLUSHDB' => 'Predis\Command\ServerFlushDatabase', + 'FLUSHALL' => 'Predis\Command\ServerFlushAll', + 'SAVE' => 'Predis\Command\ServerSave', + 'BGSAVE' => 'Predis\Command\ServerBackgroundSave', + 'LASTSAVE' => 'Predis\Command\ServerLastSave', + 'SHUTDOWN' => 'Predis\Command\ServerShutdown', + 'BGREWRITEAOF' => 'Predis\Command\ServerBackgroundRewriteAOF', /* ---------------- Redis 2.0 ---------------- */ /* commands operating on string values */ - 'SETEX' => 'Predis\Command\StringSetExpire', - 'APPEND' => 'Predis\Command\StringAppend', - 'SUBSTR' => 'Predis\Command\StringSubstr', + 'SETEX' => 'Predis\Command\StringSetExpire', + 'APPEND' => 'Predis\Command\StringAppend', + 'SUBSTR' => 'Predis\Command\StringSubstr', /* commands operating on lists */ - 'BLPOP' => 'Predis\Command\ListPopFirstBlocking', - 'BRPOP' => 'Predis\Command\ListPopLastBlocking', + 'BLPOP' => 'Predis\Command\ListPopFirstBlocking', + 'BRPOP' => 'Predis\Command\ListPopLastBlocking', /* commands operating on sorted sets */ - 'ZUNIONSTORE' => 'Predis\Command\ZSetUnionStore', - 'ZINTERSTORE' => 'Predis\Command\ZSetIntersectionStore', - 'ZCOUNT' => 'Predis\Command\ZSetCount', - 'ZRANK' => 'Predis\Command\ZSetRank', - 'ZREVRANK' => 'Predis\Command\ZSetReverseRank', - 'ZREMRANGEBYRANK' => 'Predis\Command\ZSetRemoveRangeByRank', + 'ZUNIONSTORE' => 'Predis\Command\ZSetUnionStore', + 'ZINTERSTORE' => 'Predis\Command\ZSetIntersectionStore', + 'ZCOUNT' => 'Predis\Command\ZSetCount', + 'ZRANK' => 'Predis\Command\ZSetRank', + 'ZREVRANK' => 'Predis\Command\ZSetReverseRank', + 'ZREMRANGEBYRANK' => 'Predis\Command\ZSetRemoveRangeByRank', /* commands operating on hashes */ - 'HSET' => 'Predis\Command\HashSet', - 'HSETNX' => 'Predis\Command\HashSetPreserve', - 'HMSET' => 'Predis\Command\HashSetMultiple', - 'HINCRBY' => 'Predis\Command\HashIncrementBy', - 'HGET' => 'Predis\Command\HashGet', - 'HMGET' => 'Predis\Command\HashGetMultiple', - 'HDEL' => 'Predis\Command\HashDelete', - 'HEXISTS' => 'Predis\Command\HashExists', - 'HLEN' => 'Predis\Command\HashLength', - 'HKEYS' => 'Predis\Command\HashKeys', - 'HVALS' => 'Predis\Command\HashValues', - 'HGETALL' => 'Predis\Command\HashGetAll', + 'HSET' => 'Predis\Command\HashSet', + 'HSETNX' => 'Predis\Command\HashSetPreserve', + 'HMSET' => 'Predis\Command\HashSetMultiple', + 'HINCRBY' => 'Predis\Command\HashIncrementBy', + 'HGET' => 'Predis\Command\HashGet', + 'HMGET' => 'Predis\Command\HashGetMultiple', + 'HDEL' => 'Predis\Command\HashDelete', + 'HEXISTS' => 'Predis\Command\HashExists', + 'HLEN' => 'Predis\Command\HashLength', + 'HKEYS' => 'Predis\Command\HashKeys', + 'HVALS' => 'Predis\Command\HashValues', + 'HGETALL' => 'Predis\Command\HashGetAll', /* transactions */ - 'MULTI' => 'Predis\Command\TransactionMulti', - 'EXEC' => 'Predis\Command\TransactionExec', - 'DISCARD' => 'Predis\Command\TransactionDiscard', + 'MULTI' => 'Predis\Command\TransactionMulti', + 'EXEC' => 'Predis\Command\TransactionExec', + 'DISCARD' => 'Predis\Command\TransactionDiscard', /* publish - subscribe */ - 'SUBSCRIBE' => 'Predis\Command\PubSubSubscribe', - 'UNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribe', - 'PSUBSCRIBE' => 'Predis\Command\PubSubSubscribeByPattern', - 'PUNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribeByPattern', - 'PUBLISH' => 'Predis\Command\PubSubPublish', + 'SUBSCRIBE' => 'Predis\Command\PubSubSubscribe', + 'UNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribe', + 'PSUBSCRIBE' => 'Predis\Command\PubSubSubscribeByPattern', + 'PUNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribeByPattern', + 'PUBLISH' => 'Predis\Command\PubSubPublish', /* remote server control commands */ - 'CONFIG' => 'Predis\Command\ServerConfig', + 'CONFIG' => 'Predis\Command\ServerConfig', /* ---------------- Redis 2.2 ---------------- */ /* commands operating on the key space */ - 'PERSIST' => 'Predis\Command\KeyPersist', + 'PERSIST' => 'Predis\Command\KeyPersist', /* commands operating on string values */ - 'STRLEN' => 'Predis\Command\StringStrlen', - 'SETRANGE' => 'Predis\Command\StringSetRange', - 'GETRANGE' => 'Predis\Command\StringGetRange', - 'SETBIT' => 'Predis\Command\StringSetBit', - 'GETBIT' => 'Predis\Command\StringGetBit', + 'STRLEN' => 'Predis\Command\StringStrlen', + 'SETRANGE' => 'Predis\Command\StringSetRange', + 'GETRANGE' => 'Predis\Command\StringGetRange', + 'SETBIT' => 'Predis\Command\StringSetBit', + 'GETBIT' => 'Predis\Command\StringGetBit', /* commands operating on lists */ - 'RPUSHX' => 'Predis\Command\ListPushTailX', - 'LPUSHX' => 'Predis\Command\ListPushHeadX', - 'LINSERT' => 'Predis\Command\ListInsert', - 'BRPOPLPUSH' => 'Predis\Command\ListPopLastPushHeadBlocking', + 'RPUSHX' => 'Predis\Command\ListPushTailX', + 'LPUSHX' => 'Predis\Command\ListPushHeadX', + 'LINSERT' => 'Predis\Command\ListInsert', + 'BRPOPLPUSH' => 'Predis\Command\ListPopLastPushHeadBlocking', /* commands operating on sorted sets */ - 'ZREVRANGEBYSCORE' => 'Predis\Command\ZSetReverseRangeByScore', + 'ZREVRANGEBYSCORE' => 'Predis\Command\ZSetReverseRangeByScore', /* transactions */ - 'WATCH' => 'Predis\Command\TransactionWatch', - 'UNWATCH' => 'Predis\Command\TransactionUnwatch', + 'WATCH' => 'Predis\Command\TransactionWatch', + 'UNWATCH' => 'Predis\Command\TransactionUnwatch', /* remote server control commands */ - 'OBJECT' => 'Predis\Command\ServerObject', - 'SLOWLOG' => 'Predis\Command\ServerSlowlog', + 'OBJECT' => 'Predis\Command\ServerObject', + 'SLOWLOG' => 'Predis\Command\ServerSlowlog', ); } } diff --git a/src/Profile/RedisVersion240.php b/src/Profile/RedisVersion240.php index d3c08dbe..0856c37c 100644 --- a/src/Profile/RedisVersion240.php +++ b/src/Profile/RedisVersion240.php @@ -35,173 +35,173 @@ class RedisVersion240 extends RedisProfile /* ---------------- Redis 1.2 ---------------- */ /* commands operating on the key space */ - 'EXISTS' => 'Predis\Command\KeyExists', - 'DEL' => 'Predis\Command\KeyDelete', - 'TYPE' => 'Predis\Command\KeyType', - 'KEYS' => 'Predis\Command\KeyKeys', - 'RANDOMKEY' => 'Predis\Command\KeyRandom', - 'RENAME' => 'Predis\Command\KeyRename', - 'RENAMENX' => 'Predis\Command\KeyRenamePreserve', - 'EXPIRE' => 'Predis\Command\KeyExpire', - 'EXPIREAT' => 'Predis\Command\KeyExpireAt', - 'TTL' => 'Predis\Command\KeyTimeToLive', - 'MOVE' => 'Predis\Command\KeyMove', - 'SORT' => 'Predis\Command\KeySort', + 'EXISTS' => 'Predis\Command\KeyExists', + 'DEL' => 'Predis\Command\KeyDelete', + 'TYPE' => 'Predis\Command\KeyType', + 'KEYS' => 'Predis\Command\KeyKeys', + 'RANDOMKEY' => 'Predis\Command\KeyRandom', + 'RENAME' => 'Predis\Command\KeyRename', + 'RENAMENX' => 'Predis\Command\KeyRenamePreserve', + 'EXPIRE' => 'Predis\Command\KeyExpire', + 'EXPIREAT' => 'Predis\Command\KeyExpireAt', + 'TTL' => 'Predis\Command\KeyTimeToLive', + 'MOVE' => 'Predis\Command\KeyMove', + 'SORT' => 'Predis\Command\KeySort', /* commands operating on string values */ - 'SET' => 'Predis\Command\StringSet', - 'SETNX' => 'Predis\Command\StringSetPreserve', - 'MSET' => 'Predis\Command\StringSetMultiple', - 'MSETNX' => 'Predis\Command\StringSetMultiplePreserve', - 'GET' => 'Predis\Command\StringGet', - 'MGET' => 'Predis\Command\StringGetMultiple', - 'GETSET' => 'Predis\Command\StringGetSet', - 'INCR' => 'Predis\Command\StringIncrement', - 'INCRBY' => 'Predis\Command\StringIncrementBy', - 'DECR' => 'Predis\Command\StringDecrement', - 'DECRBY' => 'Predis\Command\StringDecrementBy', + 'SET' => 'Predis\Command\StringSet', + 'SETNX' => 'Predis\Command\StringSetPreserve', + 'MSET' => 'Predis\Command\StringSetMultiple', + 'MSETNX' => 'Predis\Command\StringSetMultiplePreserve', + 'GET' => 'Predis\Command\StringGet', + 'MGET' => 'Predis\Command\StringGetMultiple', + 'GETSET' => 'Predis\Command\StringGetSet', + 'INCR' => 'Predis\Command\StringIncrement', + 'INCRBY' => 'Predis\Command\StringIncrementBy', + 'DECR' => 'Predis\Command\StringDecrement', + 'DECRBY' => 'Predis\Command\StringDecrementBy', /* commands operating on lists */ - 'RPUSH' => 'Predis\Command\ListPushTail', - 'LPUSH' => 'Predis\Command\ListPushHead', - 'LLEN' => 'Predis\Command\ListLength', - 'LRANGE' => 'Predis\Command\ListRange', - 'LTRIM' => 'Predis\Command\ListTrim', - 'LINDEX' => 'Predis\Command\ListIndex', - 'LSET' => 'Predis\Command\ListSet', - 'LREM' => 'Predis\Command\ListRemove', - 'LPOP' => 'Predis\Command\ListPopFirst', - 'RPOP' => 'Predis\Command\ListPopLast', - 'RPOPLPUSH' => 'Predis\Command\ListPopLastPushHead', + 'RPUSH' => 'Predis\Command\ListPushTail', + 'LPUSH' => 'Predis\Command\ListPushHead', + 'LLEN' => 'Predis\Command\ListLength', + 'LRANGE' => 'Predis\Command\ListRange', + 'LTRIM' => 'Predis\Command\ListTrim', + 'LINDEX' => 'Predis\Command\ListIndex', + 'LSET' => 'Predis\Command\ListSet', + 'LREM' => 'Predis\Command\ListRemove', + 'LPOP' => 'Predis\Command\ListPopFirst', + 'RPOP' => 'Predis\Command\ListPopLast', + 'RPOPLPUSH' => 'Predis\Command\ListPopLastPushHead', /* commands operating on sets */ - 'SADD' => 'Predis\Command\SetAdd', - 'SREM' => 'Predis\Command\SetRemove', - 'SPOP' => 'Predis\Command\SetPop', - 'SMOVE' => 'Predis\Command\SetMove', - 'SCARD' => 'Predis\Command\SetCardinality', - 'SISMEMBER' => 'Predis\Command\SetIsMember', - 'SINTER' => 'Predis\Command\SetIntersection', - 'SINTERSTORE' => 'Predis\Command\SetIntersectionStore', - 'SUNION' => 'Predis\Command\SetUnion', - 'SUNIONSTORE' => 'Predis\Command\SetUnionStore', - 'SDIFF' => 'Predis\Command\SetDifference', - 'SDIFFSTORE' => 'Predis\Command\SetDifferenceStore', - 'SMEMBERS' => 'Predis\Command\SetMembers', - 'SRANDMEMBER' => 'Predis\Command\SetRandomMember', + 'SADD' => 'Predis\Command\SetAdd', + 'SREM' => 'Predis\Command\SetRemove', + 'SPOP' => 'Predis\Command\SetPop', + 'SMOVE' => 'Predis\Command\SetMove', + 'SCARD' => 'Predis\Command\SetCardinality', + 'SISMEMBER' => 'Predis\Command\SetIsMember', + 'SINTER' => 'Predis\Command\SetIntersection', + 'SINTERSTORE' => 'Predis\Command\SetIntersectionStore', + 'SUNION' => 'Predis\Command\SetUnion', + 'SUNIONSTORE' => 'Predis\Command\SetUnionStore', + 'SDIFF' => 'Predis\Command\SetDifference', + 'SDIFFSTORE' => 'Predis\Command\SetDifferenceStore', + 'SMEMBERS' => 'Predis\Command\SetMembers', + 'SRANDMEMBER' => 'Predis\Command\SetRandomMember', /* commands operating on sorted sets */ - 'ZADD' => 'Predis\Command\ZSetAdd', - 'ZINCRBY' => 'Predis\Command\ZSetIncrementBy', - 'ZREM' => 'Predis\Command\ZSetRemove', - 'ZRANGE' => 'Predis\Command\ZSetRange', - 'ZREVRANGE' => 'Predis\Command\ZSetReverseRange', - 'ZRANGEBYSCORE' => 'Predis\Command\ZSetRangeByScore', - 'ZCARD' => 'Predis\Command\ZSetCardinality', - 'ZSCORE' => 'Predis\Command\ZSetScore', - 'ZREMRANGEBYSCORE' => 'Predis\Command\ZSetRemoveRangeByScore', + 'ZADD' => 'Predis\Command\ZSetAdd', + 'ZINCRBY' => 'Predis\Command\ZSetIncrementBy', + 'ZREM' => 'Predis\Command\ZSetRemove', + 'ZRANGE' => 'Predis\Command\ZSetRange', + 'ZREVRANGE' => 'Predis\Command\ZSetReverseRange', + 'ZRANGEBYSCORE' => 'Predis\Command\ZSetRangeByScore', + 'ZCARD' => 'Predis\Command\ZSetCardinality', + 'ZSCORE' => 'Predis\Command\ZSetScore', + 'ZREMRANGEBYSCORE' => 'Predis\Command\ZSetRemoveRangeByScore', /* connection related commands */ - 'PING' => 'Predis\Command\ConnectionPing', - 'AUTH' => 'Predis\Command\ConnectionAuth', - 'SELECT' => 'Predis\Command\ConnectionSelect', - 'ECHO' => 'Predis\Command\ConnectionEcho', - 'QUIT' => 'Predis\Command\ConnectionQuit', + 'PING' => 'Predis\Command\ConnectionPing', + 'AUTH' => 'Predis\Command\ConnectionAuth', + 'SELECT' => 'Predis\Command\ConnectionSelect', + 'ECHO' => 'Predis\Command\ConnectionEcho', + 'QUIT' => 'Predis\Command\ConnectionQuit', /* remote server control commands */ - 'INFO' => 'Predis\Command\ServerInfo', - 'SLAVEOF' => 'Predis\Command\ServerSlaveOf', - 'MONITOR' => 'Predis\Command\ServerMonitor', - 'DBSIZE' => 'Predis\Command\ServerDatabaseSize', - 'FLUSHDB' => 'Predis\Command\ServerFlushDatabase', - 'FLUSHALL' => 'Predis\Command\ServerFlushAll', - 'SAVE' => 'Predis\Command\ServerSave', - 'BGSAVE' => 'Predis\Command\ServerBackgroundSave', - 'LASTSAVE' => 'Predis\Command\ServerLastSave', - 'SHUTDOWN' => 'Predis\Command\ServerShutdown', - 'BGREWRITEAOF' => 'Predis\Command\ServerBackgroundRewriteAOF', + 'INFO' => 'Predis\Command\ServerInfo', + 'SLAVEOF' => 'Predis\Command\ServerSlaveOf', + 'MONITOR' => 'Predis\Command\ServerMonitor', + 'DBSIZE' => 'Predis\Command\ServerDatabaseSize', + 'FLUSHDB' => 'Predis\Command\ServerFlushDatabase', + 'FLUSHALL' => 'Predis\Command\ServerFlushAll', + 'SAVE' => 'Predis\Command\ServerSave', + 'BGSAVE' => 'Predis\Command\ServerBackgroundSave', + 'LASTSAVE' => 'Predis\Command\ServerLastSave', + 'SHUTDOWN' => 'Predis\Command\ServerShutdown', + 'BGREWRITEAOF' => 'Predis\Command\ServerBackgroundRewriteAOF', /* ---------------- Redis 2.0 ---------------- */ /* commands operating on string values */ - 'SETEX' => 'Predis\Command\StringSetExpire', - 'APPEND' => 'Predis\Command\StringAppend', - 'SUBSTR' => 'Predis\Command\StringSubstr', + 'SETEX' => 'Predis\Command\StringSetExpire', + 'APPEND' => 'Predis\Command\StringAppend', + 'SUBSTR' => 'Predis\Command\StringSubstr', /* commands operating on lists */ - 'BLPOP' => 'Predis\Command\ListPopFirstBlocking', - 'BRPOP' => 'Predis\Command\ListPopLastBlocking', + 'BLPOP' => 'Predis\Command\ListPopFirstBlocking', + 'BRPOP' => 'Predis\Command\ListPopLastBlocking', /* commands operating on sorted sets */ - 'ZUNIONSTORE' => 'Predis\Command\ZSetUnionStore', - 'ZINTERSTORE' => 'Predis\Command\ZSetIntersectionStore', - 'ZCOUNT' => 'Predis\Command\ZSetCount', - 'ZRANK' => 'Predis\Command\ZSetRank', - 'ZREVRANK' => 'Predis\Command\ZSetReverseRank', - 'ZREMRANGEBYRANK' => 'Predis\Command\ZSetRemoveRangeByRank', + 'ZUNIONSTORE' => 'Predis\Command\ZSetUnionStore', + 'ZINTERSTORE' => 'Predis\Command\ZSetIntersectionStore', + 'ZCOUNT' => 'Predis\Command\ZSetCount', + 'ZRANK' => 'Predis\Command\ZSetRank', + 'ZREVRANK' => 'Predis\Command\ZSetReverseRank', + 'ZREMRANGEBYRANK' => 'Predis\Command\ZSetRemoveRangeByRank', /* commands operating on hashes */ - 'HSET' => 'Predis\Command\HashSet', - 'HSETNX' => 'Predis\Command\HashSetPreserve', - 'HMSET' => 'Predis\Command\HashSetMultiple', - 'HINCRBY' => 'Predis\Command\HashIncrementBy', - 'HGET' => 'Predis\Command\HashGet', - 'HMGET' => 'Predis\Command\HashGetMultiple', - 'HDEL' => 'Predis\Command\HashDelete', - 'HEXISTS' => 'Predis\Command\HashExists', - 'HLEN' => 'Predis\Command\HashLength', - 'HKEYS' => 'Predis\Command\HashKeys', - 'HVALS' => 'Predis\Command\HashValues', - 'HGETALL' => 'Predis\Command\HashGetAll', + 'HSET' => 'Predis\Command\HashSet', + 'HSETNX' => 'Predis\Command\HashSetPreserve', + 'HMSET' => 'Predis\Command\HashSetMultiple', + 'HINCRBY' => 'Predis\Command\HashIncrementBy', + 'HGET' => 'Predis\Command\HashGet', + 'HMGET' => 'Predis\Command\HashGetMultiple', + 'HDEL' => 'Predis\Command\HashDelete', + 'HEXISTS' => 'Predis\Command\HashExists', + 'HLEN' => 'Predis\Command\HashLength', + 'HKEYS' => 'Predis\Command\HashKeys', + 'HVALS' => 'Predis\Command\HashValues', + 'HGETALL' => 'Predis\Command\HashGetAll', /* transactions */ - 'MULTI' => 'Predis\Command\TransactionMulti', - 'EXEC' => 'Predis\Command\TransactionExec', - 'DISCARD' => 'Predis\Command\TransactionDiscard', + 'MULTI' => 'Predis\Command\TransactionMulti', + 'EXEC' => 'Predis\Command\TransactionExec', + 'DISCARD' => 'Predis\Command\TransactionDiscard', /* publish - subscribe */ - 'SUBSCRIBE' => 'Predis\Command\PubSubSubscribe', - 'UNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribe', - 'PSUBSCRIBE' => 'Predis\Command\PubSubSubscribeByPattern', - 'PUNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribeByPattern', - 'PUBLISH' => 'Predis\Command\PubSubPublish', + 'SUBSCRIBE' => 'Predis\Command\PubSubSubscribe', + 'UNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribe', + 'PSUBSCRIBE' => 'Predis\Command\PubSubSubscribeByPattern', + 'PUNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribeByPattern', + 'PUBLISH' => 'Predis\Command\PubSubPublish', /* remote server control commands */ - 'CONFIG' => 'Predis\Command\ServerConfig', + 'CONFIG' => 'Predis\Command\ServerConfig', /* ---------------- Redis 2.2 ---------------- */ /* commands operating on the key space */ - 'PERSIST' => 'Predis\Command\KeyPersist', + 'PERSIST' => 'Predis\Command\KeyPersist', /* commands operating on string values */ - 'STRLEN' => 'Predis\Command\StringStrlen', - 'SETRANGE' => 'Predis\Command\StringSetRange', - 'GETRANGE' => 'Predis\Command\StringGetRange', - 'SETBIT' => 'Predis\Command\StringSetBit', - 'GETBIT' => 'Predis\Command\StringGetBit', + 'STRLEN' => 'Predis\Command\StringStrlen', + 'SETRANGE' => 'Predis\Command\StringSetRange', + 'GETRANGE' => 'Predis\Command\StringGetRange', + 'SETBIT' => 'Predis\Command\StringSetBit', + 'GETBIT' => 'Predis\Command\StringGetBit', /* commands operating on lists */ - 'RPUSHX' => 'Predis\Command\ListPushTailX', - 'LPUSHX' => 'Predis\Command\ListPushHeadX', - 'LINSERT' => 'Predis\Command\ListInsert', - 'BRPOPLPUSH' => 'Predis\Command\ListPopLastPushHeadBlocking', + 'RPUSHX' => 'Predis\Command\ListPushTailX', + 'LPUSHX' => 'Predis\Command\ListPushHeadX', + 'LINSERT' => 'Predis\Command\ListInsert', + 'BRPOPLPUSH' => 'Predis\Command\ListPopLastPushHeadBlocking', /* commands operating on sorted sets */ - 'ZREVRANGEBYSCORE' => 'Predis\Command\ZSetReverseRangeByScore', + 'ZREVRANGEBYSCORE' => 'Predis\Command\ZSetReverseRangeByScore', /* transactions */ - 'WATCH' => 'Predis\Command\TransactionWatch', - 'UNWATCH' => 'Predis\Command\TransactionUnwatch', + 'WATCH' => 'Predis\Command\TransactionWatch', + 'UNWATCH' => 'Predis\Command\TransactionUnwatch', /* remote server control commands */ - 'OBJECT' => 'Predis\Command\ServerObject', - 'SLOWLOG' => 'Predis\Command\ServerSlowlog', + 'OBJECT' => 'Predis\Command\ServerObject', + 'SLOWLOG' => 'Predis\Command\ServerSlowlog', /* ---------------- Redis 2.4 ---------------- */ /* remote server control commands */ - 'CLIENT' => 'Predis\Command\ServerClient', + 'CLIENT' => 'Predis\Command\ServerClient', ); } } diff --git a/src/Profile/RedisVersion260.php b/src/Profile/RedisVersion260.php index 7bc48b4c..ba5084aa 100644 --- a/src/Profile/RedisVersion260.php +++ b/src/Profile/RedisVersion260.php @@ -35,201 +35,201 @@ class RedisVersion260 extends RedisProfile /* ---------------- Redis 1.2 ---------------- */ /* commands operating on the key space */ - 'EXISTS' => 'Predis\Command\KeyExists', - 'DEL' => 'Predis\Command\KeyDelete', - 'TYPE' => 'Predis\Command\KeyType', - 'KEYS' => 'Predis\Command\KeyKeys', - 'RANDOMKEY' => 'Predis\Command\KeyRandom', - 'RENAME' => 'Predis\Command\KeyRename', - 'RENAMENX' => 'Predis\Command\KeyRenamePreserve', - 'EXPIRE' => 'Predis\Command\KeyExpire', - 'EXPIREAT' => 'Predis\Command\KeyExpireAt', - 'TTL' => 'Predis\Command\KeyTimeToLive', - 'MOVE' => 'Predis\Command\KeyMove', - 'SORT' => 'Predis\Command\KeySort', - 'DUMP' => 'Predis\Command\KeyDump', - 'RESTORE' => 'Predis\Command\KeyRestore', + 'EXISTS' => 'Predis\Command\KeyExists', + 'DEL' => 'Predis\Command\KeyDelete', + 'TYPE' => 'Predis\Command\KeyType', + 'KEYS' => 'Predis\Command\KeyKeys', + 'RANDOMKEY' => 'Predis\Command\KeyRandom', + 'RENAME' => 'Predis\Command\KeyRename', + 'RENAMENX' => 'Predis\Command\KeyRenamePreserve', + 'EXPIRE' => 'Predis\Command\KeyExpire', + 'EXPIREAT' => 'Predis\Command\KeyExpireAt', + 'TTL' => 'Predis\Command\KeyTimeToLive', + 'MOVE' => 'Predis\Command\KeyMove', + 'SORT' => 'Predis\Command\KeySort', + 'DUMP' => 'Predis\Command\KeyDump', + 'RESTORE' => 'Predis\Command\KeyRestore', /* commands operating on string values */ - 'SET' => 'Predis\Command\StringSet', - 'SETNX' => 'Predis\Command\StringSetPreserve', - 'MSET' => 'Predis\Command\StringSetMultiple', - 'MSETNX' => 'Predis\Command\StringSetMultiplePreserve', - 'GET' => 'Predis\Command\StringGet', - 'MGET' => 'Predis\Command\StringGetMultiple', - 'GETSET' => 'Predis\Command\StringGetSet', - 'INCR' => 'Predis\Command\StringIncrement', - 'INCRBY' => 'Predis\Command\StringIncrementBy', - 'DECR' => 'Predis\Command\StringDecrement', - 'DECRBY' => 'Predis\Command\StringDecrementBy', + 'SET' => 'Predis\Command\StringSet', + 'SETNX' => 'Predis\Command\StringSetPreserve', + 'MSET' => 'Predis\Command\StringSetMultiple', + 'MSETNX' => 'Predis\Command\StringSetMultiplePreserve', + 'GET' => 'Predis\Command\StringGet', + 'MGET' => 'Predis\Command\StringGetMultiple', + 'GETSET' => 'Predis\Command\StringGetSet', + 'INCR' => 'Predis\Command\StringIncrement', + 'INCRBY' => 'Predis\Command\StringIncrementBy', + 'DECR' => 'Predis\Command\StringDecrement', + 'DECRBY' => 'Predis\Command\StringDecrementBy', /* commands operating on lists */ - 'RPUSH' => 'Predis\Command\ListPushTail', - 'LPUSH' => 'Predis\Command\ListPushHead', - 'LLEN' => 'Predis\Command\ListLength', - 'LRANGE' => 'Predis\Command\ListRange', - 'LTRIM' => 'Predis\Command\ListTrim', - 'LINDEX' => 'Predis\Command\ListIndex', - 'LSET' => 'Predis\Command\ListSet', - 'LREM' => 'Predis\Command\ListRemove', - 'LPOP' => 'Predis\Command\ListPopFirst', - 'RPOP' => 'Predis\Command\ListPopLast', - 'RPOPLPUSH' => 'Predis\Command\ListPopLastPushHead', + 'RPUSH' => 'Predis\Command\ListPushTail', + 'LPUSH' => 'Predis\Command\ListPushHead', + 'LLEN' => 'Predis\Command\ListLength', + 'LRANGE' => 'Predis\Command\ListRange', + 'LTRIM' => 'Predis\Command\ListTrim', + 'LINDEX' => 'Predis\Command\ListIndex', + 'LSET' => 'Predis\Command\ListSet', + 'LREM' => 'Predis\Command\ListRemove', + 'LPOP' => 'Predis\Command\ListPopFirst', + 'RPOP' => 'Predis\Command\ListPopLast', + 'RPOPLPUSH' => 'Predis\Command\ListPopLastPushHead', /* commands operating on sets */ - 'SADD' => 'Predis\Command\SetAdd', - 'SREM' => 'Predis\Command\SetRemove', - 'SPOP' => 'Predis\Command\SetPop', - 'SMOVE' => 'Predis\Command\SetMove', - 'SCARD' => 'Predis\Command\SetCardinality', - 'SISMEMBER' => 'Predis\Command\SetIsMember', - 'SINTER' => 'Predis\Command\SetIntersection', - 'SINTERSTORE' => 'Predis\Command\SetIntersectionStore', - 'SUNION' => 'Predis\Command\SetUnion', - 'SUNIONSTORE' => 'Predis\Command\SetUnionStore', - 'SDIFF' => 'Predis\Command\SetDifference', - 'SDIFFSTORE' => 'Predis\Command\SetDifferenceStore', - 'SMEMBERS' => 'Predis\Command\SetMembers', - 'SRANDMEMBER' => 'Predis\Command\SetRandomMember', + 'SADD' => 'Predis\Command\SetAdd', + 'SREM' => 'Predis\Command\SetRemove', + 'SPOP' => 'Predis\Command\SetPop', + 'SMOVE' => 'Predis\Command\SetMove', + 'SCARD' => 'Predis\Command\SetCardinality', + 'SISMEMBER' => 'Predis\Command\SetIsMember', + 'SINTER' => 'Predis\Command\SetIntersection', + 'SINTERSTORE' => 'Predis\Command\SetIntersectionStore', + 'SUNION' => 'Predis\Command\SetUnion', + 'SUNIONSTORE' => 'Predis\Command\SetUnionStore', + 'SDIFF' => 'Predis\Command\SetDifference', + 'SDIFFSTORE' => 'Predis\Command\SetDifferenceStore', + 'SMEMBERS' => 'Predis\Command\SetMembers', + 'SRANDMEMBER' => 'Predis\Command\SetRandomMember', /* commands operating on sorted sets */ - 'ZADD' => 'Predis\Command\ZSetAdd', - 'ZINCRBY' => 'Predis\Command\ZSetIncrementBy', - 'ZREM' => 'Predis\Command\ZSetRemove', - 'ZRANGE' => 'Predis\Command\ZSetRange', - 'ZREVRANGE' => 'Predis\Command\ZSetReverseRange', - 'ZRANGEBYSCORE' => 'Predis\Command\ZSetRangeByScore', - 'ZCARD' => 'Predis\Command\ZSetCardinality', - 'ZSCORE' => 'Predis\Command\ZSetScore', - 'ZREMRANGEBYSCORE' => 'Predis\Command\ZSetRemoveRangeByScore', + 'ZADD' => 'Predis\Command\ZSetAdd', + 'ZINCRBY' => 'Predis\Command\ZSetIncrementBy', + 'ZREM' => 'Predis\Command\ZSetRemove', + 'ZRANGE' => 'Predis\Command\ZSetRange', + 'ZREVRANGE' => 'Predis\Command\ZSetReverseRange', + 'ZRANGEBYSCORE' => 'Predis\Command\ZSetRangeByScore', + 'ZCARD' => 'Predis\Command\ZSetCardinality', + 'ZSCORE' => 'Predis\Command\ZSetScore', + 'ZREMRANGEBYSCORE' => 'Predis\Command\ZSetRemoveRangeByScore', /* connection related commands */ - 'PING' => 'Predis\Command\ConnectionPing', - 'AUTH' => 'Predis\Command\ConnectionAuth', - 'SELECT' => 'Predis\Command\ConnectionSelect', - 'ECHO' => 'Predis\Command\ConnectionEcho', - 'QUIT' => 'Predis\Command\ConnectionQuit', + 'PING' => 'Predis\Command\ConnectionPing', + 'AUTH' => 'Predis\Command\ConnectionAuth', + 'SELECT' => 'Predis\Command\ConnectionSelect', + 'ECHO' => 'Predis\Command\ConnectionEcho', + 'QUIT' => 'Predis\Command\ConnectionQuit', /* remote server control commands */ - 'INFO' => 'Predis\Command\ServerInfoV26x', - 'SLAVEOF' => 'Predis\Command\ServerSlaveOf', - 'MONITOR' => 'Predis\Command\ServerMonitor', - 'DBSIZE' => 'Predis\Command\ServerDatabaseSize', - 'FLUSHDB' => 'Predis\Command\ServerFlushDatabase', - 'FLUSHALL' => 'Predis\Command\ServerFlushAll', - 'SAVE' => 'Predis\Command\ServerSave', - 'BGSAVE' => 'Predis\Command\ServerBackgroundSave', - 'LASTSAVE' => 'Predis\Command\ServerLastSave', - 'SHUTDOWN' => 'Predis\Command\ServerShutdown', - 'BGREWRITEAOF' => 'Predis\Command\ServerBackgroundRewriteAOF', + 'INFO' => 'Predis\Command\ServerInfoV26x', + 'SLAVEOF' => 'Predis\Command\ServerSlaveOf', + 'MONITOR' => 'Predis\Command\ServerMonitor', + 'DBSIZE' => 'Predis\Command\ServerDatabaseSize', + 'FLUSHDB' => 'Predis\Command\ServerFlushDatabase', + 'FLUSHALL' => 'Predis\Command\ServerFlushAll', + 'SAVE' => 'Predis\Command\ServerSave', + 'BGSAVE' => 'Predis\Command\ServerBackgroundSave', + 'LASTSAVE' => 'Predis\Command\ServerLastSave', + 'SHUTDOWN' => 'Predis\Command\ServerShutdown', + 'BGREWRITEAOF' => 'Predis\Command\ServerBackgroundRewriteAOF', /* ---------------- Redis 2.0 ---------------- */ /* commands operating on string values */ - 'SETEX' => 'Predis\Command\StringSetExpire', - 'APPEND' => 'Predis\Command\StringAppend', - 'SUBSTR' => 'Predis\Command\StringSubstr', + 'SETEX' => 'Predis\Command\StringSetExpire', + 'APPEND' => 'Predis\Command\StringAppend', + 'SUBSTR' => 'Predis\Command\StringSubstr', /* commands operating on lists */ - 'BLPOP' => 'Predis\Command\ListPopFirstBlocking', - 'BRPOP' => 'Predis\Command\ListPopLastBlocking', + 'BLPOP' => 'Predis\Command\ListPopFirstBlocking', + 'BRPOP' => 'Predis\Command\ListPopLastBlocking', /* commands operating on sorted sets */ - 'ZUNIONSTORE' => 'Predis\Command\ZSetUnionStore', - 'ZINTERSTORE' => 'Predis\Command\ZSetIntersectionStore', - 'ZCOUNT' => 'Predis\Command\ZSetCount', - 'ZRANK' => 'Predis\Command\ZSetRank', - 'ZREVRANK' => 'Predis\Command\ZSetReverseRank', - 'ZREMRANGEBYRANK' => 'Predis\Command\ZSetRemoveRangeByRank', + 'ZUNIONSTORE' => 'Predis\Command\ZSetUnionStore', + 'ZINTERSTORE' => 'Predis\Command\ZSetIntersectionStore', + 'ZCOUNT' => 'Predis\Command\ZSetCount', + 'ZRANK' => 'Predis\Command\ZSetRank', + 'ZREVRANK' => 'Predis\Command\ZSetReverseRank', + 'ZREMRANGEBYRANK' => 'Predis\Command\ZSetRemoveRangeByRank', /* commands operating on hashes */ - 'HSET' => 'Predis\Command\HashSet', - 'HSETNX' => 'Predis\Command\HashSetPreserve', - 'HMSET' => 'Predis\Command\HashSetMultiple', - 'HINCRBY' => 'Predis\Command\HashIncrementBy', - 'HGET' => 'Predis\Command\HashGet', - 'HMGET' => 'Predis\Command\HashGetMultiple', - 'HDEL' => 'Predis\Command\HashDelete', - 'HEXISTS' => 'Predis\Command\HashExists', - 'HLEN' => 'Predis\Command\HashLength', - 'HKEYS' => 'Predis\Command\HashKeys', - 'HVALS' => 'Predis\Command\HashValues', - 'HGETALL' => 'Predis\Command\HashGetAll', + 'HSET' => 'Predis\Command\HashSet', + 'HSETNX' => 'Predis\Command\HashSetPreserve', + 'HMSET' => 'Predis\Command\HashSetMultiple', + 'HINCRBY' => 'Predis\Command\HashIncrementBy', + 'HGET' => 'Predis\Command\HashGet', + 'HMGET' => 'Predis\Command\HashGetMultiple', + 'HDEL' => 'Predis\Command\HashDelete', + 'HEXISTS' => 'Predis\Command\HashExists', + 'HLEN' => 'Predis\Command\HashLength', + 'HKEYS' => 'Predis\Command\HashKeys', + 'HVALS' => 'Predis\Command\HashValues', + 'HGETALL' => 'Predis\Command\HashGetAll', /* transactions */ - 'MULTI' => 'Predis\Command\TransactionMulti', - 'EXEC' => 'Predis\Command\TransactionExec', - 'DISCARD' => 'Predis\Command\TransactionDiscard', + 'MULTI' => 'Predis\Command\TransactionMulti', + 'EXEC' => 'Predis\Command\TransactionExec', + 'DISCARD' => 'Predis\Command\TransactionDiscard', /* publish - subscribe */ - 'SUBSCRIBE' => 'Predis\Command\PubSubSubscribe', - 'UNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribe', - 'PSUBSCRIBE' => 'Predis\Command\PubSubSubscribeByPattern', - 'PUNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribeByPattern', - 'PUBLISH' => 'Predis\Command\PubSubPublish', + 'SUBSCRIBE' => 'Predis\Command\PubSubSubscribe', + 'UNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribe', + 'PSUBSCRIBE' => 'Predis\Command\PubSubSubscribeByPattern', + 'PUNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribeByPattern', + 'PUBLISH' => 'Predis\Command\PubSubPublish', /* remote server control commands */ - 'CONFIG' => 'Predis\Command\ServerConfig', + 'CONFIG' => 'Predis\Command\ServerConfig', /* ---------------- Redis 2.2 ---------------- */ /* commands operating on the key space */ - 'PERSIST' => 'Predis\Command\KeyPersist', + 'PERSIST' => 'Predis\Command\KeyPersist', /* commands operating on string values */ - 'STRLEN' => 'Predis\Command\StringStrlen', - 'SETRANGE' => 'Predis\Command\StringSetRange', - 'GETRANGE' => 'Predis\Command\StringGetRange', - 'SETBIT' => 'Predis\Command\StringSetBit', - 'GETBIT' => 'Predis\Command\StringGetBit', + 'STRLEN' => 'Predis\Command\StringStrlen', + 'SETRANGE' => 'Predis\Command\StringSetRange', + 'GETRANGE' => 'Predis\Command\StringGetRange', + 'SETBIT' => 'Predis\Command\StringSetBit', + 'GETBIT' => 'Predis\Command\StringGetBit', /* commands operating on lists */ - 'RPUSHX' => 'Predis\Command\ListPushTailX', - 'LPUSHX' => 'Predis\Command\ListPushHeadX', - 'LINSERT' => 'Predis\Command\ListInsert', - 'BRPOPLPUSH' => 'Predis\Command\ListPopLastPushHeadBlocking', + 'RPUSHX' => 'Predis\Command\ListPushTailX', + 'LPUSHX' => 'Predis\Command\ListPushHeadX', + 'LINSERT' => 'Predis\Command\ListInsert', + 'BRPOPLPUSH' => 'Predis\Command\ListPopLastPushHeadBlocking', /* commands operating on sorted sets */ - 'ZREVRANGEBYSCORE' => 'Predis\Command\ZSetReverseRangeByScore', + 'ZREVRANGEBYSCORE' => 'Predis\Command\ZSetReverseRangeByScore', /* transactions */ - 'WATCH' => 'Predis\Command\TransactionWatch', - 'UNWATCH' => 'Predis\Command\TransactionUnwatch', + 'WATCH' => 'Predis\Command\TransactionWatch', + 'UNWATCH' => 'Predis\Command\TransactionUnwatch', /* remote server control commands */ - 'OBJECT' => 'Predis\Command\ServerObject', - 'SLOWLOG' => 'Predis\Command\ServerSlowlog', + 'OBJECT' => 'Predis\Command\ServerObject', + 'SLOWLOG' => 'Predis\Command\ServerSlowlog', /* ---------------- Redis 2.4 ---------------- */ /* remote server control commands */ - 'CLIENT' => 'Predis\Command\ServerClient', + 'CLIENT' => 'Predis\Command\ServerClient', /* ---------------- Redis 2.6 ---------------- */ /* commands operating on the key space */ - 'PTTL' => 'Predis\Command\KeyPreciseTimeToLive', - 'PEXPIRE' => 'Predis\Command\KeyPreciseExpire', - 'PEXPIREAT' => 'Predis\Command\KeyPreciseExpireAt', - 'MIGRATE' => 'Predis\Command\KeyMigrate', + 'PTTL' => 'Predis\Command\KeyPreciseTimeToLive', + 'PEXPIRE' => 'Predis\Command\KeyPreciseExpire', + 'PEXPIREAT' => 'Predis\Command\KeyPreciseExpireAt', + 'MIGRATE' => 'Predis\Command\KeyMigrate', /* commands operating on string values */ - 'PSETEX' => 'Predis\Command\StringPreciseSetExpire', - 'INCRBYFLOAT' => 'Predis\Command\StringIncrementByFloat', - 'BITOP' => 'Predis\Command\StringBitOp', - 'BITCOUNT' => 'Predis\Command\StringBitCount', + 'PSETEX' => 'Predis\Command\StringPreciseSetExpire', + 'INCRBYFLOAT' => 'Predis\Command\StringIncrementByFloat', + 'BITOP' => 'Predis\Command\StringBitOp', + 'BITCOUNT' => 'Predis\Command\StringBitCount', /* commands operating on hashes */ - 'HINCRBYFLOAT' => 'Predis\Command\HashIncrementByFloat', + 'HINCRBYFLOAT' => 'Predis\Command\HashIncrementByFloat', /* scripting */ - 'EVAL' => 'Predis\Command\ServerEval', - 'EVALSHA' => 'Predis\Command\ServerEvalSHA', - 'SCRIPT' => 'Predis\Command\ServerScript', + 'EVAL' => 'Predis\Command\ServerEval', + 'EVALSHA' => 'Predis\Command\ServerEvalSHA', + 'SCRIPT' => 'Predis\Command\ServerScript', /* remote server control commands */ - 'TIME' => 'Predis\Command\ServerTime', - 'SENTINEL' => 'Predis\Command\ServerSentinel', + 'TIME' => 'Predis\Command\ServerTime', + 'SENTINEL' => 'Predis\Command\ServerSentinel', ); } } diff --git a/src/Profile/RedisVersion280.php b/src/Profile/RedisVersion280.php index cab50940..ea17e682 100644 --- a/src/Profile/RedisVersion280.php +++ b/src/Profile/RedisVersion280.php @@ -35,233 +35,233 @@ class RedisVersion280 extends RedisProfile /* ---------------- Redis 1.2 ---------------- */ /* commands operating on the key space */ - 'EXISTS' => 'Predis\Command\KeyExists', - 'DEL' => 'Predis\Command\KeyDelete', - 'TYPE' => 'Predis\Command\KeyType', - 'KEYS' => 'Predis\Command\KeyKeys', - 'RANDOMKEY' => 'Predis\Command\KeyRandom', - 'RENAME' => 'Predis\Command\KeyRename', - 'RENAMENX' => 'Predis\Command\KeyRenamePreserve', - 'EXPIRE' => 'Predis\Command\KeyExpire', - 'EXPIREAT' => 'Predis\Command\KeyExpireAt', - 'TTL' => 'Predis\Command\KeyTimeToLive', - 'MOVE' => 'Predis\Command\KeyMove', - 'SORT' => 'Predis\Command\KeySort', - 'DUMP' => 'Predis\Command\KeyDump', - 'RESTORE' => 'Predis\Command\KeyRestore', + 'EXISTS' => 'Predis\Command\KeyExists', + 'DEL' => 'Predis\Command\KeyDelete', + 'TYPE' => 'Predis\Command\KeyType', + 'KEYS' => 'Predis\Command\KeyKeys', + 'RANDOMKEY' => 'Predis\Command\KeyRandom', + 'RENAME' => 'Predis\Command\KeyRename', + 'RENAMENX' => 'Predis\Command\KeyRenamePreserve', + 'EXPIRE' => 'Predis\Command\KeyExpire', + 'EXPIREAT' => 'Predis\Command\KeyExpireAt', + 'TTL' => 'Predis\Command\KeyTimeToLive', + 'MOVE' => 'Predis\Command\KeyMove', + 'SORT' => 'Predis\Command\KeySort', + 'DUMP' => 'Predis\Command\KeyDump', + 'RESTORE' => 'Predis\Command\KeyRestore', /* commands operating on string values */ - 'SET' => 'Predis\Command\StringSet', - 'SETNX' => 'Predis\Command\StringSetPreserve', - 'MSET' => 'Predis\Command\StringSetMultiple', - 'MSETNX' => 'Predis\Command\StringSetMultiplePreserve', - 'GET' => 'Predis\Command\StringGet', - 'MGET' => 'Predis\Command\StringGetMultiple', - 'GETSET' => 'Predis\Command\StringGetSet', - 'INCR' => 'Predis\Command\StringIncrement', - 'INCRBY' => 'Predis\Command\StringIncrementBy', - 'DECR' => 'Predis\Command\StringDecrement', - 'DECRBY' => 'Predis\Command\StringDecrementBy', + 'SET' => 'Predis\Command\StringSet', + 'SETNX' => 'Predis\Command\StringSetPreserve', + 'MSET' => 'Predis\Command\StringSetMultiple', + 'MSETNX' => 'Predis\Command\StringSetMultiplePreserve', + 'GET' => 'Predis\Command\StringGet', + 'MGET' => 'Predis\Command\StringGetMultiple', + 'GETSET' => 'Predis\Command\StringGetSet', + 'INCR' => 'Predis\Command\StringIncrement', + 'INCRBY' => 'Predis\Command\StringIncrementBy', + 'DECR' => 'Predis\Command\StringDecrement', + 'DECRBY' => 'Predis\Command\StringDecrementBy', /* commands operating on lists */ - 'RPUSH' => 'Predis\Command\ListPushTail', - 'LPUSH' => 'Predis\Command\ListPushHead', - 'LLEN' => 'Predis\Command\ListLength', - 'LRANGE' => 'Predis\Command\ListRange', - 'LTRIM' => 'Predis\Command\ListTrim', - 'LINDEX' => 'Predis\Command\ListIndex', - 'LSET' => 'Predis\Command\ListSet', - 'LREM' => 'Predis\Command\ListRemove', - 'LPOP' => 'Predis\Command\ListPopFirst', - 'RPOP' => 'Predis\Command\ListPopLast', - 'RPOPLPUSH' => 'Predis\Command\ListPopLastPushHead', + 'RPUSH' => 'Predis\Command\ListPushTail', + 'LPUSH' => 'Predis\Command\ListPushHead', + 'LLEN' => 'Predis\Command\ListLength', + 'LRANGE' => 'Predis\Command\ListRange', + 'LTRIM' => 'Predis\Command\ListTrim', + 'LINDEX' => 'Predis\Command\ListIndex', + 'LSET' => 'Predis\Command\ListSet', + 'LREM' => 'Predis\Command\ListRemove', + 'LPOP' => 'Predis\Command\ListPopFirst', + 'RPOP' => 'Predis\Command\ListPopLast', + 'RPOPLPUSH' => 'Predis\Command\ListPopLastPushHead', /* commands operating on sets */ - 'SADD' => 'Predis\Command\SetAdd', - 'SREM' => 'Predis\Command\SetRemove', - 'SPOP' => 'Predis\Command\SetPop', - 'SMOVE' => 'Predis\Command\SetMove', - 'SCARD' => 'Predis\Command\SetCardinality', - 'SISMEMBER' => 'Predis\Command\SetIsMember', - 'SINTER' => 'Predis\Command\SetIntersection', - 'SINTERSTORE' => 'Predis\Command\SetIntersectionStore', - 'SUNION' => 'Predis\Command\SetUnion', - 'SUNIONSTORE' => 'Predis\Command\SetUnionStore', - 'SDIFF' => 'Predis\Command\SetDifference', - 'SDIFFSTORE' => 'Predis\Command\SetDifferenceStore', - 'SMEMBERS' => 'Predis\Command\SetMembers', - 'SRANDMEMBER' => 'Predis\Command\SetRandomMember', + 'SADD' => 'Predis\Command\SetAdd', + 'SREM' => 'Predis\Command\SetRemove', + 'SPOP' => 'Predis\Command\SetPop', + 'SMOVE' => 'Predis\Command\SetMove', + 'SCARD' => 'Predis\Command\SetCardinality', + 'SISMEMBER' => 'Predis\Command\SetIsMember', + 'SINTER' => 'Predis\Command\SetIntersection', + 'SINTERSTORE' => 'Predis\Command\SetIntersectionStore', + 'SUNION' => 'Predis\Command\SetUnion', + 'SUNIONSTORE' => 'Predis\Command\SetUnionStore', + 'SDIFF' => 'Predis\Command\SetDifference', + 'SDIFFSTORE' => 'Predis\Command\SetDifferenceStore', + 'SMEMBERS' => 'Predis\Command\SetMembers', + 'SRANDMEMBER' => 'Predis\Command\SetRandomMember', /* commands operating on sorted sets */ - 'ZADD' => 'Predis\Command\ZSetAdd', - 'ZINCRBY' => 'Predis\Command\ZSetIncrementBy', - 'ZREM' => 'Predis\Command\ZSetRemove', - 'ZRANGE' => 'Predis\Command\ZSetRange', - 'ZREVRANGE' => 'Predis\Command\ZSetReverseRange', - 'ZRANGEBYSCORE' => 'Predis\Command\ZSetRangeByScore', - 'ZCARD' => 'Predis\Command\ZSetCardinality', - 'ZSCORE' => 'Predis\Command\ZSetScore', - 'ZREMRANGEBYSCORE' => 'Predis\Command\ZSetRemoveRangeByScore', + 'ZADD' => 'Predis\Command\ZSetAdd', + 'ZINCRBY' => 'Predis\Command\ZSetIncrementBy', + 'ZREM' => 'Predis\Command\ZSetRemove', + 'ZRANGE' => 'Predis\Command\ZSetRange', + 'ZREVRANGE' => 'Predis\Command\ZSetReverseRange', + 'ZRANGEBYSCORE' => 'Predis\Command\ZSetRangeByScore', + 'ZCARD' => 'Predis\Command\ZSetCardinality', + 'ZSCORE' => 'Predis\Command\ZSetScore', + 'ZREMRANGEBYSCORE' => 'Predis\Command\ZSetRemoveRangeByScore', /* connection related commands */ - 'PING' => 'Predis\Command\ConnectionPing', - 'AUTH' => 'Predis\Command\ConnectionAuth', - 'SELECT' => 'Predis\Command\ConnectionSelect', - 'ECHO' => 'Predis\Command\ConnectionEcho', - 'QUIT' => 'Predis\Command\ConnectionQuit', + 'PING' => 'Predis\Command\ConnectionPing', + 'AUTH' => 'Predis\Command\ConnectionAuth', + 'SELECT' => 'Predis\Command\ConnectionSelect', + 'ECHO' => 'Predis\Command\ConnectionEcho', + 'QUIT' => 'Predis\Command\ConnectionQuit', /* remote server control commands */ - 'INFO' => 'Predis\Command\ServerInfoV26x', - 'SLAVEOF' => 'Predis\Command\ServerSlaveOf', - 'MONITOR' => 'Predis\Command\ServerMonitor', - 'DBSIZE' => 'Predis\Command\ServerDatabaseSize', - 'FLUSHDB' => 'Predis\Command\ServerFlushDatabase', - 'FLUSHALL' => 'Predis\Command\ServerFlushAll', - 'SAVE' => 'Predis\Command\ServerSave', - 'BGSAVE' => 'Predis\Command\ServerBackgroundSave', - 'LASTSAVE' => 'Predis\Command\ServerLastSave', - 'SHUTDOWN' => 'Predis\Command\ServerShutdown', - 'BGREWRITEAOF' => 'Predis\Command\ServerBackgroundRewriteAOF', + 'INFO' => 'Predis\Command\ServerInfoV26x', + 'SLAVEOF' => 'Predis\Command\ServerSlaveOf', + 'MONITOR' => 'Predis\Command\ServerMonitor', + 'DBSIZE' => 'Predis\Command\ServerDatabaseSize', + 'FLUSHDB' => 'Predis\Command\ServerFlushDatabase', + 'FLUSHALL' => 'Predis\Command\ServerFlushAll', + 'SAVE' => 'Predis\Command\ServerSave', + 'BGSAVE' => 'Predis\Command\ServerBackgroundSave', + 'LASTSAVE' => 'Predis\Command\ServerLastSave', + 'SHUTDOWN' => 'Predis\Command\ServerShutdown', + 'BGREWRITEAOF' => 'Predis\Command\ServerBackgroundRewriteAOF', /* ---------------- Redis 2.0 ---------------- */ /* commands operating on string values */ - 'SETEX' => 'Predis\Command\StringSetExpire', - 'APPEND' => 'Predis\Command\StringAppend', - 'SUBSTR' => 'Predis\Command\StringSubstr', + 'SETEX' => 'Predis\Command\StringSetExpire', + 'APPEND' => 'Predis\Command\StringAppend', + 'SUBSTR' => 'Predis\Command\StringSubstr', /* commands operating on lists */ - 'BLPOP' => 'Predis\Command\ListPopFirstBlocking', - 'BRPOP' => 'Predis\Command\ListPopLastBlocking', + 'BLPOP' => 'Predis\Command\ListPopFirstBlocking', + 'BRPOP' => 'Predis\Command\ListPopLastBlocking', /* commands operating on sorted sets */ - 'ZUNIONSTORE' => 'Predis\Command\ZSetUnionStore', - 'ZINTERSTORE' => 'Predis\Command\ZSetIntersectionStore', - 'ZCOUNT' => 'Predis\Command\ZSetCount', - 'ZRANK' => 'Predis\Command\ZSetRank', - 'ZREVRANK' => 'Predis\Command\ZSetReverseRank', - 'ZREMRANGEBYRANK' => 'Predis\Command\ZSetRemoveRangeByRank', + 'ZUNIONSTORE' => 'Predis\Command\ZSetUnionStore', + 'ZINTERSTORE' => 'Predis\Command\ZSetIntersectionStore', + 'ZCOUNT' => 'Predis\Command\ZSetCount', + 'ZRANK' => 'Predis\Command\ZSetRank', + 'ZREVRANK' => 'Predis\Command\ZSetReverseRank', + 'ZREMRANGEBYRANK' => 'Predis\Command\ZSetRemoveRangeByRank', /* commands operating on hashes */ - 'HSET' => 'Predis\Command\HashSet', - 'HSETNX' => 'Predis\Command\HashSetPreserve', - 'HMSET' => 'Predis\Command\HashSetMultiple', - 'HINCRBY' => 'Predis\Command\HashIncrementBy', - 'HGET' => 'Predis\Command\HashGet', - 'HMGET' => 'Predis\Command\HashGetMultiple', - 'HDEL' => 'Predis\Command\HashDelete', - 'HEXISTS' => 'Predis\Command\HashExists', - 'HLEN' => 'Predis\Command\HashLength', - 'HKEYS' => 'Predis\Command\HashKeys', - 'HVALS' => 'Predis\Command\HashValues', - 'HGETALL' => 'Predis\Command\HashGetAll', + 'HSET' => 'Predis\Command\HashSet', + 'HSETNX' => 'Predis\Command\HashSetPreserve', + 'HMSET' => 'Predis\Command\HashSetMultiple', + 'HINCRBY' => 'Predis\Command\HashIncrementBy', + 'HGET' => 'Predis\Command\HashGet', + 'HMGET' => 'Predis\Command\HashGetMultiple', + 'HDEL' => 'Predis\Command\HashDelete', + 'HEXISTS' => 'Predis\Command\HashExists', + 'HLEN' => 'Predis\Command\HashLength', + 'HKEYS' => 'Predis\Command\HashKeys', + 'HVALS' => 'Predis\Command\HashValues', + 'HGETALL' => 'Predis\Command\HashGetAll', /* transactions */ - 'MULTI' => 'Predis\Command\TransactionMulti', - 'EXEC' => 'Predis\Command\TransactionExec', - 'DISCARD' => 'Predis\Command\TransactionDiscard', + 'MULTI' => 'Predis\Command\TransactionMulti', + 'EXEC' => 'Predis\Command\TransactionExec', + 'DISCARD' => 'Predis\Command\TransactionDiscard', /* publish - subscribe */ - 'SUBSCRIBE' => 'Predis\Command\PubSubSubscribe', - 'UNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribe', - 'PSUBSCRIBE' => 'Predis\Command\PubSubSubscribeByPattern', - 'PUNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribeByPattern', - 'PUBLISH' => 'Predis\Command\PubSubPublish', + 'SUBSCRIBE' => 'Predis\Command\PubSubSubscribe', + 'UNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribe', + 'PSUBSCRIBE' => 'Predis\Command\PubSubSubscribeByPattern', + 'PUNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribeByPattern', + 'PUBLISH' => 'Predis\Command\PubSubPublish', /* remote server control commands */ - 'CONFIG' => 'Predis\Command\ServerConfig', + 'CONFIG' => 'Predis\Command\ServerConfig', /* ---------------- Redis 2.2 ---------------- */ /* commands operating on the key space */ - 'PERSIST' => 'Predis\Command\KeyPersist', + 'PERSIST' => 'Predis\Command\KeyPersist', /* commands operating on string values */ - 'STRLEN' => 'Predis\Command\StringStrlen', - 'SETRANGE' => 'Predis\Command\StringSetRange', - 'GETRANGE' => 'Predis\Command\StringGetRange', - 'SETBIT' => 'Predis\Command\StringSetBit', - 'GETBIT' => 'Predis\Command\StringGetBit', + 'STRLEN' => 'Predis\Command\StringStrlen', + 'SETRANGE' => 'Predis\Command\StringSetRange', + 'GETRANGE' => 'Predis\Command\StringGetRange', + 'SETBIT' => 'Predis\Command\StringSetBit', + 'GETBIT' => 'Predis\Command\StringGetBit', /* commands operating on lists */ - 'RPUSHX' => 'Predis\Command\ListPushTailX', - 'LPUSHX' => 'Predis\Command\ListPushHeadX', - 'LINSERT' => 'Predis\Command\ListInsert', - 'BRPOPLPUSH' => 'Predis\Command\ListPopLastPushHeadBlocking', + 'RPUSHX' => 'Predis\Command\ListPushTailX', + 'LPUSHX' => 'Predis\Command\ListPushHeadX', + 'LINSERT' => 'Predis\Command\ListInsert', + 'BRPOPLPUSH' => 'Predis\Command\ListPopLastPushHeadBlocking', /* commands operating on sorted sets */ - 'ZREVRANGEBYSCORE' => 'Predis\Command\ZSetReverseRangeByScore', + 'ZREVRANGEBYSCORE' => 'Predis\Command\ZSetReverseRangeByScore', /* transactions */ - 'WATCH' => 'Predis\Command\TransactionWatch', - 'UNWATCH' => 'Predis\Command\TransactionUnwatch', + 'WATCH' => 'Predis\Command\TransactionWatch', + 'UNWATCH' => 'Predis\Command\TransactionUnwatch', /* remote server control commands */ - 'OBJECT' => 'Predis\Command\ServerObject', - 'SLOWLOG' => 'Predis\Command\ServerSlowlog', + 'OBJECT' => 'Predis\Command\ServerObject', + 'SLOWLOG' => 'Predis\Command\ServerSlowlog', /* ---------------- Redis 2.4 ---------------- */ /* remote server control commands */ - 'CLIENT' => 'Predis\Command\ServerClient', + 'CLIENT' => 'Predis\Command\ServerClient', /* ---------------- Redis 2.6 ---------------- */ /* commands operating on the key space */ - 'PTTL' => 'Predis\Command\KeyPreciseTimeToLive', - 'PEXPIRE' => 'Predis\Command\KeyPreciseExpire', - 'PEXPIREAT' => 'Predis\Command\KeyPreciseExpireAt', - 'MIGRATE' => 'Predis\Command\KeyMigrate', + 'PTTL' => 'Predis\Command\KeyPreciseTimeToLive', + 'PEXPIRE' => 'Predis\Command\KeyPreciseExpire', + 'PEXPIREAT' => 'Predis\Command\KeyPreciseExpireAt', + 'MIGRATE' => 'Predis\Command\KeyMigrate', /* commands operating on string values */ - 'PSETEX' => 'Predis\Command\StringPreciseSetExpire', - 'INCRBYFLOAT' => 'Predis\Command\StringIncrementByFloat', - 'BITOP' => 'Predis\Command\StringBitOp', - 'BITCOUNT' => 'Predis\Command\StringBitCount', + 'PSETEX' => 'Predis\Command\StringPreciseSetExpire', + 'INCRBYFLOAT' => 'Predis\Command\StringIncrementByFloat', + 'BITOP' => 'Predis\Command\StringBitOp', + 'BITCOUNT' => 'Predis\Command\StringBitCount', /* commands operating on hashes */ - 'HINCRBYFLOAT' => 'Predis\Command\HashIncrementByFloat', + 'HINCRBYFLOAT' => 'Predis\Command\HashIncrementByFloat', /* scripting */ - 'EVAL' => 'Predis\Command\ServerEval', - 'EVALSHA' => 'Predis\Command\ServerEvalSHA', - 'SCRIPT' => 'Predis\Command\ServerScript', + 'EVAL' => 'Predis\Command\ServerEval', + 'EVALSHA' => 'Predis\Command\ServerEvalSHA', + 'SCRIPT' => 'Predis\Command\ServerScript', /* remote server control commands */ - 'TIME' => 'Predis\Command\ServerTime', - 'SENTINEL' => 'Predis\Command\ServerSentinel', + 'TIME' => 'Predis\Command\ServerTime', + 'SENTINEL' => 'Predis\Command\ServerSentinel', /* ---------------- Redis 2.8 ---------------- */ /* commands operating on the key space */ - 'SCAN' => 'Predis\Command\KeyScan', + 'SCAN' => 'Predis\Command\KeyScan', /* commands operating on string values */ - 'BITPOS' => 'Predis\Command\StringBitPos', + 'BITPOS' => 'Predis\Command\StringBitPos', /* commands operating on sets */ - 'SSCAN' => 'Predis\Command\SetScan', + 'SSCAN' => 'Predis\Command\SetScan', /* commands operating on sorted sets */ - 'ZSCAN' => 'Predis\Command\ZSetScan', - 'ZLEXCOUNT' => 'Predis\Command\ZSetLexCount', - 'ZRANGEBYLEX' => 'Predis\Command\ZSetRangeByLex', - 'ZREMRANGEBYLEX' => 'Predis\Command\ZSetRemoveRangeByLex', - 'ZREVRANGEBYLEX' => 'Predis\Command\ZSetReverseRangeByLex', + 'ZSCAN' => 'Predis\Command\ZSetScan', + 'ZLEXCOUNT' => 'Predis\Command\ZSetLexCount', + 'ZRANGEBYLEX' => 'Predis\Command\ZSetRangeByLex', + 'ZREMRANGEBYLEX' => 'Predis\Command\ZSetRemoveRangeByLex', + 'ZREVRANGEBYLEX' => 'Predis\Command\ZSetReverseRangeByLex', /* commands operating on hashes */ - 'HSCAN' => 'Predis\Command\HashScan', + 'HSCAN' => 'Predis\Command\HashScan', /* publish - subscribe */ - 'PUBSUB' => 'Predis\Command\PubSubPubsub', + 'PUBSUB' => 'Predis\Command\PubSubPubsub', /* commands operating on HyperLogLog */ - 'PFADD' => 'Predis\Command\HyperLogLogAdd', - 'PFCOUNT' => 'Predis\Command\HyperLogLogCount', - 'PFMERGE' => 'Predis\Command\HyperLogLogMerge', + 'PFADD' => 'Predis\Command\HyperLogLogAdd', + 'PFCOUNT' => 'Predis\Command\HyperLogLogCount', + 'PFMERGE' => 'Predis\Command\HyperLogLogMerge', /* remote server control commands */ - 'COMMAND' => 'Predis\Command\ServerCommand', + 'COMMAND' => 'Predis\Command\ServerCommand', ); } } diff --git a/src/Profile/RedisVersion300.php b/src/Profile/RedisVersion300.php index ea091828..8a2fac8b 100644 --- a/src/Profile/RedisVersion300.php +++ b/src/Profile/RedisVersion300.php @@ -35,233 +35,233 @@ class RedisVersion300 extends RedisProfile /* ---------------- Redis 1.2 ---------------- */ /* commands operating on the key space */ - 'EXISTS' => 'Predis\Command\KeyExists', - 'DEL' => 'Predis\Command\KeyDelete', - 'TYPE' => 'Predis\Command\KeyType', - 'KEYS' => 'Predis\Command\KeyKeys', - 'RANDOMKEY' => 'Predis\Command\KeyRandom', - 'RENAME' => 'Predis\Command\KeyRename', - 'RENAMENX' => 'Predis\Command\KeyRenamePreserve', - 'EXPIRE' => 'Predis\Command\KeyExpire', - 'EXPIREAT' => 'Predis\Command\KeyExpireAt', - 'TTL' => 'Predis\Command\KeyTimeToLive', - 'MOVE' => 'Predis\Command\KeyMove', - 'SORT' => 'Predis\Command\KeySort', - 'DUMP' => 'Predis\Command\KeyDump', - 'RESTORE' => 'Predis\Command\KeyRestore', + 'EXISTS' => 'Predis\Command\KeyExists', + 'DEL' => 'Predis\Command\KeyDelete', + 'TYPE' => 'Predis\Command\KeyType', + 'KEYS' => 'Predis\Command\KeyKeys', + 'RANDOMKEY' => 'Predis\Command\KeyRandom', + 'RENAME' => 'Predis\Command\KeyRename', + 'RENAMENX' => 'Predis\Command\KeyRenamePreserve', + 'EXPIRE' => 'Predis\Command\KeyExpire', + 'EXPIREAT' => 'Predis\Command\KeyExpireAt', + 'TTL' => 'Predis\Command\KeyTimeToLive', + 'MOVE' => 'Predis\Command\KeyMove', + 'SORT' => 'Predis\Command\KeySort', + 'DUMP' => 'Predis\Command\KeyDump', + 'RESTORE' => 'Predis\Command\KeyRestore', /* commands operating on string values */ - 'SET' => 'Predis\Command\StringSet', - 'SETNX' => 'Predis\Command\StringSetPreserve', - 'MSET' => 'Predis\Command\StringSetMultiple', - 'MSETNX' => 'Predis\Command\StringSetMultiplePreserve', - 'GET' => 'Predis\Command\StringGet', - 'MGET' => 'Predis\Command\StringGetMultiple', - 'GETSET' => 'Predis\Command\StringGetSet', - 'INCR' => 'Predis\Command\StringIncrement', - 'INCRBY' => 'Predis\Command\StringIncrementBy', - 'DECR' => 'Predis\Command\StringDecrement', - 'DECRBY' => 'Predis\Command\StringDecrementBy', + 'SET' => 'Predis\Command\StringSet', + 'SETNX' => 'Predis\Command\StringSetPreserve', + 'MSET' => 'Predis\Command\StringSetMultiple', + 'MSETNX' => 'Predis\Command\StringSetMultiplePreserve', + 'GET' => 'Predis\Command\StringGet', + 'MGET' => 'Predis\Command\StringGetMultiple', + 'GETSET' => 'Predis\Command\StringGetSet', + 'INCR' => 'Predis\Command\StringIncrement', + 'INCRBY' => 'Predis\Command\StringIncrementBy', + 'DECR' => 'Predis\Command\StringDecrement', + 'DECRBY' => 'Predis\Command\StringDecrementBy', /* commands operating on lists */ - 'RPUSH' => 'Predis\Command\ListPushTail', - 'LPUSH' => 'Predis\Command\ListPushHead', - 'LLEN' => 'Predis\Command\ListLength', - 'LRANGE' => 'Predis\Command\ListRange', - 'LTRIM' => 'Predis\Command\ListTrim', - 'LINDEX' => 'Predis\Command\ListIndex', - 'LSET' => 'Predis\Command\ListSet', - 'LREM' => 'Predis\Command\ListRemove', - 'LPOP' => 'Predis\Command\ListPopFirst', - 'RPOP' => 'Predis\Command\ListPopLast', - 'RPOPLPUSH' => 'Predis\Command\ListPopLastPushHead', + 'RPUSH' => 'Predis\Command\ListPushTail', + 'LPUSH' => 'Predis\Command\ListPushHead', + 'LLEN' => 'Predis\Command\ListLength', + 'LRANGE' => 'Predis\Command\ListRange', + 'LTRIM' => 'Predis\Command\ListTrim', + 'LINDEX' => 'Predis\Command\ListIndex', + 'LSET' => 'Predis\Command\ListSet', + 'LREM' => 'Predis\Command\ListRemove', + 'LPOP' => 'Predis\Command\ListPopFirst', + 'RPOP' => 'Predis\Command\ListPopLast', + 'RPOPLPUSH' => 'Predis\Command\ListPopLastPushHead', /* commands operating on sets */ - 'SADD' => 'Predis\Command\SetAdd', - 'SREM' => 'Predis\Command\SetRemove', - 'SPOP' => 'Predis\Command\SetPop', - 'SMOVE' => 'Predis\Command\SetMove', - 'SCARD' => 'Predis\Command\SetCardinality', - 'SISMEMBER' => 'Predis\Command\SetIsMember', - 'SINTER' => 'Predis\Command\SetIntersection', - 'SINTERSTORE' => 'Predis\Command\SetIntersectionStore', - 'SUNION' => 'Predis\Command\SetUnion', - 'SUNIONSTORE' => 'Predis\Command\SetUnionStore', - 'SDIFF' => 'Predis\Command\SetDifference', - 'SDIFFSTORE' => 'Predis\Command\SetDifferenceStore', - 'SMEMBERS' => 'Predis\Command\SetMembers', - 'SRANDMEMBER' => 'Predis\Command\SetRandomMember', + 'SADD' => 'Predis\Command\SetAdd', + 'SREM' => 'Predis\Command\SetRemove', + 'SPOP' => 'Predis\Command\SetPop', + 'SMOVE' => 'Predis\Command\SetMove', + 'SCARD' => 'Predis\Command\SetCardinality', + 'SISMEMBER' => 'Predis\Command\SetIsMember', + 'SINTER' => 'Predis\Command\SetIntersection', + 'SINTERSTORE' => 'Predis\Command\SetIntersectionStore', + 'SUNION' => 'Predis\Command\SetUnion', + 'SUNIONSTORE' => 'Predis\Command\SetUnionStore', + 'SDIFF' => 'Predis\Command\SetDifference', + 'SDIFFSTORE' => 'Predis\Command\SetDifferenceStore', + 'SMEMBERS' => 'Predis\Command\SetMembers', + 'SRANDMEMBER' => 'Predis\Command\SetRandomMember', /* commands operating on sorted sets */ - 'ZADD' => 'Predis\Command\ZSetAdd', - 'ZINCRBY' => 'Predis\Command\ZSetIncrementBy', - 'ZREM' => 'Predis\Command\ZSetRemove', - 'ZRANGE' => 'Predis\Command\ZSetRange', - 'ZREVRANGE' => 'Predis\Command\ZSetReverseRange', - 'ZRANGEBYSCORE' => 'Predis\Command\ZSetRangeByScore', - 'ZCARD' => 'Predis\Command\ZSetCardinality', - 'ZSCORE' => 'Predis\Command\ZSetScore', - 'ZREMRANGEBYSCORE' => 'Predis\Command\ZSetRemoveRangeByScore', + 'ZADD' => 'Predis\Command\ZSetAdd', + 'ZINCRBY' => 'Predis\Command\ZSetIncrementBy', + 'ZREM' => 'Predis\Command\ZSetRemove', + 'ZRANGE' => 'Predis\Command\ZSetRange', + 'ZREVRANGE' => 'Predis\Command\ZSetReverseRange', + 'ZRANGEBYSCORE' => 'Predis\Command\ZSetRangeByScore', + 'ZCARD' => 'Predis\Command\ZSetCardinality', + 'ZSCORE' => 'Predis\Command\ZSetScore', + 'ZREMRANGEBYSCORE' => 'Predis\Command\ZSetRemoveRangeByScore', /* connection related commands */ - 'PING' => 'Predis\Command\ConnectionPing', - 'AUTH' => 'Predis\Command\ConnectionAuth', - 'SELECT' => 'Predis\Command\ConnectionSelect', - 'ECHO' => 'Predis\Command\ConnectionEcho', - 'QUIT' => 'Predis\Command\ConnectionQuit', + 'PING' => 'Predis\Command\ConnectionPing', + 'AUTH' => 'Predis\Command\ConnectionAuth', + 'SELECT' => 'Predis\Command\ConnectionSelect', + 'ECHO' => 'Predis\Command\ConnectionEcho', + 'QUIT' => 'Predis\Command\ConnectionQuit', /* remote server control commands */ - 'INFO' => 'Predis\Command\ServerInfoV26x', - 'SLAVEOF' => 'Predis\Command\ServerSlaveOf', - 'MONITOR' => 'Predis\Command\ServerMonitor', - 'DBSIZE' => 'Predis\Command\ServerDatabaseSize', - 'FLUSHDB' => 'Predis\Command\ServerFlushDatabase', - 'FLUSHALL' => 'Predis\Command\ServerFlushAll', - 'SAVE' => 'Predis\Command\ServerSave', - 'BGSAVE' => 'Predis\Command\ServerBackgroundSave', - 'LASTSAVE' => 'Predis\Command\ServerLastSave', - 'SHUTDOWN' => 'Predis\Command\ServerShutdown', - 'BGREWRITEAOF' => 'Predis\Command\ServerBackgroundRewriteAOF', + 'INFO' => 'Predis\Command\ServerInfoV26x', + 'SLAVEOF' => 'Predis\Command\ServerSlaveOf', + 'MONITOR' => 'Predis\Command\ServerMonitor', + 'DBSIZE' => 'Predis\Command\ServerDatabaseSize', + 'FLUSHDB' => 'Predis\Command\ServerFlushDatabase', + 'FLUSHALL' => 'Predis\Command\ServerFlushAll', + 'SAVE' => 'Predis\Command\ServerSave', + 'BGSAVE' => 'Predis\Command\ServerBackgroundSave', + 'LASTSAVE' => 'Predis\Command\ServerLastSave', + 'SHUTDOWN' => 'Predis\Command\ServerShutdown', + 'BGREWRITEAOF' => 'Predis\Command\ServerBackgroundRewriteAOF', /* ---------------- Redis 2.0 ---------------- */ /* commands operating on string values */ - 'SETEX' => 'Predis\Command\StringSetExpire', - 'APPEND' => 'Predis\Command\StringAppend', - 'SUBSTR' => 'Predis\Command\StringSubstr', + 'SETEX' => 'Predis\Command\StringSetExpire', + 'APPEND' => 'Predis\Command\StringAppend', + 'SUBSTR' => 'Predis\Command\StringSubstr', /* commands operating on lists */ - 'BLPOP' => 'Predis\Command\ListPopFirstBlocking', - 'BRPOP' => 'Predis\Command\ListPopLastBlocking', + 'BLPOP' => 'Predis\Command\ListPopFirstBlocking', + 'BRPOP' => 'Predis\Command\ListPopLastBlocking', /* commands operating on sorted sets */ - 'ZUNIONSTORE' => 'Predis\Command\ZSetUnionStore', - 'ZINTERSTORE' => 'Predis\Command\ZSetIntersectionStore', - 'ZCOUNT' => 'Predis\Command\ZSetCount', - 'ZRANK' => 'Predis\Command\ZSetRank', - 'ZREVRANK' => 'Predis\Command\ZSetReverseRank', - 'ZREMRANGEBYRANK' => 'Predis\Command\ZSetRemoveRangeByRank', + 'ZUNIONSTORE' => 'Predis\Command\ZSetUnionStore', + 'ZINTERSTORE' => 'Predis\Command\ZSetIntersectionStore', + 'ZCOUNT' => 'Predis\Command\ZSetCount', + 'ZRANK' => 'Predis\Command\ZSetRank', + 'ZREVRANK' => 'Predis\Command\ZSetReverseRank', + 'ZREMRANGEBYRANK' => 'Predis\Command\ZSetRemoveRangeByRank', /* commands operating on hashes */ - 'HSET' => 'Predis\Command\HashSet', - 'HSETNX' => 'Predis\Command\HashSetPreserve', - 'HMSET' => 'Predis\Command\HashSetMultiple', - 'HINCRBY' => 'Predis\Command\HashIncrementBy', - 'HGET' => 'Predis\Command\HashGet', - 'HMGET' => 'Predis\Command\HashGetMultiple', - 'HDEL' => 'Predis\Command\HashDelete', - 'HEXISTS' => 'Predis\Command\HashExists', - 'HLEN' => 'Predis\Command\HashLength', - 'HKEYS' => 'Predis\Command\HashKeys', - 'HVALS' => 'Predis\Command\HashValues', - 'HGETALL' => 'Predis\Command\HashGetAll', + 'HSET' => 'Predis\Command\HashSet', + 'HSETNX' => 'Predis\Command\HashSetPreserve', + 'HMSET' => 'Predis\Command\HashSetMultiple', + 'HINCRBY' => 'Predis\Command\HashIncrementBy', + 'HGET' => 'Predis\Command\HashGet', + 'HMGET' => 'Predis\Command\HashGetMultiple', + 'HDEL' => 'Predis\Command\HashDelete', + 'HEXISTS' => 'Predis\Command\HashExists', + 'HLEN' => 'Predis\Command\HashLength', + 'HKEYS' => 'Predis\Command\HashKeys', + 'HVALS' => 'Predis\Command\HashValues', + 'HGETALL' => 'Predis\Command\HashGetAll', /* transactions */ - 'MULTI' => 'Predis\Command\TransactionMulti', - 'EXEC' => 'Predis\Command\TransactionExec', - 'DISCARD' => 'Predis\Command\TransactionDiscard', + 'MULTI' => 'Predis\Command\TransactionMulti', + 'EXEC' => 'Predis\Command\TransactionExec', + 'DISCARD' => 'Predis\Command\TransactionDiscard', /* publish - subscribe */ - 'SUBSCRIBE' => 'Predis\Command\PubSubSubscribe', - 'UNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribe', - 'PSUBSCRIBE' => 'Predis\Command\PubSubSubscribeByPattern', - 'PUNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribeByPattern', - 'PUBLISH' => 'Predis\Command\PubSubPublish', + 'SUBSCRIBE' => 'Predis\Command\PubSubSubscribe', + 'UNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribe', + 'PSUBSCRIBE' => 'Predis\Command\PubSubSubscribeByPattern', + 'PUNSUBSCRIBE' => 'Predis\Command\PubSubUnsubscribeByPattern', + 'PUBLISH' => 'Predis\Command\PubSubPublish', /* remote server control commands */ - 'CONFIG' => 'Predis\Command\ServerConfig', + 'CONFIG' => 'Predis\Command\ServerConfig', /* ---------------- Redis 2.2 ---------------- */ /* commands operating on the key space */ - 'PERSIST' => 'Predis\Command\KeyPersist', + 'PERSIST' => 'Predis\Command\KeyPersist', /* commands operating on string values */ - 'STRLEN' => 'Predis\Command\StringStrlen', - 'SETRANGE' => 'Predis\Command\StringSetRange', - 'GETRANGE' => 'Predis\Command\StringGetRange', - 'SETBIT' => 'Predis\Command\StringSetBit', - 'GETBIT' => 'Predis\Command\StringGetBit', + 'STRLEN' => 'Predis\Command\StringStrlen', + 'SETRANGE' => 'Predis\Command\StringSetRange', + 'GETRANGE' => 'Predis\Command\StringGetRange', + 'SETBIT' => 'Predis\Command\StringSetBit', + 'GETBIT' => 'Predis\Command\StringGetBit', /* commands operating on lists */ - 'RPUSHX' => 'Predis\Command\ListPushTailX', - 'LPUSHX' => 'Predis\Command\ListPushHeadX', - 'LINSERT' => 'Predis\Command\ListInsert', - 'BRPOPLPUSH' => 'Predis\Command\ListPopLastPushHeadBlocking', + 'RPUSHX' => 'Predis\Command\ListPushTailX', + 'LPUSHX' => 'Predis\Command\ListPushHeadX', + 'LINSERT' => 'Predis\Command\ListInsert', + 'BRPOPLPUSH' => 'Predis\Command\ListPopLastPushHeadBlocking', /* commands operating on sorted sets */ - 'ZREVRANGEBYSCORE' => 'Predis\Command\ZSetReverseRangeByScore', + 'ZREVRANGEBYSCORE' => 'Predis\Command\ZSetReverseRangeByScore', /* transactions */ - 'WATCH' => 'Predis\Command\TransactionWatch', - 'UNWATCH' => 'Predis\Command\TransactionUnwatch', + 'WATCH' => 'Predis\Command\TransactionWatch', + 'UNWATCH' => 'Predis\Command\TransactionUnwatch', /* remote server control commands */ - 'OBJECT' => 'Predis\Command\ServerObject', - 'SLOWLOG' => 'Predis\Command\ServerSlowlog', + 'OBJECT' => 'Predis\Command\ServerObject', + 'SLOWLOG' => 'Predis\Command\ServerSlowlog', /* ---------------- Redis 2.4 ---------------- */ /* remote server control commands */ - 'CLIENT' => 'Predis\Command\ServerClient', + 'CLIENT' => 'Predis\Command\ServerClient', /* ---------------- Redis 2.6 ---------------- */ /* commands operating on the key space */ - 'PTTL' => 'Predis\Command\KeyPreciseTimeToLive', - 'PEXPIRE' => 'Predis\Command\KeyPreciseExpire', - 'PEXPIREAT' => 'Predis\Command\KeyPreciseExpireAt', - 'MIGRATE' => 'Predis\Command\KeyMigrate', + 'PTTL' => 'Predis\Command\KeyPreciseTimeToLive', + 'PEXPIRE' => 'Predis\Command\KeyPreciseExpire', + 'PEXPIREAT' => 'Predis\Command\KeyPreciseExpireAt', + 'MIGRATE' => 'Predis\Command\KeyMigrate', /* commands operating on string values */ - 'PSETEX' => 'Predis\Command\StringPreciseSetExpire', - 'INCRBYFLOAT' => 'Predis\Command\StringIncrementByFloat', - 'BITOP' => 'Predis\Command\StringBitOp', - 'BITCOUNT' => 'Predis\Command\StringBitCount', + 'PSETEX' => 'Predis\Command\StringPreciseSetExpire', + 'INCRBYFLOAT' => 'Predis\Command\StringIncrementByFloat', + 'BITOP' => 'Predis\Command\StringBitOp', + 'BITCOUNT' => 'Predis\Command\StringBitCount', /* commands operating on hashes */ - 'HINCRBYFLOAT' => 'Predis\Command\HashIncrementByFloat', + 'HINCRBYFLOAT' => 'Predis\Command\HashIncrementByFloat', /* scripting */ - 'EVAL' => 'Predis\Command\ServerEval', - 'EVALSHA' => 'Predis\Command\ServerEvalSHA', - 'SCRIPT' => 'Predis\Command\ServerScript', + 'EVAL' => 'Predis\Command\ServerEval', + 'EVALSHA' => 'Predis\Command\ServerEvalSHA', + 'SCRIPT' => 'Predis\Command\ServerScript', /* remote server control commands */ - 'TIME' => 'Predis\Command\ServerTime', - 'SENTINEL' => 'Predis\Command\ServerSentinel', + 'TIME' => 'Predis\Command\ServerTime', + 'SENTINEL' => 'Predis\Command\ServerSentinel', /* ---------------- Redis 2.8 ---------------- */ /* commands operating on the key space */ - 'SCAN' => 'Predis\Command\KeyScan', + 'SCAN' => 'Predis\Command\KeyScan', /* commands operating on string values */ - 'BITPOS' => 'Predis\Command\StringBitPos', + 'BITPOS' => 'Predis\Command\StringBitPos', /* commands operating on sets */ - 'SSCAN' => 'Predis\Command\SetScan', + 'SSCAN' => 'Predis\Command\SetScan', /* commands operating on sorted sets */ - 'ZSCAN' => 'Predis\Command\ZSetScan', - 'ZLEXCOUNT' => 'Predis\Command\ZSetLexCount', - 'ZRANGEBYLEX' => 'Predis\Command\ZSetRangeByLex', - 'ZREMRANGEBYLEX' => 'Predis\Command\ZSetRemoveRangeByLex', - 'ZREVRANGEBYLEX' => 'Predis\Command\ZSetReverseRangeByLex', + 'ZSCAN' => 'Predis\Command\ZSetScan', + 'ZLEXCOUNT' => 'Predis\Command\ZSetLexCount', + 'ZRANGEBYLEX' => 'Predis\Command\ZSetRangeByLex', + 'ZREMRANGEBYLEX' => 'Predis\Command\ZSetRemoveRangeByLex', + 'ZREVRANGEBYLEX' => 'Predis\Command\ZSetReverseRangeByLex', /* commands operating on hashes */ - 'HSCAN' => 'Predis\Command\HashScan', + 'HSCAN' => 'Predis\Command\HashScan', /* publish - subscribe */ - 'PUBSUB' => 'Predis\Command\PubSubPubsub', + 'PUBSUB' => 'Predis\Command\PubSubPubsub', /* commands operating on HyperLogLog */ - 'PFADD' => 'Predis\Command\HyperLogLogAdd', - 'PFCOUNT' => 'Predis\Command\HyperLogLogCount', - 'PFMERGE' => 'Predis\Command\HyperLogLogMerge', + 'PFADD' => 'Predis\Command\HyperLogLogAdd', + 'PFCOUNT' => 'Predis\Command\HyperLogLogCount', + 'PFMERGE' => 'Predis\Command\HyperLogLogMerge', /* remote server control commands */ - 'COMMAND' => 'Predis\Command\ServerCommand', + 'COMMAND' => 'Predis\Command\ServerCommand', /* ---------------- Redis 3.0 ---------------- */ diff --git a/src/Protocol/Text/CompositeProtocolProcessor.php b/src/Protocol/Text/CompositeProtocolProcessor.php index 01ab3831..ea85ed30 100644 --- a/src/Protocol/Text/CompositeProtocolProcessor.php +++ b/src/Protocol/Text/CompositeProtocolProcessor.php @@ -22,6 +22,7 @@ use Predis\Protocol\ResponseReaderInterface; * pluggable handlers to serialize requests and deserialize responses. * * @link http://redis.io/topics/protocol + * * @author Daniele Alessandri */ class CompositeProtocolProcessor implements ProtocolProcessorInterface diff --git a/src/Protocol/Text/Handler/BulkResponse.php b/src/Protocol/Text/Handler/BulkResponse.php index f9f9a299..5b0bf3c2 100644 --- a/src/Protocol/Text/Handler/BulkResponse.php +++ b/src/Protocol/Text/Handler/BulkResponse.php @@ -20,6 +20,7 @@ use Predis\Protocol\ProtocolException; * It translates the payload to a string or a NULL. * * @link http://redis.io/topics/protocol + * * @author Daniele Alessandri */ class BulkResponse implements ResponseHandlerInterface @@ -42,7 +43,7 @@ class BulkResponse implements ResponseHandlerInterface } if ($length == -1) { - return null; + return; } CommunicationException::handle(new ProtocolException( diff --git a/src/Protocol/Text/Handler/ErrorResponse.php b/src/Protocol/Text/Handler/ErrorResponse.php index ed97203a..3e18b7b9 100644 --- a/src/Protocol/Text/Handler/ErrorResponse.php +++ b/src/Protocol/Text/Handler/ErrorResponse.php @@ -19,6 +19,7 @@ use Predis\Response\Error; * It translates the payload to a complex response object for Predis. * * @link http://redis.io/topics/protocol + * * @author Daniele Alessandri */ class ErrorResponse implements ResponseHandlerInterface diff --git a/src/Protocol/Text/Handler/IntegerResponse.php b/src/Protocol/Text/Handler/IntegerResponse.php index e176c1f7..4639d779 100644 --- a/src/Protocol/Text/Handler/IntegerResponse.php +++ b/src/Protocol/Text/Handler/IntegerResponse.php @@ -20,6 +20,7 @@ use Predis\Protocol\ProtocolException; * It translates the payload an integer or NULL. * * @link http://redis.io/topics/protocol + * * @author Daniele Alessandri */ class IntegerResponse implements ResponseHandlerInterface @@ -39,6 +40,6 @@ class IntegerResponse implements ResponseHandlerInterface )); } - return null; + return; } } diff --git a/src/Protocol/Text/Handler/MultiBulkResponse.php b/src/Protocol/Text/Handler/MultiBulkResponse.php index 00e5ee02..820b9b4a 100644 --- a/src/Protocol/Text/Handler/MultiBulkResponse.php +++ b/src/Protocol/Text/Handler/MultiBulkResponse.php @@ -20,6 +20,7 @@ use Predis\Protocol\ProtocolException; * It returns multibulk responses as PHP arrays. * * @link http://redis.io/topics/protocol + * * @author Daniele Alessandri */ class MultiBulkResponse implements ResponseHandlerInterface @@ -38,7 +39,7 @@ class MultiBulkResponse implements ResponseHandlerInterface } if ($length === -1) { - return null; + return; } $list = array(); @@ -47,7 +48,7 @@ class MultiBulkResponse implements ResponseHandlerInterface $handlersCache = array(); $reader = $connection->getProtocol()->getResponseReader(); - for ($i = 0; $i < $length; $i++) { + for ($i = 0; $i < $length; ++$i) { $header = $connection->readLine(); $prefix = $header[0]; diff --git a/src/Protocol/Text/Handler/StatusResponse.php b/src/Protocol/Text/Handler/StatusResponse.php index 3a61e84b..7bde5558 100644 --- a/src/Protocol/Text/Handler/StatusResponse.php +++ b/src/Protocol/Text/Handler/StatusResponse.php @@ -20,6 +20,7 @@ use Predis\Response\Status; * the payload as a string. * * @link http://redis.io/topics/protocol + * * @author Daniele Alessandri */ class StatusResponse implements ResponseHandlerInterface diff --git a/src/Protocol/Text/Handler/StreamableMultiBulkResponse.php b/src/Protocol/Text/Handler/StreamableMultiBulkResponse.php index 7a2988fc..50b11ec0 100644 --- a/src/Protocol/Text/Handler/StreamableMultiBulkResponse.php +++ b/src/Protocol/Text/Handler/StreamableMultiBulkResponse.php @@ -24,6 +24,7 @@ use Predis\Protocol\ProtocolException; * built-in into Predis, such as transactions or pipelines. Use them with care! * * @link http://redis.io/topics/protocol + * * @author Daniele Alessandri */ class StreamableMultiBulkResponse implements ResponseHandlerInterface diff --git a/src/Protocol/Text/ProtocolProcessor.php b/src/Protocol/Text/ProtocolProcessor.php index 59a192d3..45c0da13 100644 --- a/src/Protocol/Text/ProtocolProcessor.php +++ b/src/Protocol/Text/ProtocolProcessor.php @@ -24,6 +24,7 @@ use Predis\Response\Iterator\MultiBulk as MultiBulkIterator; * Protocol processor for the standard Redis wire protocol. * * @link http://redis.io/topics/protocol + * * @author Daniele Alessandri */ class ProtocolProcessor implements ProtocolProcessorInterface @@ -65,7 +66,7 @@ class ProtocolProcessor implements ProtocolProcessorInterface case '$': $size = (int) $payload; if ($size === -1) { - return null; + return; } return substr($connection->readBuffer($size + 2), 0, -2); @@ -74,7 +75,7 @@ class ProtocolProcessor implements ProtocolProcessorInterface $count = (int) $payload; if ($count === -1) { - return null; + return; } if ($this->mbiterable) { return new MultiBulkIterator($connection, $count); @@ -82,7 +83,7 @@ class ProtocolProcessor implements ProtocolProcessorInterface $multibulk = array(); - for ($i = 0; $i < $count; $i++) { + for ($i = 0; $i < $count; ++$i) { $multibulk[$i] = $this->read($connection); } diff --git a/src/Protocol/Text/RequestSerializer.php b/src/Protocol/Text/RequestSerializer.php index 5d429d18..c8cbbfbc 100644 --- a/src/Protocol/Text/RequestSerializer.php +++ b/src/Protocol/Text/RequestSerializer.php @@ -18,6 +18,7 @@ use Predis\Protocol\RequestSerializerInterface; * Request serializer for the standard Redis wire protocol. * * @link http://redis.io/topics/protocol + * * @author Daniele Alessandri */ class RequestSerializer implements RequestSerializerInterface @@ -35,7 +36,7 @@ class RequestSerializer implements RequestSerializerInterface $buffer = "*{$reqlen}\r\n\${$cmdlen}\r\n{$commandID}\r\n"; - for ($i = 0, $reqlen--; $i < $reqlen; $i++) { + for ($i = 0, $reqlen--; $i < $reqlen; ++$i) { $argument = $arguments[$i]; $arglen = strlen($argument); $buffer .= "\${$arglen}\r\n{$argument}\r\n"; diff --git a/src/Protocol/Text/ResponseReader.php b/src/Protocol/Text/ResponseReader.php index 1d6875bf..d96218df 100644 --- a/src/Protocol/Text/ResponseReader.php +++ b/src/Protocol/Text/ResponseReader.php @@ -20,6 +20,7 @@ use Predis\Protocol\ResponseReaderInterface; * Response reader for the standard Redis wire protocol. * * @link http://redis.io/topics/protocol + * * @author Daniele Alessandri */ class ResponseReader implements ResponseReaderInterface @@ -74,7 +75,7 @@ class ResponseReader implements ResponseReaderInterface return $this->handlers[$prefix]; } - return null; + return; } /** diff --git a/src/PubSub/AbstractConsumer.php b/src/PubSub/AbstractConsumer.php index 19cfa1dc..f9bd11fc 100644 --- a/src/PubSub/AbstractConsumer.php +++ b/src/PubSub/AbstractConsumer.php @@ -20,17 +20,17 @@ use Iterator; */ abstract class AbstractConsumer implements Iterator { - const SUBSCRIBE = 'subscribe'; - const UNSUBSCRIBE = 'unsubscribe'; - const PSUBSCRIBE = 'psubscribe'; + const SUBSCRIBE = 'subscribe'; + const UNSUBSCRIBE = 'unsubscribe'; + const PSUBSCRIBE = 'psubscribe'; const PUNSUBSCRIBE = 'punsubscribe'; - const MESSAGE = 'message'; - const PMESSAGE = 'pmessage'; - const PONG = 'pong'; + const MESSAGE = 'message'; + const PMESSAGE = 'pmessage'; + const PONG = 'pong'; - const STATUS_VALID = 1; // 0b0001 - const STATUS_SUBSCRIBED = 2; // 0b0010 - const STATUS_PSUBSCRIBED = 4; // 0b0100 + const STATUS_VALID = 1; // 0b0001 + const STATUS_SUBSCRIBED = 2; // 0b0010 + const STATUS_PSUBSCRIBED = 4; // 0b0100 private $position = null; private $statusFlags = self::STATUS_VALID; @@ -183,7 +183,7 @@ abstract class AbstractConsumer implements Iterator public function next() { if ($this->valid()) { - $this->position++; + ++$this->position; } return $this->position; @@ -208,7 +208,7 @@ abstract class AbstractConsumer implements Iterator */ protected function invalidate() { - $this->statusFlags = 0; // 0b0000; + $this->statusFlags = 0; // 0b0000; } /** diff --git a/src/PubSub/Consumer.php b/src/PubSub/Consumer.php index 478beeba..ae945318 100644 --- a/src/PubSub/Consumer.php +++ b/src/PubSub/Consumer.php @@ -130,14 +130,14 @@ class Consumer extends AbstractConsumer case self::MESSAGE: return (object) array( - 'kind' => $response[0], + 'kind' => $response[0], 'channel' => $response[1], 'payload' => $response[2], ); case self::PMESSAGE: return (object) array( - 'kind' => $response[0], + 'kind' => $response[0], 'pattern' => $response[1], 'channel' => $response[2], 'payload' => $response[3], @@ -145,7 +145,7 @@ class Consumer extends AbstractConsumer case self::PONG: return (object) array( - 'kind' => $response[0], + 'kind' => $response[0], 'payload' => $response[1], ); diff --git a/src/PubSub/DispatcherLoop.php b/src/PubSub/DispatcherLoop.php index b1088484..e14ef91a 100644 --- a/src/PubSub/DispatcherLoop.php +++ b/src/PubSub/DispatcherLoop.php @@ -97,7 +97,7 @@ class DispatcherLoop */ public function attachCallback($channel, $callback) { - $callbackName = $this->getPrefixKeys() . $channel; + $callbackName = $this->getPrefixKeys().$channel; $this->assertCallback($callback); $this->callbacks[$callbackName] = $callback; @@ -111,7 +111,7 @@ class DispatcherLoop */ public function detachCallback($channel) { - $callbackName = $this->getPrefixKeys() . $channel; + $callbackName = $this->getPrefixKeys().$channel; if (isset($this->callbacks[$callbackName])) { unset($this->callbacks[$callbackName]); @@ -155,7 +155,7 @@ class DispatcherLoop } /** - * Return the prefix used for keys + * Return the prefix used for keys. * * @return string */ diff --git a/src/Replication/ReplicationStrategy.php b/src/Replication/ReplicationStrategy.php index 70c7a7a5..2a279624 100644 --- a/src/Replication/ReplicationStrategy.php +++ b/src/Replication/ReplicationStrategy.php @@ -154,17 +154,17 @@ class ReplicationStrategy protected function getDisallowedOperations() { return array( - 'SHUTDOWN' => true, - 'INFO' => true, - 'DBSIZE' => true, - 'LASTSAVE' => true, - 'CONFIG' => true, - 'MONITOR' => true, - 'SLAVEOF' => true, - 'SAVE' => true, - 'BGSAVE' => true, - 'BGREWRITEAOF' => true, - 'SLOWLOG' => true, + 'SHUTDOWN' => true, + 'INFO' => true, + 'DBSIZE' => true, + 'LASTSAVE' => true, + 'CONFIG' => true, + 'MONITOR' => true, + 'SLAVEOF' => true, + 'SAVE' => true, + 'BGSAVE' => true, + 'BGREWRITEAOF' => true, + 'SLOWLOG' => true, ); } @@ -176,61 +176,61 @@ class ReplicationStrategy protected function getReadOnlyOperations() { return array( - 'EXISTS' => true, - 'TYPE' => true, - 'KEYS' => true, - 'SCAN' => true, - 'RANDOMKEY' => true, - 'TTL' => true, - 'GET' => true, - 'MGET' => true, - 'SUBSTR' => true, - 'STRLEN' => true, - 'GETRANGE' => true, - 'GETBIT' => true, - 'LLEN' => true, - 'LRANGE' => true, - 'LINDEX' => true, - 'SCARD' => true, - 'SISMEMBER' => true, - 'SINTER' => true, - 'SUNION' => true, - 'SDIFF' => true, - 'SMEMBERS' => true, - 'SSCAN' => true, - 'SRANDMEMBER' => true, - 'ZRANGE' => true, - 'ZREVRANGE' => true, - 'ZRANGEBYSCORE' => true, - 'ZREVRANGEBYSCORE' => true, - 'ZCARD' => true, - 'ZSCORE' => true, - 'ZCOUNT' => true, - 'ZRANK' => true, - 'ZREVRANK' => true, - 'ZSCAN' => true, - 'ZLEXCOUNT' => true, - 'ZRANGEBYLEX' => true, - 'ZREVRANGEBYLEX' => true, - 'HGET' => true, - 'HMGET' => true, - 'HEXISTS' => true, - 'HLEN' => true, - 'HKEYS' => true, - 'HVALS' => true, - 'HGETALL' => true, - 'HSCAN' => true, - 'PING' => true, - 'AUTH' => true, - 'SELECT' => true, - 'ECHO' => true, - 'QUIT' => true, - 'OBJECT' => true, - 'BITCOUNT' => true, - 'BITPOS' => true, - 'TIME' => true, - 'PFCOUNT' => true, - 'SORT' => array($this, 'isSortReadOnly'), + 'EXISTS' => true, + 'TYPE' => true, + 'KEYS' => true, + 'SCAN' => true, + 'RANDOMKEY' => true, + 'TTL' => true, + 'GET' => true, + 'MGET' => true, + 'SUBSTR' => true, + 'STRLEN' => true, + 'GETRANGE' => true, + 'GETBIT' => true, + 'LLEN' => true, + 'LRANGE' => true, + 'LINDEX' => true, + 'SCARD' => true, + 'SISMEMBER' => true, + 'SINTER' => true, + 'SUNION' => true, + 'SDIFF' => true, + 'SMEMBERS' => true, + 'SSCAN' => true, + 'SRANDMEMBER' => true, + 'ZRANGE' => true, + 'ZREVRANGE' => true, + 'ZRANGEBYSCORE' => true, + 'ZREVRANGEBYSCORE' => true, + 'ZCARD' => true, + 'ZSCORE' => true, + 'ZCOUNT' => true, + 'ZRANK' => true, + 'ZREVRANK' => true, + 'ZSCAN' => true, + 'ZLEXCOUNT' => true, + 'ZRANGEBYLEX' => true, + 'ZREVRANGEBYLEX' => true, + 'HGET' => true, + 'HMGET' => true, + 'HEXISTS' => true, + 'HLEN' => true, + 'HKEYS' => true, + 'HVALS' => true, + 'HGETALL' => true, + 'HSCAN' => true, + 'PING' => true, + 'AUTH' => true, + 'SELECT' => true, + 'ECHO' => true, + 'QUIT' => true, + 'OBJECT' => true, + 'BITCOUNT' => true, + 'BITPOS' => true, + 'TIME' => true, + 'PFCOUNT' => true, + 'SORT' => array($this, 'isSortReadOnly'), ); } } diff --git a/src/Response/Error.php b/src/Response/Error.php index 270f96fa..3933857e 100644 --- a/src/Response/Error.php +++ b/src/Response/Error.php @@ -42,7 +42,7 @@ class Error implements ErrorInterface */ public function getErrorType() { - list($errorType, ) = explode(' ', $this->getMessage(), 2); + list($errorType) = explode(' ', $this->getMessage(), 2); return $errorType; } diff --git a/src/Response/ErrorInterface.php b/src/Response/ErrorInterface.php index 6fd31fab..a4a4a02f 100644 --- a/src/Response/ErrorInterface.php +++ b/src/Response/ErrorInterface.php @@ -20,14 +20,14 @@ namespace Predis\Response; interface ErrorInterface extends ResponseInterface { /** - * Returns the error message + * Returns the error message. * * @return string */ public function getMessage(); /** - * Returns the error type (e.g. ERR, ASK, MOVED) + * Returns the error type (e.g. ERR, ASK, MOVED). * * @return string */ diff --git a/src/Response/Iterator/MultiBulk.php b/src/Response/Iterator/MultiBulk.php index 65478b2d..b1d29241 100644 --- a/src/Response/Iterator/MultiBulk.php +++ b/src/Response/Iterator/MultiBulk.php @@ -31,7 +31,7 @@ class MultiBulk extends MultiBulkIterator $this->connection = $connection; $this->size = $size; $this->position = 0; - $this->current = $size > 0 ? $this->getValue() : null; + $this->current = $size > 0 ? $this->getValue() : null; } /** diff --git a/src/Response/Iterator/MultiBulkTuple.php b/src/Response/Iterator/MultiBulkTuple.php index 204df13e..19c504cf 100644 --- a/src/Response/Iterator/MultiBulkTuple.php +++ b/src/Response/Iterator/MultiBulkTuple.php @@ -38,7 +38,7 @@ class MultiBulkTuple extends MultiBulk implements OuterIterator $this->size = count($iterator) / 2; $this->iterator = $iterator; $this->position = $iterator->getPosition(); - $this->current = $this->size > 0 ? $this->getValue() : null; + $this->current = $this->size > 0 ? $this->getValue() : null; } /** @@ -58,7 +58,7 @@ class MultiBulkTuple extends MultiBulk implements OuterIterator } if (($size = count($iterator)) % 2 !== 0) { - throw new UnexpectedValueException("Invalid response size for a tuple iterator."); + throw new UnexpectedValueException('Invalid response size for a tuple iterator.'); } } diff --git a/src/Response/ServerException.php b/src/Response/ServerException.php index 31c24266..407dc5b7 100644 --- a/src/Response/ServerException.php +++ b/src/Response/ServerException.php @@ -27,7 +27,7 @@ class ServerException extends PredisException implements ErrorInterface */ public function getErrorType() { - list($errorType, ) = explode(' ', $this->getMessage(), 2); + list($errorType) = explode(' ', $this->getMessage(), 2); return $errorType; } diff --git a/src/Transaction/MultiExec.php b/src/Transaction/MultiExec.php index 456da9b4..041e3c2f 100644 --- a/src/Transaction/MultiExec.php +++ b/src/Transaction/MultiExec.php @@ -40,9 +40,9 @@ class MultiExec implements ClientContextInterface protected $client; protected $commands; protected $exceptions = true; - protected $attempts = 0; - protected $watchKeys = array(); - protected $modeCAS = false; + protected $attempts = 0; + protected $watchKeys = array(); + protected $modeCAS = false; /** * @param ClientInterface $client Client instance used by the transaction. @@ -376,7 +376,7 @@ class MultiExec implements ClientContextInterface $this->discard(); } - return null; + return; } $execResponse = $this->call('EXEC'); @@ -404,7 +404,7 @@ class MultiExec implements ClientContextInterface $this->onProtocolError('EXEC returned an unexpected number of response items.'); } - for ($i = 0; $i < $size; $i++) { + for ($i = 0; $i < $size; ++$i) { $cmdResponse = $execResponse[$i]; if ($cmdResponse instanceof ErrorResponseInterface && $this->exceptions) { diff --git a/src/Transaction/MultiExecState.php b/src/Transaction/MultiExecState.php index a0a82852..4bed42af 100644 --- a/src/Transaction/MultiExecState.php +++ b/src/Transaction/MultiExecState.php @@ -20,9 +20,9 @@ class MultiExecState { const INITIALIZED = 1; // 0b00001 const INSIDEBLOCK = 2; // 0b00010 - const DISCARDED = 4; // 0b00100 - const CAS = 8; // 0b01000 - const WATCH = 16; // 0b10000 + const DISCARDED = 4; // 0b00100 + const CAS = 8; // 0b01000 + const WATCH = 16; // 0b10000 private $flags; diff --git a/tests/PHPUnit/PredisDistributorTestCase.php b/tests/PHPUnit/PredisDistributorTestCase.php index 1ad89345..d3dd26e9 100644 --- a/tests/PHPUnit/PredisDistributorTestCase.php +++ b/tests/PHPUnit/PredisDistributorTestCase.php @@ -37,7 +37,7 @@ abstract class PredisDistributorTestCase extends PredisTestCase { $nodes = array(); - for ($i = 0; $i < $iterations; $i++) { + for ($i = 0; $i < $iterations; ++$i) { $hash = $distributor->hash($i * $i); $nodes[] = $distributor->getByHash($hash); } diff --git a/tests/PHPUnit/PredisProfileTestCase.php b/tests/PHPUnit/PredisProfileTestCase.php index b26aad6d..d8618cd8 100644 --- a/tests/PHPUnit/PredisProfileTestCase.php +++ b/tests/PHPUnit/PredisProfileTestCase.php @@ -29,7 +29,7 @@ abstract class PredisProfileTestCase extends PredisTestCase */ protected function getProfile($version = null) { - $this->markTestIncomplete("Server profile must be defined in ".get_class($this)); + $this->markTestIncomplete('Server profile must be defined in '.get_class($this)); } /** diff --git a/tests/PHPUnit/PredisTestCase.php b/tests/PHPUnit/PredisTestCase.php index 65dc2973..3d5bab05 100644 --- a/tests/PHPUnit/PredisTestCase.php +++ b/tests/PHPUnit/PredisTestCase.php @@ -227,7 +227,7 @@ abstract class PredisTestCase extends \PHPUnit_Framework_TestCase return $annotations['method']['requiresRedisVersion'][0]; } - return null; + return; } /** diff --git a/tests/PHPUnit/RedisCommandConstraint.php b/tests/PHPUnit/RedisCommandConstraint.php index a0b7c87a..234d9077 100644 --- a/tests/PHPUnit/RedisCommandConstraint.php +++ b/tests/PHPUnit/RedisCommandConstraint.php @@ -54,7 +54,7 @@ class RedisCommandConstraint extends \PHPUnit_Framework_Constraint return false; } - for ($i = 0; $i < count($this->arguments); $i++) { + for ($i = 0; $i < count($this->arguments); ++$i) { if (((string) $this->arguments[$i]) !== ((string) $otherArguments[$i])) { return false; } diff --git a/tests/Predis/ClientTest.php b/tests/Predis/ClientTest.php index 02efe4ed..3144105e 100644 --- a/tests/Predis/ClientTest.php +++ b/tests/Predis/ClientTest.php @@ -281,8 +281,8 @@ class ClientTest extends PredisTestCase $fnreplication->expects($this->never())->method('__invoke'); $arg2 = array( - 'aggregate' => function () use ($fnaggregate) { return $fnaggregate; }, - 'cluster' => function () use ($fncluster) { return $fncluster; }, + 'aggregate' => function () use ($fnaggregate) { return $fnaggregate; }, + 'cluster' => function () use ($fncluster) { return $fncluster; }, 'replication' => function () use ($fnreplication) { return $fnreplication; }, ); @@ -376,7 +376,7 @@ class ClientTest extends PredisTestCase $ping = $profile->createCommand('ping', array()); $hgetall = $profile->createCommand('hgetall', array('metavars', 'foo', 'hoge')); - $connection= $this->getMock('Predis\Connection\ConnectionInterface'); + $connection = $this->getMock('Predis\Connection\ConnectionInterface'); $connection->expects($this->at(0)) ->method('executeCommand') ->with($ping) @@ -402,7 +402,7 @@ class ClientTest extends PredisTestCase $ping = Profile\Factory::getDefault()->createCommand('ping', array()); $expectedResponse = new Response\Error('ERR Operation against a key holding the wrong kind of value'); - $connection= $this->getMock('Predis\Connection\ConnectionInterface'); + $connection = $this->getMock('Predis\Connection\ConnectionInterface'); $connection->expects($this->once()) ->method('executeCommand') ->will($this->returnValue($expectedResponse)); @@ -419,7 +419,7 @@ class ClientTest extends PredisTestCase $ping = Profile\Factory::getDefault()->createCommand('ping', array()); $expectedResponse = new Response\Error('ERR Operation against a key holding the wrong kind of value'); - $connection= $this->getMock('Predis\Connection\ConnectionInterface'); + $connection = $this->getMock('Predis\Connection\ConnectionInterface'); $connection->expects($this->once()) ->method('executeCommand') ->will($this->returnValue($expectedResponse)); diff --git a/tests/Predis/Cluster/PredisStrategyTest.php b/tests/Predis/Cluster/PredisStrategyTest.php index 11c8b3d2..99808c6a 100644 --- a/tests/Predis/Cluster/PredisStrategyTest.php +++ b/tests/Predis/Cluster/PredisStrategyTest.php @@ -255,126 +255,126 @@ class PredisStrategyTest extends PredisTestCase { $commands = array( /* commands operating on the key space */ - 'EXISTS' => 'keys-first', - 'DEL' => 'keys-all', - 'TYPE' => 'keys-first', - 'EXPIRE' => 'keys-first', - 'EXPIREAT' => 'keys-first', - 'PERSIST' => 'keys-first', - 'PEXPIRE' => 'keys-first', - 'PEXPIREAT' => 'keys-first', - 'TTL' => 'keys-first', - 'PTTL' => 'keys-first', - 'SORT' => 'keys-first', // TODO - 'DUMP' => 'keys-first', - 'RESTORE' => 'keys-first', + 'EXISTS' => 'keys-first', + 'DEL' => 'keys-all', + 'TYPE' => 'keys-first', + 'EXPIRE' => 'keys-first', + 'EXPIREAT' => 'keys-first', + 'PERSIST' => 'keys-first', + 'PEXPIRE' => 'keys-first', + 'PEXPIREAT' => 'keys-first', + 'TTL' => 'keys-first', + 'PTTL' => 'keys-first', + 'SORT' => 'keys-first', // TODO + 'DUMP' => 'keys-first', + 'RESTORE' => 'keys-first', /* commands operating on string values */ - 'APPEND' => 'keys-first', - 'DECR' => 'keys-first', - 'DECRBY' => 'keys-first', - 'GET' => 'keys-first', - 'GETBIT' => 'keys-first', - 'MGET' => 'keys-all', - 'SET' => 'keys-first', - 'GETRANGE' => 'keys-first', - 'GETSET' => 'keys-first', - 'INCR' => 'keys-first', - 'INCRBY' => 'keys-first', - 'INCRBYFLOAT' => 'keys-first', - 'SETBIT' => 'keys-first', - 'SETEX' => 'keys-first', - 'MSET' => 'keys-interleaved', - 'MSETNX' => 'keys-interleaved', - 'SETNX' => 'keys-first', - 'SETRANGE' => 'keys-first', - 'STRLEN' => 'keys-first', - 'SUBSTR' => 'keys-first', - 'BITOP' => 'keys-bitop', - 'BITCOUNT' => 'keys-first', + 'APPEND' => 'keys-first', + 'DECR' => 'keys-first', + 'DECRBY' => 'keys-first', + 'GET' => 'keys-first', + 'GETBIT' => 'keys-first', + 'MGET' => 'keys-all', + 'SET' => 'keys-first', + 'GETRANGE' => 'keys-first', + 'GETSET' => 'keys-first', + 'INCR' => 'keys-first', + 'INCRBY' => 'keys-first', + 'INCRBYFLOAT' => 'keys-first', + 'SETBIT' => 'keys-first', + 'SETEX' => 'keys-first', + 'MSET' => 'keys-interleaved', + 'MSETNX' => 'keys-interleaved', + 'SETNX' => 'keys-first', + 'SETRANGE' => 'keys-first', + 'STRLEN' => 'keys-first', + 'SUBSTR' => 'keys-first', + 'BITOP' => 'keys-bitop', + 'BITCOUNT' => 'keys-first', /* commands operating on lists */ - 'LINSERT' => 'keys-first', - 'LINDEX' => 'keys-first', - 'LLEN' => 'keys-first', - 'LPOP' => 'keys-first', - 'RPOP' => 'keys-first', - 'RPOPLPUSH' => 'keys-all', - 'BLPOP' => 'keys-blockinglist', - 'BRPOP' => 'keys-blockinglist', - 'BRPOPLPUSH' => 'keys-blockinglist', - 'LPUSH' => 'keys-first', - 'LPUSHX' => 'keys-first', - 'RPUSH' => 'keys-first', - 'RPUSHX' => 'keys-first', - 'LRANGE' => 'keys-first', - 'LREM' => 'keys-first', - 'LSET' => 'keys-first', - 'LTRIM' => 'keys-first', + 'LINSERT' => 'keys-first', + 'LINDEX' => 'keys-first', + 'LLEN' => 'keys-first', + 'LPOP' => 'keys-first', + 'RPOP' => 'keys-first', + 'RPOPLPUSH' => 'keys-all', + 'BLPOP' => 'keys-blockinglist', + 'BRPOP' => 'keys-blockinglist', + 'BRPOPLPUSH' => 'keys-blockinglist', + 'LPUSH' => 'keys-first', + 'LPUSHX' => 'keys-first', + 'RPUSH' => 'keys-first', + 'RPUSHX' => 'keys-first', + 'LRANGE' => 'keys-first', + 'LREM' => 'keys-first', + 'LSET' => 'keys-first', + 'LTRIM' => 'keys-first', /* commands operating on sets */ - 'SADD' => 'keys-first', - 'SCARD' => 'keys-first', - 'SDIFF' => 'keys-all', - 'SDIFFSTORE' => 'keys-all', - 'SINTER' => 'keys-all', - 'SINTERSTORE' => 'keys-all', - 'SUNION' => 'keys-all', - 'SUNIONSTORE' => 'keys-all', - 'SISMEMBER' => 'keys-first', - 'SMEMBERS' => 'keys-first', - 'SSCAN' => 'keys-first', - 'SPOP' => 'keys-first', - 'SRANDMEMBER' => 'keys-first', - 'SREM' => 'keys-first', + 'SADD' => 'keys-first', + 'SCARD' => 'keys-first', + 'SDIFF' => 'keys-all', + 'SDIFFSTORE' => 'keys-all', + 'SINTER' => 'keys-all', + 'SINTERSTORE' => 'keys-all', + 'SUNION' => 'keys-all', + 'SUNIONSTORE' => 'keys-all', + 'SISMEMBER' => 'keys-first', + 'SMEMBERS' => 'keys-first', + 'SSCAN' => 'keys-first', + 'SPOP' => 'keys-first', + 'SRANDMEMBER' => 'keys-first', + 'SREM' => 'keys-first', /* commands operating on sorted sets */ - 'ZADD' => 'keys-first', - 'ZCARD' => 'keys-first', - 'ZCOUNT' => 'keys-first', - 'ZINCRBY' => 'keys-first', - 'ZINTERSTORE' => 'keys-zaggregated', - 'ZRANGE' => 'keys-first', - 'ZRANGEBYSCORE' => 'keys-first', - 'ZRANK' => 'keys-first', - 'ZREM' => 'keys-first', - 'ZREMRANGEBYRANK' => 'keys-first', - 'ZREMRANGEBYSCORE' => 'keys-first', - 'ZREVRANGE' => 'keys-first', - 'ZREVRANGEBYSCORE' => 'keys-first', - 'ZREVRANK' => 'keys-first', - 'ZSCORE' => 'keys-first', - 'ZUNIONSTORE' => 'keys-zaggregated', - 'ZSCAN' => 'keys-first', - 'ZLEXCOUNT' => 'keys-first', - 'ZRANGEBYLEX' => 'keys-first', - 'ZREMRANGEBYLEX' => 'keys-first', - 'ZREVRANGEBYLEX' => 'keys-first', + 'ZADD' => 'keys-first', + 'ZCARD' => 'keys-first', + 'ZCOUNT' => 'keys-first', + 'ZINCRBY' => 'keys-first', + 'ZINTERSTORE' => 'keys-zaggregated', + 'ZRANGE' => 'keys-first', + 'ZRANGEBYSCORE' => 'keys-first', + 'ZRANK' => 'keys-first', + 'ZREM' => 'keys-first', + 'ZREMRANGEBYRANK' => 'keys-first', + 'ZREMRANGEBYSCORE' => 'keys-first', + 'ZREVRANGE' => 'keys-first', + 'ZREVRANGEBYSCORE' => 'keys-first', + 'ZREVRANK' => 'keys-first', + 'ZSCORE' => 'keys-first', + 'ZUNIONSTORE' => 'keys-zaggregated', + 'ZSCAN' => 'keys-first', + 'ZLEXCOUNT' => 'keys-first', + 'ZRANGEBYLEX' => 'keys-first', + 'ZREMRANGEBYLEX' => 'keys-first', + 'ZREVRANGEBYLEX' => 'keys-first', /* commands operating on hashes */ - 'HDEL' => 'keys-first', - 'HEXISTS' => 'keys-first', - 'HGET' => 'keys-first', - 'HGETALL' => 'keys-first', - 'HMGET' => 'keys-first', - 'HMSET' => 'keys-first', - 'HINCRBY' => 'keys-first', - 'HINCRBYFLOAT' => 'keys-first', - 'HKEYS' => 'keys-first', - 'HLEN' => 'keys-first', - 'HSET' => 'keys-first', - 'HSETNX' => 'keys-first', - 'HVALS' => 'keys-first', - 'HSCAN' => 'keys-first', + 'HDEL' => 'keys-first', + 'HEXISTS' => 'keys-first', + 'HGET' => 'keys-first', + 'HGETALL' => 'keys-first', + 'HMGET' => 'keys-first', + 'HMSET' => 'keys-first', + 'HINCRBY' => 'keys-first', + 'HINCRBYFLOAT' => 'keys-first', + 'HKEYS' => 'keys-first', + 'HLEN' => 'keys-first', + 'HSET' => 'keys-first', + 'HSETNX' => 'keys-first', + 'HVALS' => 'keys-first', + 'HSCAN' => 'keys-first', /* commands operating on HyperLogLog */ - 'PFADD' => 'keys-first', - 'PFCOUNT' => 'keys-all', - 'PFMERGE' => 'keys-all', + 'PFADD' => 'keys-first', + 'PFCOUNT' => 'keys-all', + 'PFMERGE' => 'keys-all', /* scripting */ - 'EVAL' => 'keys-script', - 'EVALSHA' => 'keys-script', + 'EVAL' => 'keys-script', + 'EVALSHA' => 'keys-script', ); if (isset($type)) { diff --git a/tests/Predis/Cluster/RedisStrategyTest.php b/tests/Predis/Cluster/RedisStrategyTest.php index d15c84e8..744e73fc 100644 --- a/tests/Predis/Cluster/RedisStrategyTest.php +++ b/tests/Predis/Cluster/RedisStrategyTest.php @@ -265,126 +265,126 @@ class RedisStrategyTest extends PredisTestCase { $commands = array( /* commands operating on the key space */ - 'EXISTS' => 'keys-first', - 'DEL' => 'keys-all', - 'TYPE' => 'keys-first', - 'EXPIRE' => 'keys-first', - 'EXPIREAT' => 'keys-first', - 'PERSIST' => 'keys-first', - 'PEXPIRE' => 'keys-first', - 'PEXPIREAT' => 'keys-first', - 'TTL' => 'keys-first', - 'PTTL' => 'keys-first', - 'SORT' => 'keys-first', // TODO - 'DUMP' => 'keys-first', - 'RESTORE' => 'keys-first', + 'EXISTS' => 'keys-first', + 'DEL' => 'keys-all', + 'TYPE' => 'keys-first', + 'EXPIRE' => 'keys-first', + 'EXPIREAT' => 'keys-first', + 'PERSIST' => 'keys-first', + 'PEXPIRE' => 'keys-first', + 'PEXPIREAT' => 'keys-first', + 'TTL' => 'keys-first', + 'PTTL' => 'keys-first', + 'SORT' => 'keys-first', // TODO + 'DUMP' => 'keys-first', + 'RESTORE' => 'keys-first', /* commands operating on string values */ - 'APPEND' => 'keys-first', - 'DECR' => 'keys-first', - 'DECRBY' => 'keys-first', - 'GET' => 'keys-first', - 'GETBIT' => 'keys-first', - 'MGET' => 'keys-all', - 'SET' => 'keys-first', - 'GETRANGE' => 'keys-first', - 'GETSET' => 'keys-first', - 'INCR' => 'keys-first', - 'INCRBY' => 'keys-first', - 'INCRBYFLOAT' => 'keys-first', - 'SETBIT' => 'keys-first', - 'SETEX' => 'keys-first', - 'MSET' => 'keys-interleaved', - 'MSETNX' => 'keys-interleaved', - 'SETNX' => 'keys-first', - 'SETRANGE' => 'keys-first', - 'STRLEN' => 'keys-first', - 'SUBSTR' => 'keys-first', - 'BITOP' => 'keys-bitop', - 'BITCOUNT' => 'keys-first', + 'APPEND' => 'keys-first', + 'DECR' => 'keys-first', + 'DECRBY' => 'keys-first', + 'GET' => 'keys-first', + 'GETBIT' => 'keys-first', + 'MGET' => 'keys-all', + 'SET' => 'keys-first', + 'GETRANGE' => 'keys-first', + 'GETSET' => 'keys-first', + 'INCR' => 'keys-first', + 'INCRBY' => 'keys-first', + 'INCRBYFLOAT' => 'keys-first', + 'SETBIT' => 'keys-first', + 'SETEX' => 'keys-first', + 'MSET' => 'keys-interleaved', + 'MSETNX' => 'keys-interleaved', + 'SETNX' => 'keys-first', + 'SETRANGE' => 'keys-first', + 'STRLEN' => 'keys-first', + 'SUBSTR' => 'keys-first', + 'BITOP' => 'keys-bitop', + 'BITCOUNT' => 'keys-first', /* commands operating on lists */ - 'LINSERT' => 'keys-first', - 'LINDEX' => 'keys-first', - 'LLEN' => 'keys-first', - 'LPOP' => 'keys-first', - 'RPOP' => 'keys-first', - 'RPOPLPUSH' => 'keys-all', - 'BLPOP' => 'keys-blockinglist', - 'BRPOP' => 'keys-blockinglist', - 'BRPOPLPUSH' => 'keys-blockinglist', - 'LPUSH' => 'keys-first', - 'LPUSHX' => 'keys-first', - 'RPUSH' => 'keys-first', - 'RPUSHX' => 'keys-first', - 'LRANGE' => 'keys-first', - 'LREM' => 'keys-first', - 'LSET' => 'keys-first', - 'LTRIM' => 'keys-first', + 'LINSERT' => 'keys-first', + 'LINDEX' => 'keys-first', + 'LLEN' => 'keys-first', + 'LPOP' => 'keys-first', + 'RPOP' => 'keys-first', + 'RPOPLPUSH' => 'keys-all', + 'BLPOP' => 'keys-blockinglist', + 'BRPOP' => 'keys-blockinglist', + 'BRPOPLPUSH' => 'keys-blockinglist', + 'LPUSH' => 'keys-first', + 'LPUSHX' => 'keys-first', + 'RPUSH' => 'keys-first', + 'RPUSHX' => 'keys-first', + 'LRANGE' => 'keys-first', + 'LREM' => 'keys-first', + 'LSET' => 'keys-first', + 'LTRIM' => 'keys-first', /* commands operating on sets */ - 'SADD' => 'keys-first', - 'SCARD' => 'keys-first', - 'SDIFF' => 'keys-all', - 'SDIFFSTORE' => 'keys-all', - 'SINTER' => 'keys-all', - 'SINTERSTORE' => 'keys-all', - 'SUNION' => 'keys-all', - 'SUNIONSTORE' => 'keys-all', - 'SISMEMBER' => 'keys-first', - 'SMEMBERS' => 'keys-first', - 'SSCAN' => 'keys-first', - 'SPOP' => 'keys-first', - 'SRANDMEMBER' => 'keys-first', - 'SREM' => 'keys-first', + 'SADD' => 'keys-first', + 'SCARD' => 'keys-first', + 'SDIFF' => 'keys-all', + 'SDIFFSTORE' => 'keys-all', + 'SINTER' => 'keys-all', + 'SINTERSTORE' => 'keys-all', + 'SUNION' => 'keys-all', + 'SUNIONSTORE' => 'keys-all', + 'SISMEMBER' => 'keys-first', + 'SMEMBERS' => 'keys-first', + 'SSCAN' => 'keys-first', + 'SPOP' => 'keys-first', + 'SRANDMEMBER' => 'keys-first', + 'SREM' => 'keys-first', /* commands operating on sorted sets */ - 'ZADD' => 'keys-first', - 'ZCARD' => 'keys-first', - 'ZCOUNT' => 'keys-first', - 'ZINCRBY' => 'keys-first', - 'ZINTERSTORE' => 'keys-zaggregated', - 'ZRANGE' => 'keys-first', - 'ZRANGEBYSCORE' => 'keys-first', - 'ZRANK' => 'keys-first', - 'ZREM' => 'keys-first', - 'ZREMRANGEBYRANK' => 'keys-first', - 'ZREMRANGEBYSCORE' => 'keys-first', - 'ZREVRANGE' => 'keys-first', - 'ZREVRANGEBYSCORE' => 'keys-first', - 'ZREVRANK' => 'keys-first', - 'ZSCORE' => 'keys-first', - 'ZUNIONSTORE' => 'keys-zaggregated', - 'ZSCAN' => 'keys-first', - 'ZLEXCOUNT' => 'keys-first', - 'ZRANGEBYLEX' => 'keys-first', - 'ZREMRANGEBYLEX' => 'keys-first', - 'ZREVRANGEBYLEX' => 'keys-first', + 'ZADD' => 'keys-first', + 'ZCARD' => 'keys-first', + 'ZCOUNT' => 'keys-first', + 'ZINCRBY' => 'keys-first', + 'ZINTERSTORE' => 'keys-zaggregated', + 'ZRANGE' => 'keys-first', + 'ZRANGEBYSCORE' => 'keys-first', + 'ZRANK' => 'keys-first', + 'ZREM' => 'keys-first', + 'ZREMRANGEBYRANK' => 'keys-first', + 'ZREMRANGEBYSCORE' => 'keys-first', + 'ZREVRANGE' => 'keys-first', + 'ZREVRANGEBYSCORE' => 'keys-first', + 'ZREVRANK' => 'keys-first', + 'ZSCORE' => 'keys-first', + 'ZUNIONSTORE' => 'keys-zaggregated', + 'ZSCAN' => 'keys-first', + 'ZLEXCOUNT' => 'keys-first', + 'ZRANGEBYLEX' => 'keys-first', + 'ZREMRANGEBYLEX' => 'keys-first', + 'ZREVRANGEBYLEX' => 'keys-first', /* commands operating on hashes */ - 'HDEL' => 'keys-first', - 'HEXISTS' => 'keys-first', - 'HGET' => 'keys-first', - 'HGETALL' => 'keys-first', - 'HMGET' => 'keys-first', - 'HMSET' => 'keys-first', - 'HINCRBY' => 'keys-first', - 'HINCRBYFLOAT' => 'keys-first', - 'HKEYS' => 'keys-first', - 'HLEN' => 'keys-first', - 'HSET' => 'keys-first', - 'HSETNX' => 'keys-first', - 'HVALS' => 'keys-first', - 'HSCAN' => 'keys-first', + 'HDEL' => 'keys-first', + 'HEXISTS' => 'keys-first', + 'HGET' => 'keys-first', + 'HGETALL' => 'keys-first', + 'HMGET' => 'keys-first', + 'HMSET' => 'keys-first', + 'HINCRBY' => 'keys-first', + 'HINCRBYFLOAT' => 'keys-first', + 'HKEYS' => 'keys-first', + 'HLEN' => 'keys-first', + 'HSET' => 'keys-first', + 'HSETNX' => 'keys-first', + 'HVALS' => 'keys-first', + 'HSCAN' => 'keys-first', /* commands operating on HyperLogLog */ - 'PFADD' => 'keys-first', - 'PFCOUNT' => 'keys-all', - 'PFMERGE' => 'keys-all', + 'PFADD' => 'keys-first', + 'PFCOUNT' => 'keys-all', + 'PFMERGE' => 'keys-all', /* scripting */ - 'EVAL' => 'keys-script', - 'EVALSHA' => 'keys-script', + 'EVAL' => 'keys-script', + 'EVALSHA' => 'keys-script', ); if (isset($type)) { diff --git a/tests/Predis/Collection/Iterator/ListKeyTest.php b/tests/Predis/Collection/Iterator/ListKeyTest.php index 7a95edb0..c1898f95 100644 --- a/tests/Predis/Collection/Iterator/ListKeyTest.php +++ b/tests/Predis/Collection/Iterator/ListKeyTest.php @@ -90,7 +90,7 @@ class ListKeyTest extends PredisTestCase ->method('lrange') ->with('key:list', 0, 9) ->will($this->returnValue(array( - 'item:1', 'item:2', 'item:3', 'item:4', 'item:5', 'item:6', 'item:7', 'item:8', 'item:9', 'item:10' + 'item:1', 'item:2', 'item:3', 'item:4', 'item:5', 'item:6', 'item:7', 'item:8', 'item:9', 'item:10', ))); $client->expects($this->at(2)) ->method('lrange') diff --git a/tests/Predis/Collection/Iterator/SortedSetKeyTest.php b/tests/Predis/Collection/Iterator/SortedSetKeyTest.php index b87d8d90..cc91dd79 100644 --- a/tests/Predis/Collection/Iterator/SortedSetKeyTest.php +++ b/tests/Predis/Collection/Iterator/SortedSetKeyTest.php @@ -238,7 +238,7 @@ class SortedSetKeyTest extends PredisTestCase ->method('zscan') ->with('key:zset', 5, array()) ->will($this->returnValue(array(0, array( - 'member:3rd' => 3.0 + 'member:3rd' => 3.0, )))); $iterator = new SortedSetKey($client, 'key:zset'); diff --git a/tests/Predis/Command/KeySortTest.php b/tests/Predis/Command/KeySortTest.php index 57bf4086..0421361b 100644 --- a/tests/Predis/Command/KeySortTest.php +++ b/tests/Predis/Command/KeySortTest.php @@ -38,8 +38,9 @@ class KeySortTest extends PredisCommandTestCase /** * Utility method to to an LPUSH of some unordered values on a key. * - * @param Client $redis Redis client instance. - * @param string $key Target key + * @param Client $redis Redis client instance. + * @param string $key Target key + * * @return array */ protected function lpushUnorderedList(Client $redis, $key) @@ -59,7 +60,7 @@ class KeySortTest extends PredisCommandTestCase 'by' => 'by_key_*', 'limit' => array(1, 4), 'get' => array('object_*', '#'), - 'sort' => 'asc', + 'sort' => 'asc', 'alpha' => true, 'store' => 'destination_key', ); @@ -67,7 +68,7 @@ class KeySortTest extends PredisCommandTestCase $expected = array( 'key', 'BY', 'by_key_*', 'GET', 'object_*', 'GET', '#', - 'LIMIT', 1, 4, 'ASC', 'ALPHA', 'STORE', 'destination_key' + 'LIMIT', 1, 4, 'ASC', 'ALPHA', 'STORE', 'destination_key', ); $command = $this->getCommand(); @@ -155,7 +156,7 @@ class KeySortTest extends PredisCommandTestCase $this->assertEquals( array(10, 30), $redis->sort('list:unordered', array( - 'limit' => array(3, 2) + 'limit' => array(3, 2), )) ); } @@ -171,7 +172,7 @@ class KeySortTest extends PredisCommandTestCase $this->assertEquals( array(1, 10, 100, 2, 3, 30), $redis->sort('list:unordered', array( - 'alpha' => true + 'alpha' => true, )) ); } @@ -187,7 +188,7 @@ class KeySortTest extends PredisCommandTestCase $this->assertEquals( count($unordered), $redis->sort('list:unordered', array( - 'store' => 'list:ordered' + 'store' => 'list:ordered', )) ); @@ -206,8 +207,8 @@ class KeySortTest extends PredisCommandTestCase array(30, 10, 3, 2), $redis->sort('list:unordered', array( 'alpha' => false, - 'sort' => 'desc', - 'limit' => array(1, 4) + 'sort' => 'desc', + 'limit' => array(1, 4), )) ); } diff --git a/tests/Predis/Command/Processor/KeyPrefixProcessorTest.php b/tests/Predis/Command/Processor/KeyPrefixProcessorTest.php index 910bc63d..08711566 100644 --- a/tests/Predis/Command/Processor/KeyPrefixProcessorTest.php +++ b/tests/Predis/Command/Processor/KeyPrefixProcessorTest.php @@ -202,7 +202,7 @@ class KeyPrefixProcessorTest extends PredisTestCase { $arguments = array('key:destination', 2, 'key1', 'key2', 'WEIGHTS', 10, 100, 'AGGREGATE', 'sum'); $expected = array( - 'prefix:key:destination', 2, 'prefix:key1', 'prefix:key2', 'WEIGHTS', 10, 100, 'AGGREGATE', 'sum' + 'prefix:key:destination', 2, 'prefix:key1', 'prefix:key2', 'WEIGHTS', 10, 100, 'AGGREGATE', 'sum', ); $command = $this->getMockForAbstractClass('Predis\Command\Command'); @@ -225,7 +225,7 @@ class KeyPrefixProcessorTest extends PredisTestCase { $arguments = array('return {KEYS[1],KEYS[2],ARGV[1],ARGV[2]}', 2, 'foo', 'hoge', 'bar', 'piyo'); $expected = array( - 'return {KEYS[1],KEYS[2],ARGV[1],ARGV[2]}', 2, 'prefix:foo', 'prefix:hoge', 'bar', 'piyo' + 'return {KEYS[1],KEYS[2],ARGV[1],ARGV[2]}', 2, 'prefix:foo', 'prefix:hoge', 'bar', 'piyo', ); $command = $this->getMockForAbstractClass('Predis\Command\Command'); diff --git a/tests/Predis/Command/ServerClientTest.php b/tests/Predis/Command/ServerClientTest.php index 1e45a0af..cf3f040a 100644 --- a/tests/Predis/Command/ServerClientTest.php +++ b/tests/Predis/Command/ServerClientTest.php @@ -106,17 +106,17 @@ class ServerClientTest extends PredisCommandTestCase $command = $this->getCommand(); $command->setArguments(array('list')); - $raw =<<'127.0.0.1:45393','fd'=>'6','idle'=>'0','flags'=>'N','db'=>'0','sub'=>'0','psub'=>'0'), - array('addr'=>'127.0.0.1:45394','fd'=>'7','idle'=>'0','flags'=>'N','db'=>'0','sub'=>'0','psub'=>'0'), - array('addr'=>'127.0.0.1:45395','fd'=>'8','idle'=>'0','flags'=>'N','db'=>'0','sub'=>'0','psub'=>'0'), + $parsed = array( + array('addr' => '127.0.0.1:45393','fd' => '6','idle' => '0','flags' => 'N','db' => '0','sub' => '0','psub' => '0'), + array('addr' => '127.0.0.1:45394','fd' => '7','idle' => '0','flags' => 'N','db' => '0','sub' => '0','psub' => '0'), + array('addr' => '127.0.0.1:45395','fd' => '8','idle' => '0','flags' => 'N','db' => '0','sub' => '0','psub' => '0'), ); $this->assertSame($parsed, $command->parseResponse($raw)); @@ -147,13 +147,13 @@ BUFFER; */ public function testGetsNameOfConnection() { - $redis = $this->getClient(); - $clientName = $redis->client('GETNAME'); - $this->assertNull($clientName); + $redis = $this->getClient(); + $clientName = $redis->client('GETNAME'); + $this->assertNull($clientName); - $expectedConnectionName = 'foo-bar'; - $this->assertEquals('OK', $redis->client('SETNAME', $expectedConnectionName)); - $this->assertEquals($expectedConnectionName, $redis->client('GETNAME')); + $expectedConnectionName = 'foo-bar'; + $this->assertEquals('OK', $redis->client('SETNAME', $expectedConnectionName)); + $this->assertEquals($expectedConnectionName, $redis->client('GETNAME')); } /** @@ -162,11 +162,11 @@ BUFFER; */ public function testSetsNameOfConnection() { - $redis = $this->getClient(); + $redis = $this->getClient(); - $expectedConnectionName = 'foo-baz'; - $this->assertEquals('OK', $redis->client('SETNAME', $expectedConnectionName)); - $this->assertEquals($expectedConnectionName, $redis->client('GETNAME')); + $expectedConnectionName = 'foo-baz'; + $this->assertEquals('OK', $redis->client('SETNAME', $expectedConnectionName)); + $this->assertEquals($expectedConnectionName, $redis->client('GETNAME')); } /** @@ -187,12 +187,13 @@ BUFFER; * @dataProvider invalidConnectionNameProvider * * @expectedException \Predis\Response\ServerException + * * @param string $invalidConnectionName */ public function testInvalidSetNameOfConnection($invalidConnectionName) { - $redis = $this->getClient(); - $redis->client('SETNAME', $invalidConnectionName); + $redis = $this->getClient(); + $redis->client('SETNAME', $invalidConnectionName); } /** diff --git a/tests/Predis/Command/ServerInfoTest.php b/tests/Predis/Command/ServerInfoTest.php index 20c36e87..1bc69b17 100644 --- a/tests/Predis/Command/ServerInfoTest.php +++ b/tests/Predis/Command/ServerInfoTest.php @@ -49,7 +49,7 @@ class ServerInfoTest extends PredisCommandTestCase */ public function testParseResponse() { - $raw =<< array( 'redis_version' => '2.9.0', 'redis_git_sha1' => '237194b7', @@ -181,7 +181,7 @@ BUFFER; ), 'Keyspace' => array( 'db0' => array('keys' => '2', 'expires' => '0'), - 'db5' => array('keys' => '1', 'expires' => '0') + 'db5' => array('keys' => '1', 'expires' => '0'), ), ); @@ -193,7 +193,7 @@ BUFFER; */ public function testCanParseResponsesFromOlderRedisVersions() { - $raw =<< "predis:master", - "ip" => "127.0.0.1", - "port" => "6379", - "runid" => "89f6128a7e5780aa6ef7d4d7022cfafbf799b3ab", - "flags" => "master", - "pending-commands" => "0", - "last-ok-ping-reply" => "386", - "last-ping-reply" => "386", - "info-refresh" => "9926", - "num-slaves" => "1", - "num-other-sentinels" => "0", - "quorum" => "2", + 'name' => 'predis:master', + 'ip' => '127.0.0.1', + 'port' => '6379', + 'runid' => '89f6128a7e5780aa6ef7d4d7022cfafbf799b3ab', + 'flags' => 'master', + 'pending-commands' => '0', + 'last-ok-ping-reply' => '386', + 'last-ping-reply' => '386', + 'info-refresh' => '9926', + 'num-slaves' => '1', + 'num-other-sentinels' => '0', + 'quorum' => '2', ), ); @@ -108,40 +108,40 @@ class ServerSentinelTest extends PredisCommandTestCase { $response = array( array( - "name", "127.0.0.1:6380", - "ip", "127.0.0.1", - "port", "6380", - "runid", "92aea60e4fead2507cccd6574e4c7139d401d0ae", - "flags", "slave", - "pending-commands", "0", - "last-ok-ping-reply", "1011", - "last-ping-reply", "1011", - "info-refresh", "4366", - "master-link-down-time", "0", - "master-link-status", "ok", - "master-host", "127.0.0.1", - "master-port", "6379", - "slave-priority", "100", - ) + 'name', '127.0.0.1:6380', + 'ip', '127.0.0.1', + 'port', '6380', + 'runid', '92aea60e4fead2507cccd6574e4c7139d401d0ae', + 'flags', 'slave', + 'pending-commands', '0', + 'last-ok-ping-reply', '1011', + 'last-ping-reply', '1011', + 'info-refresh', '4366', + 'master-link-down-time', '0', + 'master-link-status', 'ok', + 'master-host', '127.0.0.1', + 'master-port', '6379', + 'slave-priority', '100', + ), ); $expected = array( array( - "name" => "127.0.0.1:6380", - "ip" => "127.0.0.1", - "port" => "6380", - "runid" => "92aea60e4fead2507cccd6574e4c7139d401d0ae", - "flags" => "slave", - "pending-commands" => "0", - "last-ok-ping-reply" => "1011", - "last-ping-reply" => "1011", - "info-refresh" => "4366", - "master-link-down-time" => "0", - "master-link-status" => "ok", - "master-host" => "127.0.0.1", - "master-port" => "6379", - "slave-priority" => "100", - ) + 'name' => '127.0.0.1:6380', + 'ip' => '127.0.0.1', + 'port' => '6380', + 'runid' => '92aea60e4fead2507cccd6574e4c7139d401d0ae', + 'flags' => 'slave', + 'pending-commands' => '0', + 'last-ok-ping-reply' => '1011', + 'last-ping-reply' => '1011', + 'info-refresh' => '4366', + 'master-link-down-time' => '0', + 'master-link-status' => 'ok', + 'master-host' => '127.0.0.1', + 'master-port' => '6379', + 'slave-priority' => '100', + ), ); $command = $this->getCommandWithArguments('slaves', 'predis:master'); @@ -154,8 +154,8 @@ class ServerSentinelTest extends PredisCommandTestCase */ public function testSentinelIsMasterDownByAddr() { - $response = array("0", "7388832d5fdee6a2e301d6bbc5052bd1526d741c"); - $expected = array("0", "7388832d5fdee6a2e301d6bbc5052bd1526d741c"); + $response = array('0', '7388832d5fdee6a2e301d6bbc5052bd1526d741c'); + $expected = array('0', '7388832d5fdee6a2e301d6bbc5052bd1526d741c'); $command = $this->getCommandWithArguments('is-master-down-by-addr', '127.0.0.1', '6379'); @@ -167,8 +167,8 @@ class ServerSentinelTest extends PredisCommandTestCase */ public function testSentinelGetMasterAddrByName() { - $response = array("127.0.0.1", "6379"); - $expected = array("127.0.0.1", "6379"); + $response = array('127.0.0.1', '6379'); + $expected = array('127.0.0.1', '6379'); $command = $this->getCommandWithArguments('get-master-addr-by-name', 'predis:master'); diff --git a/tests/Predis/Command/SetDifferenceStoreTest.php b/tests/Predis/Command/SetDifferenceStoreTest.php index 55de06bb..7cbd54e6 100644 --- a/tests/Predis/Command/SetDifferenceStoreTest.php +++ b/tests/Predis/Command/SetDifferenceStoreTest.php @@ -79,7 +79,7 @@ class SetDifferenceStoreTest extends PredisCommandTestCase $redis->sadd('letters:1st', 'a', 'b', 'c', 'd', 'e', 'f', 'g'); $this->assertSame(7, $redis->sdiffstore('letters:destination', 'letters:1st')); - $this->assertSameValues(array( 'a', 'b', 'c', 'd', 'e', 'f', 'g'), $redis->smembers('letters:destination')); + $this->assertSameValues(array('a', 'b', 'c', 'd', 'e', 'f', 'g'), $redis->smembers('letters:destination')); } /** diff --git a/tests/Predis/Command/SetDifferenceTest.php b/tests/Predis/Command/SetDifferenceTest.php index a2d883d0..d3bed232 100644 --- a/tests/Predis/Command/SetDifferenceTest.php +++ b/tests/Predis/Command/SetDifferenceTest.php @@ -83,8 +83,8 @@ class SetDifferenceTest extends PredisCommandTestCase $redis->sadd('letters:1st', 'a', 'b', 'c', 'd', 'e', 'f', 'g'); - $this->assertSameValues(array( 'a', 'b', 'c', 'd', 'e', 'f', 'g'), $redis->sdiff('letters:1st')); - $this->assertSameValues(array( 'a', 'b', 'c', 'd', 'e', 'f', 'g'), $redis->sdiff('letters:1st', 'letters:2nd')); + $this->assertSameValues(array('a', 'b', 'c', 'd', 'e', 'f', 'g'), $redis->sdiff('letters:1st')); + $this->assertSameValues(array('a', 'b', 'c', 'd', 'e', 'f', 'g'), $redis->sdiff('letters:1st', 'letters:2nd')); } /** diff --git a/tests/Predis/Command/SetIntersectionStoreTest.php b/tests/Predis/Command/SetIntersectionStoreTest.php index 44beeebd..d5a212ea 100644 --- a/tests/Predis/Command/SetIntersectionStoreTest.php +++ b/tests/Predis/Command/SetIntersectionStoreTest.php @@ -79,7 +79,7 @@ class SetIntersectionStoreTest extends PredisCommandTestCase $redis->sadd('letters:1st', 'a', 'b', 'c', 'd', 'e', 'f', 'g'); $this->assertSame(7, $redis->sinterstore('letters:destination', 'letters:1st')); - $this->assertSameValues(array( 'a', 'b', 'c', 'd', 'e', 'f', 'g'), $redis->smembers('letters:destination')); + $this->assertSameValues(array('a', 'b', 'c', 'd', 'e', 'f', 'g'), $redis->smembers('letters:destination')); } /** diff --git a/tests/Predis/Command/SetUnionStoreTest.php b/tests/Predis/Command/SetUnionStoreTest.php index f5bdd065..43e3a2ba 100644 --- a/tests/Predis/Command/SetUnionStoreTest.php +++ b/tests/Predis/Command/SetUnionStoreTest.php @@ -79,7 +79,7 @@ class SetUnionStoreTest extends PredisCommandTestCase $redis->sadd('letters:1st', 'a', 'b', 'c', 'd', 'e', 'f', 'g'); $this->assertSame(7, $redis->sunionstore('letters:destination', 'letters:1st')); - $this->assertSameValues(array( 'a', 'b', 'c', 'd', 'e', 'f', 'g'), $redis->smembers('letters:destination')); + $this->assertSameValues(array('a', 'b', 'c', 'd', 'e', 'f', 'g'), $redis->smembers('letters:destination')); } /** @@ -97,7 +97,7 @@ class SetUnionStoreTest extends PredisCommandTestCase $this->assertSameValues(array('a', 'c', 'e', 'f', 'g'), $redis->smembers('letters:destination')); $this->assertSame(7, $redis->sunionstore('letters:destination', 'letters:1st', 'letters:2nd', 'letters:3rd')); - $this->assertSameValues(array( 'a', 'b', 'c', 'd', 'e', 'f', 'g'), $redis->smembers('letters:destination')); + $this->assertSameValues(array('a', 'b', 'c', 'd', 'e', 'f', 'g'), $redis->smembers('letters:destination')); } /** diff --git a/tests/Predis/Command/SetUnionTest.php b/tests/Predis/Command/SetUnionTest.php index 1aa12c3f..96110877 100644 --- a/tests/Predis/Command/SetUnionTest.php +++ b/tests/Predis/Command/SetUnionTest.php @@ -83,8 +83,8 @@ class SetUnionTest extends PredisCommandTestCase $redis->sadd('letters:1st', 'a', 'b', 'c', 'd', 'e', 'f', 'g'); - $this->assertSameValues(array( 'a', 'b', 'c', 'd', 'e', 'f', 'g'), $redis->sunion('letters:1st')); - $this->assertSameValues(array( 'a', 'b', 'c', 'd', 'e', 'f', 'g'), $redis->sunion('letters:1st', 'letters:2nd')); + $this->assertSameValues(array('a', 'b', 'c', 'd', 'e', 'f', 'g'), $redis->sunion('letters:1st')); + $this->assertSameValues(array('a', 'b', 'c', 'd', 'e', 'f', 'g'), $redis->sunion('letters:1st', 'letters:2nd')); } /** @@ -99,7 +99,7 @@ class SetUnionTest extends PredisCommandTestCase $redis->sadd('letters:3rd', 'a', 'e', 'f'); $this->assertSameValues(array('a', 'c', 'e', 'f', 'g'), $redis->sunion('letters:2nd', 'letters:3rd')); - $this->assertSameValues(array( 'a', 'b', 'c', 'd', 'e', 'f', 'g'), $redis->sunion('letters:1st', 'letters:2nd', 'letters:3rd')); + $this->assertSameValues(array('a', 'b', 'c', 'd', 'e', 'f', 'g'), $redis->sunion('letters:1st', 'letters:2nd', 'letters:3rd')); } /** diff --git a/tests/Predis/Command/StringBitOpTest.php b/tests/Predis/Command/StringBitOpTest.php index bcb75def..8295004a 100644 --- a/tests/Predis/Command/StringBitOpTest.php +++ b/tests/Predis/Command/StringBitOpTest.php @@ -82,7 +82,7 @@ class StringBitOpTest extends PredisCommandTestCase $redis = $this->getClient(); $redis->set('key:src:1', "h\x80"); - $redis->set('key:src:2', "R"); + $redis->set('key:src:2', 'R'); $this->assertSame(2, $redis->bitop('AND', 'key:dst', 'key:src:1', 'key:src:2')); $this->assertSame("@\x00", $redis->get('key:dst')); @@ -96,7 +96,7 @@ class StringBitOpTest extends PredisCommandTestCase $redis = $this->getClient(); $redis->set('key:src:1', "h\x80"); - $redis->set('key:src:2', "R"); + $redis->set('key:src:2', 'R'); $this->assertSame(2, $redis->bitop('OR', 'key:dst', 'key:src:1', 'key:src:2')); $this->assertSame("z\x80", $redis->get('key:dst')); @@ -110,7 +110,7 @@ class StringBitOpTest extends PredisCommandTestCase $redis = $this->getClient(); $redis->set('key:src:1', "h\x80"); - $redis->set('key:src:2', "R"); + $redis->set('key:src:2', 'R'); $this->assertSame(2, $redis->bitop('XOR', 'key:dst', 'key:src:1', 'key:src:2')); $this->assertSame(":\x80", $redis->get('key:dst')); diff --git a/tests/Predis/Command/StringBitPosTest.php b/tests/Predis/Command/StringBitPosTest.php index 57999e9c..e0c4c36f 100644 --- a/tests/Predis/Command/StringBitPosTest.php +++ b/tests/Predis/Command/StringBitPosTest.php @@ -1,4 +1,5 @@ assertSame(0, $redis->bitpos('key', 0), 'Get position of first bit set to 0 - full range'); $this->assertSame(5, $redis->bitpos('key', 1), 'Get position of first bit set to 1 - full range'); $this->assertSame(-1, $redis->bitpos('key', 1, 5, 10), 'Get position of first bit set to 1 - specific range'); - } /** diff --git a/tests/Predis/Command/StringGetRangeTest.php b/tests/Predis/Command/StringGetRangeTest.php index d8bf572a..f72ee24a 100644 --- a/tests/Predis/Command/StringGetRangeTest.php +++ b/tests/Predis/Command/StringGetRangeTest.php @@ -52,7 +52,7 @@ class StringGetRangeTest extends PredisCommandTestCase */ public function testParseResponse() { - $this->assertSame('substring',$this->getCommand()->parseResponse('substring')); + $this->assertSame('substring', $this->getCommand()->parseResponse('substring')); } /** diff --git a/tests/Predis/Command/StringPreciseSetExpireTest.php b/tests/Predis/Command/StringPreciseSetExpireTest.php index b985e9b7..efa4b18e 100644 --- a/tests/Predis/Command/StringPreciseSetExpireTest.php +++ b/tests/Predis/Command/StringPreciseSetExpireTest.php @@ -77,7 +77,7 @@ class StringPreciseSetExpireTest extends PredisCommandTestCase $redis->psetex('foo', 50, 'bar'); $this->sleep(0.5); - $this->assertSame(0, $redis->exists('foo'));; + $this->assertSame(0, $redis->exists('foo')); } /** diff --git a/tests/Predis/Command/StringSetExpireTest.php b/tests/Predis/Command/StringSetExpireTest.php index e4197167..7a7f1d15 100644 --- a/tests/Predis/Command/StringSetExpireTest.php +++ b/tests/Predis/Command/StringSetExpireTest.php @@ -78,7 +78,7 @@ class StringSetExpireTest extends PredisCommandTestCase $redis->setex('foo', 1, 'bar'); $this->sleep(2.0); - $this->assertSame(0, $redis->exists('foo'));; + $this->assertSame(0, $redis->exists('foo')); } /** diff --git a/tests/Predis/Command/StringSubstrTest.php b/tests/Predis/Command/StringSubstrTest.php index 81c3824b..cdbff58a 100644 --- a/tests/Predis/Command/StringSubstrTest.php +++ b/tests/Predis/Command/StringSubstrTest.php @@ -56,6 +56,6 @@ class StringSubstrTest extends PredisCommandTestCase */ public function testParseResponse() { - $this->assertSame('substring',$this->getCommand()->parseResponse('substring')); + $this->assertSame('substring', $this->getCommand()->parseResponse('substring')); } } diff --git a/tests/Predis/Command/ZSetIntersectionStoreTest.php b/tests/Predis/Command/ZSetIntersectionStoreTest.php index 589cbfef..496ff938 100644 --- a/tests/Predis/Command/ZSetIntersectionStoreTest.php +++ b/tests/Predis/Command/ZSetIntersectionStoreTest.php @@ -45,7 +45,7 @@ class ZSetIntersectionStoreTest extends PredisCommandTestCase $arguments = array('zset:destination', 2, 'zset1', 'zset2', $modifiers); $expected = array( - 'zset:destination', 2, 'zset1', 'zset2', 'WEIGHTS', 10, 100, 'AGGREGATE', 'sum' + 'zset:destination', 2, 'zset1', 'zset2', 'WEIGHTS', 10, 100, 'AGGREGATE', 'sum', ); $command = $this->getCommand(); @@ -66,7 +66,7 @@ class ZSetIntersectionStoreTest extends PredisCommandTestCase $arguments = array('zset:destination', array('zset1', 'zset2'), $modifiers); $expected = array( - 'zset:destination', 2, 'zset1', 'zset2', 'WEIGHTS', 10, 100, 'AGGREGATE', 'sum' + 'zset:destination', 2, 'zset1', 'zset2', 'WEIGHTS', 10, 100, 'AGGREGATE', 'sum', ); $command = $this->getCommand(); diff --git a/tests/Predis/Command/ZSetReverseRangeByLexTest.php b/tests/Predis/Command/ZSetReverseRangeByLexTest.php index 5bbf2ec8..ee794245 100644 --- a/tests/Predis/Command/ZSetReverseRangeByLexTest.php +++ b/tests/Predis/Command/ZSetReverseRangeByLexTest.php @@ -13,7 +13,7 @@ namespace Predis\Command; * @group commands * @group realm-zset */ -class ZSetRevRangeByLexTest extends PredisCommandTestCase +class ZSetReverseRangeByLexTest extends PredisCommandTestCase { /** * {@inheritdoc} diff --git a/tests/Predis/Command/ZSetUnionStoreTest.php b/tests/Predis/Command/ZSetUnionStoreTest.php index 307f5f21..895c38b6 100644 --- a/tests/Predis/Command/ZSetUnionStoreTest.php +++ b/tests/Predis/Command/ZSetUnionStoreTest.php @@ -45,7 +45,7 @@ class ZSetUnionStoreTest extends PredisCommandTestCase $arguments = array('zset:destination', 2, 'zset1', 'zset2', $modifiers); $expected = array( - 'zset:destination', 2, 'zset1', 'zset2', 'WEIGHTS', 10, 100, 'AGGREGATE', 'sum' + 'zset:destination', 2, 'zset1', 'zset2', 'WEIGHTS', 10, 100, 'AGGREGATE', 'sum', ); $command = $this->getCommand(); @@ -66,7 +66,7 @@ class ZSetUnionStoreTest extends PredisCommandTestCase $arguments = array('zset:destination', array('zset1', 'zset2'), $modifiers); $expected = array( - 'zset:destination', 2, 'zset1', 'zset2', 'WEIGHTS', 10, 100, 'AGGREGATE', 'sum' + 'zset:destination', 2, 'zset1', 'zset2', 'WEIGHTS', 10, 100, 'AGGREGATE', 'sum', ); $command = $this->getCommand(); diff --git a/tests/Predis/Configuration/ConnectionFactoryOptionTest.php b/tests/Predis/Configuration/ConnectionFactoryOptionTest.php index 73d36ba7..8568f8ff 100644 --- a/tests/Predis/Configuration/ConnectionFactoryOptionTest.php +++ b/tests/Predis/Configuration/ConnectionFactoryOptionTest.php @@ -79,6 +79,6 @@ class ConnectionFactoryOptionTest extends PredisTestCase $option = new ConnectionFactoryOption(); $options = $this->getMock('Predis\Configuration\OptionsInterface'); - $option->filter($options, new stdClass); + $option->filter($options, new stdClass()); } } diff --git a/tests/Predis/Configuration/ExceptionsOptionTest.php b/tests/Predis/Configuration/ExceptionsOptionTest.php index cb13feb7..2a731e63 100644 --- a/tests/Predis/Configuration/ExceptionsOptionTest.php +++ b/tests/Predis/Configuration/ExceptionsOptionTest.php @@ -61,7 +61,7 @@ class ExceptionsOptionTest extends PredisTestCase $option = new ExceptionsOption(); $options = $this->getMock('Predis\Configuration\OptionsInterface'); - $this->assertFalse($option->filter($options, new stdClass)); + $this->assertFalse($option->filter($options, new stdClass())); $this->assertFalse($option->filter($options, 'invalid')); } } diff --git a/tests/Predis/Configuration/OptionsTest.php b/tests/Predis/Configuration/OptionsTest.php index 33343f73..4a7bcf5d 100644 --- a/tests/Predis/Configuration/OptionsTest.php +++ b/tests/Predis/Configuration/OptionsTest.php @@ -40,11 +40,11 @@ class OptionsTest extends PredisTestCase public function testConstructorWithArrayArgument() { $options = new Options(array( - 'exceptions' => false, - 'profile' => '2.0', - 'prefix' => 'prefix:', + 'exceptions' => false, + 'profile' => '2.0', + 'prefix' => 'prefix:', 'connections' => $this->getMock('Predis\Connection\FactoryInterface'), - 'cluster' => $this->getMock('Predis\Connection\Aggregate\ClusterInterface'), + 'cluster' => $this->getMock('Predis\Connection\Aggregate\ClusterInterface'), 'replication' => $this->getMock('Predis\Connection\Aggregate\ReplicationInterface'), )); @@ -88,7 +88,7 @@ class OptionsTest extends PredisTestCase $options = new Options(array( 'prefix' => 'prefix:', 'custom' => 'foobar', - 'void' => null, + 'void' => null, )); $this->assertTrue($options->defined('prefix')); @@ -105,7 +105,7 @@ class OptionsTest extends PredisTestCase $options = new Options(array( 'prefix' => 'prefix:', 'custom' => 'foobar', - 'void' => null, + 'void' => null, )); $this->assertTrue(isset($options->prefix)); @@ -161,7 +161,7 @@ class OptionsTest extends PredisTestCase */ public function testLazilyInitializesCustomOptionValueUsingObjectWithInvokeMagicMethod() { - $custom = new stdClass; + $custom = new stdClass(); // NOTE: closure values are covered by this test since they define __invoke(). $callable = $this->getMock('stdClass', array('__invoke')); @@ -178,9 +178,9 @@ class OptionsTest extends PredisTestCase $this->assertSame($custom, $options->custom); } - /** - * @group disconnected - */ + /** + * @group disconnected + */ public function testChecksForInvokeMagicMethodDoesNotTriggerAutoloader() { $trigger = $this->getMock('stdClass', array('autoload')); diff --git a/tests/Predis/Configuration/ProfileOptionTest.php b/tests/Predis/Configuration/ProfileOptionTest.php index c2e10f75..d8b10c7e 100644 --- a/tests/Predis/Configuration/ProfileOptionTest.php +++ b/tests/Predis/Configuration/ProfileOptionTest.php @@ -147,7 +147,7 @@ class ProfileOptionTest extends PredisTestCase $option = new ProfileOption(); $options = $this->getMock('Predis\Configuration\OptionsInterface'); - $option->filter($options, new stdClass); + $option->filter($options, new stdClass()); } /** diff --git a/tests/Predis/Connection/Aggregate/RedisClusterTest.php b/tests/Predis/Connection/Aggregate/RedisClusterTest.php index 7446e262..14f0901a 100644 --- a/tests/Predis/Connection/Aggregate/RedisClusterTest.php +++ b/tests/Predis/Connection/Aggregate/RedisClusterTest.php @@ -645,15 +645,15 @@ class RedisClusterTest extends PredisTestCase array(15360, 16383, array('10.1.0.52', 6398), array('10.1.0.51', 6398)), array(1024 , 2047, array('10.1.0.52', 6391), array('10.1.0.51', 6391)), array(11264, 12287, array('10.1.0.52', 6396), array('10.1.0.51', 6396)), - array( 5120, 6143, array('10.1.0.52', 6393), array('10.1.0.51', 6393)), - array( 0, 1023, array('10.1.0.51', 6381), array('10.1.0.52', 6381)), + array(5120, 6143, array('10.1.0.52', 6393), array('10.1.0.51', 6393)), + array(0, 1023, array('10.1.0.51', 6381), array('10.1.0.52', 6381)), array(13312, 14335, array('10.1.0.52', 6397), array('10.1.0.51', 6397)), - array( 4096, 5119, array('10.1.0.51', 6383), array('10.1.0.52', 6383)), - array( 9216, 10239, array('10.1.0.52', 6395), array('10.1.0.51', 6395)), - array( 8192, 9215, array('10.1.0.51', 6385), array('10.1.0.52', 6385)), + array(4096, 5119, array('10.1.0.51', 6383), array('10.1.0.52', 6383)), + array(9216, 10239, array('10.1.0.52', 6395), array('10.1.0.51', 6395)), + array(8192, 9215, array('10.1.0.51', 6385), array('10.1.0.52', 6385)), array(10240, 11263, array('10.1.0.51', 6386), array('10.1.0.52', 6386)), - array( 2048, 3071, array('10.1.0.51', 6382), array('10.1.0.52', 6382)), - array( 7168, 8191, array('10.1.0.52', 6394), array('10.1.0.51', 6394)), + array(2048, 3071, array('10.1.0.51', 6382), array('10.1.0.52', 6382)), + array(7168, 8191, array('10.1.0.52', 6394), array('10.1.0.51', 6394)), ); $command = Command\RawCommand::create('CLUSTER', 'SLOTS'); diff --git a/tests/Predis/Connection/FactoryTest.php b/tests/Predis/Connection/FactoryTest.php index c368bfa0..4db2821e 100644 --- a/tests/Predis/Connection/FactoryTest.php +++ b/tests/Predis/Connection/FactoryTest.php @@ -144,7 +144,7 @@ class FactoryTest extends PredisTestCase { $parameters = new Parameters(array( 'database' => '0', - 'password' => 'foobar' + 'password' => 'foobar', )); $connection = $this->getMock('Predis\Connection\NodeConnectionInterface'); @@ -309,7 +309,7 @@ class FactoryTest extends PredisTestCase $factory->expects($this->exactly(3)) ->method('create') ->will($this->returnCallback(function ($_) use ($connectionClass) { - return new $connectionClass; + return new $connectionClass(); })); $factory->aggregate($cluster, array(null, 'tcp://127.0.0.1', array('scheme' => 'tcp'), new $connectionClass())); @@ -329,7 +329,6 @@ class FactoryTest extends PredisTestCase $factory->aggregate($cluster, array()); } - // ******************************************************************** // // ---- HELPER METHODS ------------------------------------------------ // // ******************************************************************** // diff --git a/tests/Predis/Connection/ParametersTest.php b/tests/Predis/Connection/ParametersTest.php index 5b202324..0504a4de 100644 --- a/tests/Predis/Connection/ParametersTest.php +++ b/tests/Predis/Connection/ParametersTest.php @@ -66,7 +66,7 @@ class ParametersTest extends PredisTestCase { $parameters = new Parameters(array( 'port' => 7000, - 'custom' => 'foobar' + 'custom' => 'foobar', )); $this->sharedTestsWithArrayParameters($parameters); @@ -79,7 +79,7 @@ class ParametersTest extends PredisTestCase { $parameters = new Parameters(array( 'port' => 7000, - 'custom' => 'foobar' + 'custom' => 'foobar', )); $this->sharedTestsWithArrayParameters($parameters); diff --git a/tests/Predis/Connection/PhpiredisSocketConnectionTest.php b/tests/Predis/Connection/PhpiredisSocketConnectionTest.php index 177f1b40..46c172b8 100644 --- a/tests/Predis/Connection/PhpiredisSocketConnectionTest.php +++ b/tests/Predis/Connection/PhpiredisSocketConnectionTest.php @@ -106,10 +106,10 @@ class PhpiredisSocketConnectionTest extends PredisConnectionTestCase { $connection = $this->getConnection($profile, true); - $cmdPing = $profile->createCommand('ping'); - $cmdEcho = $profile->createCommand('echo', array('echoed')); - $cmdGet = $profile->createCommand('get', array('foobar')); - $cmdRpush = $profile->createCommand('rpush', array('metavars', 'foo', 'hoge', 'lol')); + $cmdPing = $profile->createCommand('ping'); + $cmdEcho = $profile->createCommand('echo', array('echoed')); + $cmdGet = $profile->createCommand('get', array('foobar')); + $cmdRpush = $profile->createCommand('rpush', array('metavars', 'foo', 'hoge', 'lol')); $cmdLrange = $profile->createCommand('lrange', array('metavars', 0, -1)); $this->assertEquals('PONG', $connection->executeCommand($cmdPing)); diff --git a/tests/Predis/Connection/PhpiredisStreamConnectionTest.php b/tests/Predis/Connection/PhpiredisStreamConnectionTest.php index 2998c123..5c8d71dc 100644 --- a/tests/Predis/Connection/PhpiredisStreamConnectionTest.php +++ b/tests/Predis/Connection/PhpiredisStreamConnectionTest.php @@ -124,10 +124,10 @@ class PhpiredisStreamConnectionTest extends PredisConnectionTestCase { $connection = $this->getConnection($profile, true); - $cmdPing = $profile->createCommand('ping'); - $cmdEcho = $profile->createCommand('echo', array('echoed')); - $cmdGet = $profile->createCommand('get', array('foobar')); - $cmdRpush = $profile->createCommand('rpush', array('metavars', 'foo', 'hoge', 'lol')); + $cmdPing = $profile->createCommand('ping'); + $cmdEcho = $profile->createCommand('echo', array('echoed')); + $cmdGet = $profile->createCommand('get', array('foobar')); + $cmdRpush = $profile->createCommand('rpush', array('metavars', 'foo', 'hoge', 'lol')); $cmdLrange = $profile->createCommand('lrange', array('metavars', 0, -1)); $this->assertEquals('PONG', $connection->executeCommand($cmdPing)); diff --git a/tests/Predis/Connection/WebdisConnectionTest.php b/tests/Predis/Connection/WebdisConnectionTest.php index d24a8aca..5607b42c 100644 --- a/tests/Predis/Connection/WebdisConnectionTest.php +++ b/tests/Predis/Connection/WebdisConnectionTest.php @@ -91,7 +91,6 @@ class WebdisConnectionTest extends PredisTestCase * @group disconnected * @expectedException \Predis\NotSupportedException * @expectedExceptionMessage The method Predis\Connection\WebdisConnection::addConnectCommand() is not supported. - * */ public function testAddingConnectCommandsIsNotSupported() { @@ -146,10 +145,10 @@ class WebdisConnectionTest extends PredisTestCase { $connection = $this->getConnection($profile); - $cmdPing = $profile->createCommand('ping'); - $cmdEcho = $profile->createCommand('echo', array('echoed')); - $cmdGet = $profile->createCommand('get', array('foobar')); - $cmdRpush = $profile->createCommand('rpush', array('metavars', 'foo', 'hoge', 'lol')); + $cmdPing = $profile->createCommand('ping'); + $cmdEcho = $profile->createCommand('echo', array('echoed')); + $cmdGet = $profile->createCommand('get', array('foobar')); + $cmdRpush = $profile->createCommand('rpush', array('metavars', 'foo', 'hoge', 'lol')); $cmdLrange = $profile->createCommand('lrange', array('metavars', 0, -1)); $this->assertEquals('PONG', $connection->executeCommand($cmdPing)); diff --git a/tests/Predis/Profile/RedisUnstableTest.php b/tests/Predis/Profile/RedisUnstableTest.php index aff4806e..06bbde54 100644 --- a/tests/Predis/Profile/RedisUnstableTest.php +++ b/tests/Predis/Profile/RedisUnstableTest.php @@ -38,106 +38,106 @@ class RedisUnstableTest extends PredisProfileTestCase public function getExpectedCommands() { return array( - 0 => 'EXISTS', - 1 => 'DEL', - 2 => 'TYPE', - 3 => 'KEYS', - 4 => 'RANDOMKEY', - 5 => 'RENAME', - 6 => 'RENAMENX', - 7 => 'EXPIRE', - 8 => 'EXPIREAT', - 9 => 'TTL', - 10 => 'MOVE', - 11 => 'SORT', - 12 => 'DUMP', - 13 => 'RESTORE', - 14 => 'SET', - 15 => 'SETNX', - 16 => 'MSET', - 17 => 'MSETNX', - 18 => 'GET', - 19 => 'MGET', - 20 => 'GETSET', - 21 => 'INCR', - 22 => 'INCRBY', - 23 => 'DECR', - 24 => 'DECRBY', - 25 => 'RPUSH', - 26 => 'LPUSH', - 27 => 'LLEN', - 28 => 'LRANGE', - 29 => 'LTRIM', - 30 => 'LINDEX', - 31 => 'LSET', - 32 => 'LREM', - 33 => 'LPOP', - 34 => 'RPOP', - 35 => 'RPOPLPUSH', - 36 => 'SADD', - 37 => 'SREM', - 38 => 'SPOP', - 39 => 'SMOVE', - 40 => 'SCARD', - 41 => 'SISMEMBER', - 42 => 'SINTER', - 43 => 'SINTERSTORE', - 44 => 'SUNION', - 45 => 'SUNIONSTORE', - 46 => 'SDIFF', - 47 => 'SDIFFSTORE', - 48 => 'SMEMBERS', - 49 => 'SRANDMEMBER', - 50 => 'ZADD', - 51 => 'ZINCRBY', - 52 => 'ZREM', - 53 => 'ZRANGE', - 54 => 'ZREVRANGE', - 55 => 'ZRANGEBYSCORE', - 56 => 'ZCARD', - 57 => 'ZSCORE', - 58 => 'ZREMRANGEBYSCORE', - 59 => 'PING', - 60 => 'AUTH', - 61 => 'SELECT', - 62 => 'ECHO', - 63 => 'QUIT', - 64 => 'INFO', - 65 => 'SLAVEOF', - 66 => 'MONITOR', - 67 => 'DBSIZE', - 68 => 'FLUSHDB', - 69 => 'FLUSHALL', - 70 => 'SAVE', - 71 => 'BGSAVE', - 72 => 'LASTSAVE', - 73 => 'SHUTDOWN', - 74 => 'BGREWRITEAOF', - 75 => 'SETEX', - 76 => 'APPEND', - 77 => 'SUBSTR', - 78 => 'BLPOP', - 79 => 'BRPOP', - 80 => 'ZUNIONSTORE', - 81 => 'ZINTERSTORE', - 82 => 'ZCOUNT', - 83 => 'ZRANK', - 84 => 'ZREVRANK', - 85 => 'ZREMRANGEBYRANK', - 86 => 'HSET', - 87 => 'HSETNX', - 88 => 'HMSET', - 89 => 'HINCRBY', - 90 => 'HGET', - 91 => 'HMGET', - 92 => 'HDEL', - 93 => 'HEXISTS', - 94 => 'HLEN', - 95 => 'HKEYS', - 96 => 'HVALS', - 97 => 'HGETALL', - 98 => 'MULTI', - 99 => 'EXEC', + 0 => 'EXISTS', + 1 => 'DEL', + 2 => 'TYPE', + 3 => 'KEYS', + 4 => 'RANDOMKEY', + 5 => 'RENAME', + 6 => 'RENAMENX', + 7 => 'EXPIRE', + 8 => 'EXPIREAT', + 9 => 'TTL', + 10 => 'MOVE', + 11 => 'SORT', + 12 => 'DUMP', + 13 => 'RESTORE', + 14 => 'SET', + 15 => 'SETNX', + 16 => 'MSET', + 17 => 'MSETNX', + 18 => 'GET', + 19 => 'MGET', + 20 => 'GETSET', + 21 => 'INCR', + 22 => 'INCRBY', + 23 => 'DECR', + 24 => 'DECRBY', + 25 => 'RPUSH', + 26 => 'LPUSH', + 27 => 'LLEN', + 28 => 'LRANGE', + 29 => 'LTRIM', + 30 => 'LINDEX', + 31 => 'LSET', + 32 => 'LREM', + 33 => 'LPOP', + 34 => 'RPOP', + 35 => 'RPOPLPUSH', + 36 => 'SADD', + 37 => 'SREM', + 38 => 'SPOP', + 39 => 'SMOVE', + 40 => 'SCARD', + 41 => 'SISMEMBER', + 42 => 'SINTER', + 43 => 'SINTERSTORE', + 44 => 'SUNION', + 45 => 'SUNIONSTORE', + 46 => 'SDIFF', + 47 => 'SDIFFSTORE', + 48 => 'SMEMBERS', + 49 => 'SRANDMEMBER', + 50 => 'ZADD', + 51 => 'ZINCRBY', + 52 => 'ZREM', + 53 => 'ZRANGE', + 54 => 'ZREVRANGE', + 55 => 'ZRANGEBYSCORE', + 56 => 'ZCARD', + 57 => 'ZSCORE', + 58 => 'ZREMRANGEBYSCORE', + 59 => 'PING', + 60 => 'AUTH', + 61 => 'SELECT', + 62 => 'ECHO', + 63 => 'QUIT', + 64 => 'INFO', + 65 => 'SLAVEOF', + 66 => 'MONITOR', + 67 => 'DBSIZE', + 68 => 'FLUSHDB', + 69 => 'FLUSHALL', + 70 => 'SAVE', + 71 => 'BGSAVE', + 72 => 'LASTSAVE', + 73 => 'SHUTDOWN', + 74 => 'BGREWRITEAOF', + 75 => 'SETEX', + 76 => 'APPEND', + 77 => 'SUBSTR', + 78 => 'BLPOP', + 79 => 'BRPOP', + 80 => 'ZUNIONSTORE', + 81 => 'ZINTERSTORE', + 82 => 'ZCOUNT', + 83 => 'ZRANK', + 84 => 'ZREVRANK', + 85 => 'ZREMRANGEBYRANK', + 86 => 'HSET', + 87 => 'HSETNX', + 88 => 'HMSET', + 89 => 'HINCRBY', + 90 => 'HGET', + 91 => 'HMGET', + 92 => 'HDEL', + 93 => 'HEXISTS', + 94 => 'HLEN', + 95 => 'HKEYS', + 96 => 'HVALS', + 97 => 'HGETALL', + 98 => 'MULTI', + 99 => 'EXEC', 100 => 'DISCARD', 101 => 'SUBSCRIBE', 102 => 'UNSUBSCRIBE', diff --git a/tests/Predis/Profile/RedisVersion200Test.php b/tests/Predis/Profile/RedisVersion200Test.php index e4958765..efff567f 100644 --- a/tests/Predis/Profile/RedisVersion200Test.php +++ b/tests/Predis/Profile/RedisVersion200Test.php @@ -38,106 +38,106 @@ class RedisVersion200Test extends PredisProfileTestCase public function getExpectedCommands() { return array( - 0 => 'EXISTS', - 1 => 'DEL', - 2 => 'TYPE', - 3 => 'KEYS', - 4 => 'RANDOMKEY', - 5 => 'RENAME', - 6 => 'RENAMENX', - 7 => 'EXPIRE', - 8 => 'EXPIREAT', - 9 => 'TTL', - 10 => 'MOVE', - 11 => 'SORT', - 12 => 'SET', - 13 => 'SETNX', - 14 => 'MSET', - 15 => 'MSETNX', - 16 => 'GET', - 17 => 'MGET', - 18 => 'GETSET', - 19 => 'INCR', - 20 => 'INCRBY', - 21 => 'DECR', - 22 => 'DECRBY', - 23 => 'RPUSH', - 24 => 'LPUSH', - 25 => 'LLEN', - 26 => 'LRANGE', - 27 => 'LTRIM', - 28 => 'LINDEX', - 29 => 'LSET', - 30 => 'LREM', - 31 => 'LPOP', - 32 => 'RPOP', - 33 => 'RPOPLPUSH', - 34 => 'SADD', - 35 => 'SREM', - 36 => 'SPOP', - 37 => 'SMOVE', - 38 => 'SCARD', - 39 => 'SISMEMBER', - 40 => 'SINTER', - 41 => 'SINTERSTORE', - 42 => 'SUNION', - 43 => 'SUNIONSTORE', - 44 => 'SDIFF', - 45 => 'SDIFFSTORE', - 46 => 'SMEMBERS', - 47 => 'SRANDMEMBER', - 48 => 'ZADD', - 49 => 'ZINCRBY', - 50 => 'ZREM', - 51 => 'ZRANGE', - 52 => 'ZREVRANGE', - 53 => 'ZRANGEBYSCORE', - 54 => 'ZCARD', - 55 => 'ZSCORE', - 56 => 'ZREMRANGEBYSCORE', - 57 => 'PING', - 58 => 'AUTH', - 59 => 'SELECT', - 60 => 'ECHO', - 61 => 'QUIT', - 62 => 'INFO', - 63 => 'SLAVEOF', - 64 => 'MONITOR', - 65 => 'DBSIZE', - 66 => 'FLUSHDB', - 67 => 'FLUSHALL', - 68 => 'SAVE', - 69 => 'BGSAVE', - 70 => 'LASTSAVE', - 71 => 'SHUTDOWN', - 72 => 'BGREWRITEAOF', - 73 => 'SETEX', - 74 => 'APPEND', - 75 => 'SUBSTR', - 76 => 'BLPOP', - 77 => 'BRPOP', - 78 => 'ZUNIONSTORE', - 79 => 'ZINTERSTORE', - 80 => 'ZCOUNT', - 81 => 'ZRANK', - 82 => 'ZREVRANK', - 83 => 'ZREMRANGEBYRANK', - 84 => 'HSET', - 85 => 'HSETNX', - 86 => 'HMSET', - 87 => 'HINCRBY', - 88 => 'HGET', - 89 => 'HMGET', - 90 => 'HDEL', - 91 => 'HEXISTS', - 92 => 'HLEN', - 93 => 'HKEYS', - 94 => 'HVALS', - 95 => 'HGETALL', - 96 => 'MULTI', - 97 => 'EXEC', - 98 => 'DISCARD', - 99 => 'SUBSCRIBE', + 0 => 'EXISTS', + 1 => 'DEL', + 2 => 'TYPE', + 3 => 'KEYS', + 4 => 'RANDOMKEY', + 5 => 'RENAME', + 6 => 'RENAMENX', + 7 => 'EXPIRE', + 8 => 'EXPIREAT', + 9 => 'TTL', + 10 => 'MOVE', + 11 => 'SORT', + 12 => 'SET', + 13 => 'SETNX', + 14 => 'MSET', + 15 => 'MSETNX', + 16 => 'GET', + 17 => 'MGET', + 18 => 'GETSET', + 19 => 'INCR', + 20 => 'INCRBY', + 21 => 'DECR', + 22 => 'DECRBY', + 23 => 'RPUSH', + 24 => 'LPUSH', + 25 => 'LLEN', + 26 => 'LRANGE', + 27 => 'LTRIM', + 28 => 'LINDEX', + 29 => 'LSET', + 30 => 'LREM', + 31 => 'LPOP', + 32 => 'RPOP', + 33 => 'RPOPLPUSH', + 34 => 'SADD', + 35 => 'SREM', + 36 => 'SPOP', + 37 => 'SMOVE', + 38 => 'SCARD', + 39 => 'SISMEMBER', + 40 => 'SINTER', + 41 => 'SINTERSTORE', + 42 => 'SUNION', + 43 => 'SUNIONSTORE', + 44 => 'SDIFF', + 45 => 'SDIFFSTORE', + 46 => 'SMEMBERS', + 47 => 'SRANDMEMBER', + 48 => 'ZADD', + 49 => 'ZINCRBY', + 50 => 'ZREM', + 51 => 'ZRANGE', + 52 => 'ZREVRANGE', + 53 => 'ZRANGEBYSCORE', + 54 => 'ZCARD', + 55 => 'ZSCORE', + 56 => 'ZREMRANGEBYSCORE', + 57 => 'PING', + 58 => 'AUTH', + 59 => 'SELECT', + 60 => 'ECHO', + 61 => 'QUIT', + 62 => 'INFO', + 63 => 'SLAVEOF', + 64 => 'MONITOR', + 65 => 'DBSIZE', + 66 => 'FLUSHDB', + 67 => 'FLUSHALL', + 68 => 'SAVE', + 69 => 'BGSAVE', + 70 => 'LASTSAVE', + 71 => 'SHUTDOWN', + 72 => 'BGREWRITEAOF', + 73 => 'SETEX', + 74 => 'APPEND', + 75 => 'SUBSTR', + 76 => 'BLPOP', + 77 => 'BRPOP', + 78 => 'ZUNIONSTORE', + 79 => 'ZINTERSTORE', + 80 => 'ZCOUNT', + 81 => 'ZRANK', + 82 => 'ZREVRANK', + 83 => 'ZREMRANGEBYRANK', + 84 => 'HSET', + 85 => 'HSETNX', + 86 => 'HMSET', + 87 => 'HINCRBY', + 88 => 'HGET', + 89 => 'HMGET', + 90 => 'HDEL', + 91 => 'HEXISTS', + 92 => 'HLEN', + 93 => 'HKEYS', + 94 => 'HVALS', + 95 => 'HGETALL', + 96 => 'MULTI', + 97 => 'EXEC', + 98 => 'DISCARD', + 99 => 'SUBSCRIBE', 100 => 'UNSUBSCRIBE', 101 => 'PSUBSCRIBE', 102 => 'PUNSUBSCRIBE', diff --git a/tests/Predis/Profile/RedisVersion220Test.php b/tests/Predis/Profile/RedisVersion220Test.php index f038dbb4..1ccfcf07 100644 --- a/tests/Predis/Profile/RedisVersion220Test.php +++ b/tests/Predis/Profile/RedisVersion220Test.php @@ -38,106 +38,106 @@ class RedisVersion220Test extends PredisProfileTestCase public function getExpectedCommands() { return array( - 0 => 'EXISTS', - 1 => 'DEL', - 2 => 'TYPE', - 3 => 'KEYS', - 4 => 'RANDOMKEY', - 5 => 'RENAME', - 6 => 'RENAMENX', - 7 => 'EXPIRE', - 8 => 'EXPIREAT', - 9 => 'TTL', - 10 => 'MOVE', - 11 => 'SORT', - 12 => 'SET', - 13 => 'SETNX', - 14 => 'MSET', - 15 => 'MSETNX', - 16 => 'GET', - 17 => 'MGET', - 18 => 'GETSET', - 19 => 'INCR', - 20 => 'INCRBY', - 21 => 'DECR', - 22 => 'DECRBY', - 23 => 'RPUSH', - 24 => 'LPUSH', - 25 => 'LLEN', - 26 => 'LRANGE', - 27 => 'LTRIM', - 28 => 'LINDEX', - 29 => 'LSET', - 30 => 'LREM', - 31 => 'LPOP', - 32 => 'RPOP', - 33 => 'RPOPLPUSH', - 34 => 'SADD', - 35 => 'SREM', - 36 => 'SPOP', - 37 => 'SMOVE', - 38 => 'SCARD', - 39 => 'SISMEMBER', - 40 => 'SINTER', - 41 => 'SINTERSTORE', - 42 => 'SUNION', - 43 => 'SUNIONSTORE', - 44 => 'SDIFF', - 45 => 'SDIFFSTORE', - 46 => 'SMEMBERS', - 47 => 'SRANDMEMBER', - 48 => 'ZADD', - 49 => 'ZINCRBY', - 50 => 'ZREM', - 51 => 'ZRANGE', - 52 => 'ZREVRANGE', - 53 => 'ZRANGEBYSCORE', - 54 => 'ZCARD', - 55 => 'ZSCORE', - 56 => 'ZREMRANGEBYSCORE', - 57 => 'PING', - 58 => 'AUTH', - 59 => 'SELECT', - 60 => 'ECHO', - 61 => 'QUIT', - 62 => 'INFO', - 63 => 'SLAVEOF', - 64 => 'MONITOR', - 65 => 'DBSIZE', - 66 => 'FLUSHDB', - 67 => 'FLUSHALL', - 68 => 'SAVE', - 69 => 'BGSAVE', - 70 => 'LASTSAVE', - 71 => 'SHUTDOWN', - 72 => 'BGREWRITEAOF', - 73 => 'SETEX', - 74 => 'APPEND', - 75 => 'SUBSTR', - 76 => 'BLPOP', - 77 => 'BRPOP', - 78 => 'ZUNIONSTORE', - 79 => 'ZINTERSTORE', - 80 => 'ZCOUNT', - 81 => 'ZRANK', - 82 => 'ZREVRANK', - 83 => 'ZREMRANGEBYRANK', - 84 => 'HSET', - 85 => 'HSETNX', - 86 => 'HMSET', - 87 => 'HINCRBY', - 88 => 'HGET', - 89 => 'HMGET', - 90 => 'HDEL', - 91 => 'HEXISTS', - 92 => 'HLEN', - 93 => 'HKEYS', - 94 => 'HVALS', - 95 => 'HGETALL', - 96 => 'MULTI', - 97 => 'EXEC', - 98 => 'DISCARD', - 99 => 'SUBSCRIBE', + 0 => 'EXISTS', + 1 => 'DEL', + 2 => 'TYPE', + 3 => 'KEYS', + 4 => 'RANDOMKEY', + 5 => 'RENAME', + 6 => 'RENAMENX', + 7 => 'EXPIRE', + 8 => 'EXPIREAT', + 9 => 'TTL', + 10 => 'MOVE', + 11 => 'SORT', + 12 => 'SET', + 13 => 'SETNX', + 14 => 'MSET', + 15 => 'MSETNX', + 16 => 'GET', + 17 => 'MGET', + 18 => 'GETSET', + 19 => 'INCR', + 20 => 'INCRBY', + 21 => 'DECR', + 22 => 'DECRBY', + 23 => 'RPUSH', + 24 => 'LPUSH', + 25 => 'LLEN', + 26 => 'LRANGE', + 27 => 'LTRIM', + 28 => 'LINDEX', + 29 => 'LSET', + 30 => 'LREM', + 31 => 'LPOP', + 32 => 'RPOP', + 33 => 'RPOPLPUSH', + 34 => 'SADD', + 35 => 'SREM', + 36 => 'SPOP', + 37 => 'SMOVE', + 38 => 'SCARD', + 39 => 'SISMEMBER', + 40 => 'SINTER', + 41 => 'SINTERSTORE', + 42 => 'SUNION', + 43 => 'SUNIONSTORE', + 44 => 'SDIFF', + 45 => 'SDIFFSTORE', + 46 => 'SMEMBERS', + 47 => 'SRANDMEMBER', + 48 => 'ZADD', + 49 => 'ZINCRBY', + 50 => 'ZREM', + 51 => 'ZRANGE', + 52 => 'ZREVRANGE', + 53 => 'ZRANGEBYSCORE', + 54 => 'ZCARD', + 55 => 'ZSCORE', + 56 => 'ZREMRANGEBYSCORE', + 57 => 'PING', + 58 => 'AUTH', + 59 => 'SELECT', + 60 => 'ECHO', + 61 => 'QUIT', + 62 => 'INFO', + 63 => 'SLAVEOF', + 64 => 'MONITOR', + 65 => 'DBSIZE', + 66 => 'FLUSHDB', + 67 => 'FLUSHALL', + 68 => 'SAVE', + 69 => 'BGSAVE', + 70 => 'LASTSAVE', + 71 => 'SHUTDOWN', + 72 => 'BGREWRITEAOF', + 73 => 'SETEX', + 74 => 'APPEND', + 75 => 'SUBSTR', + 76 => 'BLPOP', + 77 => 'BRPOP', + 78 => 'ZUNIONSTORE', + 79 => 'ZINTERSTORE', + 80 => 'ZCOUNT', + 81 => 'ZRANK', + 82 => 'ZREVRANK', + 83 => 'ZREMRANGEBYRANK', + 84 => 'HSET', + 85 => 'HSETNX', + 86 => 'HMSET', + 87 => 'HINCRBY', + 88 => 'HGET', + 89 => 'HMGET', + 90 => 'HDEL', + 91 => 'HEXISTS', + 92 => 'HLEN', + 93 => 'HKEYS', + 94 => 'HVALS', + 95 => 'HGETALL', + 96 => 'MULTI', + 97 => 'EXEC', + 98 => 'DISCARD', + 99 => 'SUBSCRIBE', 100 => 'UNSUBSCRIBE', 101 => 'PSUBSCRIBE', 102 => 'PUNSUBSCRIBE', diff --git a/tests/Predis/Profile/RedisVersion240Test.php b/tests/Predis/Profile/RedisVersion240Test.php index 4b49ca4a..fa78d016 100644 --- a/tests/Predis/Profile/RedisVersion240Test.php +++ b/tests/Predis/Profile/RedisVersion240Test.php @@ -38,106 +38,106 @@ class RedisVersion240Test extends PredisProfileTestCase public function getExpectedCommands() { return array( - 0 => 'EXISTS', - 1 => 'DEL', - 2 => 'TYPE', - 3 => 'KEYS', - 4 => 'RANDOMKEY', - 5 => 'RENAME', - 6 => 'RENAMENX', - 7 => 'EXPIRE', - 8 => 'EXPIREAT', - 9 => 'TTL', - 10 => 'MOVE', - 11 => 'SORT', - 12 => 'SET', - 13 => 'SETNX', - 14 => 'MSET', - 15 => 'MSETNX', - 16 => 'GET', - 17 => 'MGET', - 18 => 'GETSET', - 19 => 'INCR', - 20 => 'INCRBY', - 21 => 'DECR', - 22 => 'DECRBY', - 23 => 'RPUSH', - 24 => 'LPUSH', - 25 => 'LLEN', - 26 => 'LRANGE', - 27 => 'LTRIM', - 28 => 'LINDEX', - 29 => 'LSET', - 30 => 'LREM', - 31 => 'LPOP', - 32 => 'RPOP', - 33 => 'RPOPLPUSH', - 34 => 'SADD', - 35 => 'SREM', - 36 => 'SPOP', - 37 => 'SMOVE', - 38 => 'SCARD', - 39 => 'SISMEMBER', - 40 => 'SINTER', - 41 => 'SINTERSTORE', - 42 => 'SUNION', - 43 => 'SUNIONSTORE', - 44 => 'SDIFF', - 45 => 'SDIFFSTORE', - 46 => 'SMEMBERS', - 47 => 'SRANDMEMBER', - 48 => 'ZADD', - 49 => 'ZINCRBY', - 50 => 'ZREM', - 51 => 'ZRANGE', - 52 => 'ZREVRANGE', - 53 => 'ZRANGEBYSCORE', - 54 => 'ZCARD', - 55 => 'ZSCORE', - 56 => 'ZREMRANGEBYSCORE', - 57 => 'PING', - 58 => 'AUTH', - 59 => 'SELECT', - 60 => 'ECHO', - 61 => 'QUIT', - 62 => 'INFO', - 63 => 'SLAVEOF', - 64 => 'MONITOR', - 65 => 'DBSIZE', - 66 => 'FLUSHDB', - 67 => 'FLUSHALL', - 68 => 'SAVE', - 69 => 'BGSAVE', - 70 => 'LASTSAVE', - 71 => 'SHUTDOWN', - 72 => 'BGREWRITEAOF', - 73 => 'SETEX', - 74 => 'APPEND', - 75 => 'SUBSTR', - 76 => 'BLPOP', - 77 => 'BRPOP', - 78 => 'ZUNIONSTORE', - 79 => 'ZINTERSTORE', - 80 => 'ZCOUNT', - 81 => 'ZRANK', - 82 => 'ZREVRANK', - 83 => 'ZREMRANGEBYRANK', - 84 => 'HSET', - 85 => 'HSETNX', - 86 => 'HMSET', - 87 => 'HINCRBY', - 88 => 'HGET', - 89 => 'HMGET', - 90 => 'HDEL', - 91 => 'HEXISTS', - 92 => 'HLEN', - 93 => 'HKEYS', - 94 => 'HVALS', - 95 => 'HGETALL', - 96 => 'MULTI', - 97 => 'EXEC', - 98 => 'DISCARD', - 99 => 'SUBSCRIBE', + 0 => 'EXISTS', + 1 => 'DEL', + 2 => 'TYPE', + 3 => 'KEYS', + 4 => 'RANDOMKEY', + 5 => 'RENAME', + 6 => 'RENAMENX', + 7 => 'EXPIRE', + 8 => 'EXPIREAT', + 9 => 'TTL', + 10 => 'MOVE', + 11 => 'SORT', + 12 => 'SET', + 13 => 'SETNX', + 14 => 'MSET', + 15 => 'MSETNX', + 16 => 'GET', + 17 => 'MGET', + 18 => 'GETSET', + 19 => 'INCR', + 20 => 'INCRBY', + 21 => 'DECR', + 22 => 'DECRBY', + 23 => 'RPUSH', + 24 => 'LPUSH', + 25 => 'LLEN', + 26 => 'LRANGE', + 27 => 'LTRIM', + 28 => 'LINDEX', + 29 => 'LSET', + 30 => 'LREM', + 31 => 'LPOP', + 32 => 'RPOP', + 33 => 'RPOPLPUSH', + 34 => 'SADD', + 35 => 'SREM', + 36 => 'SPOP', + 37 => 'SMOVE', + 38 => 'SCARD', + 39 => 'SISMEMBER', + 40 => 'SINTER', + 41 => 'SINTERSTORE', + 42 => 'SUNION', + 43 => 'SUNIONSTORE', + 44 => 'SDIFF', + 45 => 'SDIFFSTORE', + 46 => 'SMEMBERS', + 47 => 'SRANDMEMBER', + 48 => 'ZADD', + 49 => 'ZINCRBY', + 50 => 'ZREM', + 51 => 'ZRANGE', + 52 => 'ZREVRANGE', + 53 => 'ZRANGEBYSCORE', + 54 => 'ZCARD', + 55 => 'ZSCORE', + 56 => 'ZREMRANGEBYSCORE', + 57 => 'PING', + 58 => 'AUTH', + 59 => 'SELECT', + 60 => 'ECHO', + 61 => 'QUIT', + 62 => 'INFO', + 63 => 'SLAVEOF', + 64 => 'MONITOR', + 65 => 'DBSIZE', + 66 => 'FLUSHDB', + 67 => 'FLUSHALL', + 68 => 'SAVE', + 69 => 'BGSAVE', + 70 => 'LASTSAVE', + 71 => 'SHUTDOWN', + 72 => 'BGREWRITEAOF', + 73 => 'SETEX', + 74 => 'APPEND', + 75 => 'SUBSTR', + 76 => 'BLPOP', + 77 => 'BRPOP', + 78 => 'ZUNIONSTORE', + 79 => 'ZINTERSTORE', + 80 => 'ZCOUNT', + 81 => 'ZRANK', + 82 => 'ZREVRANK', + 83 => 'ZREMRANGEBYRANK', + 84 => 'HSET', + 85 => 'HSETNX', + 86 => 'HMSET', + 87 => 'HINCRBY', + 88 => 'HGET', + 89 => 'HMGET', + 90 => 'HDEL', + 91 => 'HEXISTS', + 92 => 'HLEN', + 93 => 'HKEYS', + 94 => 'HVALS', + 95 => 'HGETALL', + 96 => 'MULTI', + 97 => 'EXEC', + 98 => 'DISCARD', + 99 => 'SUBSCRIBE', 100 => 'UNSUBSCRIBE', 101 => 'PSUBSCRIBE', 102 => 'PUNSUBSCRIBE', diff --git a/tests/Predis/Profile/RedisVersion260Test.php b/tests/Predis/Profile/RedisVersion260Test.php index cea24ed7..f30eee6d 100644 --- a/tests/Predis/Profile/RedisVersion260Test.php +++ b/tests/Predis/Profile/RedisVersion260Test.php @@ -38,106 +38,106 @@ class RedisVersion260Test extends PredisProfileTestCase public function getExpectedCommands() { return array( - 0 => 'EXISTS', - 1 => 'DEL', - 2 => 'TYPE', - 3 => 'KEYS', - 4 => 'RANDOMKEY', - 5 => 'RENAME', - 6 => 'RENAMENX', - 7 => 'EXPIRE', - 8 => 'EXPIREAT', - 9 => 'TTL', - 10 => 'MOVE', - 11 => 'SORT', - 12 => 'DUMP', - 13 => 'RESTORE', - 14 => 'SET', - 15 => 'SETNX', - 16 => 'MSET', - 17 => 'MSETNX', - 18 => 'GET', - 19 => 'MGET', - 20 => 'GETSET', - 21 => 'INCR', - 22 => 'INCRBY', - 23 => 'DECR', - 24 => 'DECRBY', - 25 => 'RPUSH', - 26 => 'LPUSH', - 27 => 'LLEN', - 28 => 'LRANGE', - 29 => 'LTRIM', - 30 => 'LINDEX', - 31 => 'LSET', - 32 => 'LREM', - 33 => 'LPOP', - 34 => 'RPOP', - 35 => 'RPOPLPUSH', - 36 => 'SADD', - 37 => 'SREM', - 38 => 'SPOP', - 39 => 'SMOVE', - 40 => 'SCARD', - 41 => 'SISMEMBER', - 42 => 'SINTER', - 43 => 'SINTERSTORE', - 44 => 'SUNION', - 45 => 'SUNIONSTORE', - 46 => 'SDIFF', - 47 => 'SDIFFSTORE', - 48 => 'SMEMBERS', - 49 => 'SRANDMEMBER', - 50 => 'ZADD', - 51 => 'ZINCRBY', - 52 => 'ZREM', - 53 => 'ZRANGE', - 54 => 'ZREVRANGE', - 55 => 'ZRANGEBYSCORE', - 56 => 'ZCARD', - 57 => 'ZSCORE', - 58 => 'ZREMRANGEBYSCORE', - 59 => 'PING', - 60 => 'AUTH', - 61 => 'SELECT', - 62 => 'ECHO', - 63 => 'QUIT', - 64 => 'INFO', - 65 => 'SLAVEOF', - 66 => 'MONITOR', - 67 => 'DBSIZE', - 68 => 'FLUSHDB', - 69 => 'FLUSHALL', - 70 => 'SAVE', - 71 => 'BGSAVE', - 72 => 'LASTSAVE', - 73 => 'SHUTDOWN', - 74 => 'BGREWRITEAOF', - 75 => 'SETEX', - 76 => 'APPEND', - 77 => 'SUBSTR', - 78 => 'BLPOP', - 79 => 'BRPOP', - 80 => 'ZUNIONSTORE', - 81 => 'ZINTERSTORE', - 82 => 'ZCOUNT', - 83 => 'ZRANK', - 84 => 'ZREVRANK', - 85 => 'ZREMRANGEBYRANK', - 86 => 'HSET', - 87 => 'HSETNX', - 88 => 'HMSET', - 89 => 'HINCRBY', - 90 => 'HGET', - 91 => 'HMGET', - 92 => 'HDEL', - 93 => 'HEXISTS', - 94 => 'HLEN', - 95 => 'HKEYS', - 96 => 'HVALS', - 97 => 'HGETALL', - 98 => 'MULTI', - 99 => 'EXEC', + 0 => 'EXISTS', + 1 => 'DEL', + 2 => 'TYPE', + 3 => 'KEYS', + 4 => 'RANDOMKEY', + 5 => 'RENAME', + 6 => 'RENAMENX', + 7 => 'EXPIRE', + 8 => 'EXPIREAT', + 9 => 'TTL', + 10 => 'MOVE', + 11 => 'SORT', + 12 => 'DUMP', + 13 => 'RESTORE', + 14 => 'SET', + 15 => 'SETNX', + 16 => 'MSET', + 17 => 'MSETNX', + 18 => 'GET', + 19 => 'MGET', + 20 => 'GETSET', + 21 => 'INCR', + 22 => 'INCRBY', + 23 => 'DECR', + 24 => 'DECRBY', + 25 => 'RPUSH', + 26 => 'LPUSH', + 27 => 'LLEN', + 28 => 'LRANGE', + 29 => 'LTRIM', + 30 => 'LINDEX', + 31 => 'LSET', + 32 => 'LREM', + 33 => 'LPOP', + 34 => 'RPOP', + 35 => 'RPOPLPUSH', + 36 => 'SADD', + 37 => 'SREM', + 38 => 'SPOP', + 39 => 'SMOVE', + 40 => 'SCARD', + 41 => 'SISMEMBER', + 42 => 'SINTER', + 43 => 'SINTERSTORE', + 44 => 'SUNION', + 45 => 'SUNIONSTORE', + 46 => 'SDIFF', + 47 => 'SDIFFSTORE', + 48 => 'SMEMBERS', + 49 => 'SRANDMEMBER', + 50 => 'ZADD', + 51 => 'ZINCRBY', + 52 => 'ZREM', + 53 => 'ZRANGE', + 54 => 'ZREVRANGE', + 55 => 'ZRANGEBYSCORE', + 56 => 'ZCARD', + 57 => 'ZSCORE', + 58 => 'ZREMRANGEBYSCORE', + 59 => 'PING', + 60 => 'AUTH', + 61 => 'SELECT', + 62 => 'ECHO', + 63 => 'QUIT', + 64 => 'INFO', + 65 => 'SLAVEOF', + 66 => 'MONITOR', + 67 => 'DBSIZE', + 68 => 'FLUSHDB', + 69 => 'FLUSHALL', + 70 => 'SAVE', + 71 => 'BGSAVE', + 72 => 'LASTSAVE', + 73 => 'SHUTDOWN', + 74 => 'BGREWRITEAOF', + 75 => 'SETEX', + 76 => 'APPEND', + 77 => 'SUBSTR', + 78 => 'BLPOP', + 79 => 'BRPOP', + 80 => 'ZUNIONSTORE', + 81 => 'ZINTERSTORE', + 82 => 'ZCOUNT', + 83 => 'ZRANK', + 84 => 'ZREVRANK', + 85 => 'ZREMRANGEBYRANK', + 86 => 'HSET', + 87 => 'HSETNX', + 88 => 'HMSET', + 89 => 'HINCRBY', + 90 => 'HGET', + 91 => 'HMGET', + 92 => 'HDEL', + 93 => 'HEXISTS', + 94 => 'HLEN', + 95 => 'HKEYS', + 96 => 'HVALS', + 97 => 'HGETALL', + 98 => 'MULTI', + 99 => 'EXEC', 100 => 'DISCARD', 101 => 'SUBSCRIBE', 102 => 'UNSUBSCRIBE', diff --git a/tests/Predis/Profile/RedisVersion280Test.php b/tests/Predis/Profile/RedisVersion280Test.php index 47c8ea02..4f35b1cc 100644 --- a/tests/Predis/Profile/RedisVersion280Test.php +++ b/tests/Predis/Profile/RedisVersion280Test.php @@ -38,106 +38,106 @@ class RedisVersion280Test extends PredisProfileTestCase public function getExpectedCommands() { return array( - 0 => 'EXISTS', - 1 => 'DEL', - 2 => 'TYPE', - 3 => 'KEYS', - 4 => 'RANDOMKEY', - 5 => 'RENAME', - 6 => 'RENAMENX', - 7 => 'EXPIRE', - 8 => 'EXPIREAT', - 9 => 'TTL', - 10 => 'MOVE', - 11 => 'SORT', - 12 => 'DUMP', - 13 => 'RESTORE', - 14 => 'SET', - 15 => 'SETNX', - 16 => 'MSET', - 17 => 'MSETNX', - 18 => 'GET', - 19 => 'MGET', - 20 => 'GETSET', - 21 => 'INCR', - 22 => 'INCRBY', - 23 => 'DECR', - 24 => 'DECRBY', - 25 => 'RPUSH', - 26 => 'LPUSH', - 27 => 'LLEN', - 28 => 'LRANGE', - 29 => 'LTRIM', - 30 => 'LINDEX', - 31 => 'LSET', - 32 => 'LREM', - 33 => 'LPOP', - 34 => 'RPOP', - 35 => 'RPOPLPUSH', - 36 => 'SADD', - 37 => 'SREM', - 38 => 'SPOP', - 39 => 'SMOVE', - 40 => 'SCARD', - 41 => 'SISMEMBER', - 42 => 'SINTER', - 43 => 'SINTERSTORE', - 44 => 'SUNION', - 45 => 'SUNIONSTORE', - 46 => 'SDIFF', - 47 => 'SDIFFSTORE', - 48 => 'SMEMBERS', - 49 => 'SRANDMEMBER', - 50 => 'ZADD', - 51 => 'ZINCRBY', - 52 => 'ZREM', - 53 => 'ZRANGE', - 54 => 'ZREVRANGE', - 55 => 'ZRANGEBYSCORE', - 56 => 'ZCARD', - 57 => 'ZSCORE', - 58 => 'ZREMRANGEBYSCORE', - 59 => 'PING', - 60 => 'AUTH', - 61 => 'SELECT', - 62 => 'ECHO', - 63 => 'QUIT', - 64 => 'INFO', - 65 => 'SLAVEOF', - 66 => 'MONITOR', - 67 => 'DBSIZE', - 68 => 'FLUSHDB', - 69 => 'FLUSHALL', - 70 => 'SAVE', - 71 => 'BGSAVE', - 72 => 'LASTSAVE', - 73 => 'SHUTDOWN', - 74 => 'BGREWRITEAOF', - 75 => 'SETEX', - 76 => 'APPEND', - 77 => 'SUBSTR', - 78 => 'BLPOP', - 79 => 'BRPOP', - 80 => 'ZUNIONSTORE', - 81 => 'ZINTERSTORE', - 82 => 'ZCOUNT', - 83 => 'ZRANK', - 84 => 'ZREVRANK', - 85 => 'ZREMRANGEBYRANK', - 86 => 'HSET', - 87 => 'HSETNX', - 88 => 'HMSET', - 89 => 'HINCRBY', - 90 => 'HGET', - 91 => 'HMGET', - 92 => 'HDEL', - 93 => 'HEXISTS', - 94 => 'HLEN', - 95 => 'HKEYS', - 96 => 'HVALS', - 97 => 'HGETALL', - 98 => 'MULTI', - 99 => 'EXEC', + 0 => 'EXISTS', + 1 => 'DEL', + 2 => 'TYPE', + 3 => 'KEYS', + 4 => 'RANDOMKEY', + 5 => 'RENAME', + 6 => 'RENAMENX', + 7 => 'EXPIRE', + 8 => 'EXPIREAT', + 9 => 'TTL', + 10 => 'MOVE', + 11 => 'SORT', + 12 => 'DUMP', + 13 => 'RESTORE', + 14 => 'SET', + 15 => 'SETNX', + 16 => 'MSET', + 17 => 'MSETNX', + 18 => 'GET', + 19 => 'MGET', + 20 => 'GETSET', + 21 => 'INCR', + 22 => 'INCRBY', + 23 => 'DECR', + 24 => 'DECRBY', + 25 => 'RPUSH', + 26 => 'LPUSH', + 27 => 'LLEN', + 28 => 'LRANGE', + 29 => 'LTRIM', + 30 => 'LINDEX', + 31 => 'LSET', + 32 => 'LREM', + 33 => 'LPOP', + 34 => 'RPOP', + 35 => 'RPOPLPUSH', + 36 => 'SADD', + 37 => 'SREM', + 38 => 'SPOP', + 39 => 'SMOVE', + 40 => 'SCARD', + 41 => 'SISMEMBER', + 42 => 'SINTER', + 43 => 'SINTERSTORE', + 44 => 'SUNION', + 45 => 'SUNIONSTORE', + 46 => 'SDIFF', + 47 => 'SDIFFSTORE', + 48 => 'SMEMBERS', + 49 => 'SRANDMEMBER', + 50 => 'ZADD', + 51 => 'ZINCRBY', + 52 => 'ZREM', + 53 => 'ZRANGE', + 54 => 'ZREVRANGE', + 55 => 'ZRANGEBYSCORE', + 56 => 'ZCARD', + 57 => 'ZSCORE', + 58 => 'ZREMRANGEBYSCORE', + 59 => 'PING', + 60 => 'AUTH', + 61 => 'SELECT', + 62 => 'ECHO', + 63 => 'QUIT', + 64 => 'INFO', + 65 => 'SLAVEOF', + 66 => 'MONITOR', + 67 => 'DBSIZE', + 68 => 'FLUSHDB', + 69 => 'FLUSHALL', + 70 => 'SAVE', + 71 => 'BGSAVE', + 72 => 'LASTSAVE', + 73 => 'SHUTDOWN', + 74 => 'BGREWRITEAOF', + 75 => 'SETEX', + 76 => 'APPEND', + 77 => 'SUBSTR', + 78 => 'BLPOP', + 79 => 'BRPOP', + 80 => 'ZUNIONSTORE', + 81 => 'ZINTERSTORE', + 82 => 'ZCOUNT', + 83 => 'ZRANK', + 84 => 'ZREVRANK', + 85 => 'ZREMRANGEBYRANK', + 86 => 'HSET', + 87 => 'HSETNX', + 88 => 'HMSET', + 89 => 'HINCRBY', + 90 => 'HGET', + 91 => 'HMGET', + 92 => 'HDEL', + 93 => 'HEXISTS', + 94 => 'HLEN', + 95 => 'HKEYS', + 96 => 'HVALS', + 97 => 'HGETALL', + 98 => 'MULTI', + 99 => 'EXEC', 100 => 'DISCARD', 101 => 'SUBSCRIBE', 102 => 'UNSUBSCRIBE', diff --git a/tests/Predis/Profile/RedisVersion300Test.php b/tests/Predis/Profile/RedisVersion300Test.php index 70bf2d5d..da9461da 100644 --- a/tests/Predis/Profile/RedisVersion300Test.php +++ b/tests/Predis/Profile/RedisVersion300Test.php @@ -38,106 +38,106 @@ class RedisVersion300Test extends PredisProfileTestCase public function getExpectedCommands() { return array( - 0 => 'EXISTS', - 1 => 'DEL', - 2 => 'TYPE', - 3 => 'KEYS', - 4 => 'RANDOMKEY', - 5 => 'RENAME', - 6 => 'RENAMENX', - 7 => 'EXPIRE', - 8 => 'EXPIREAT', - 9 => 'TTL', - 10 => 'MOVE', - 11 => 'SORT', - 12 => 'DUMP', - 13 => 'RESTORE', - 14 => 'SET', - 15 => 'SETNX', - 16 => 'MSET', - 17 => 'MSETNX', - 18 => 'GET', - 19 => 'MGET', - 20 => 'GETSET', - 21 => 'INCR', - 22 => 'INCRBY', - 23 => 'DECR', - 24 => 'DECRBY', - 25 => 'RPUSH', - 26 => 'LPUSH', - 27 => 'LLEN', - 28 => 'LRANGE', - 29 => 'LTRIM', - 30 => 'LINDEX', - 31 => 'LSET', - 32 => 'LREM', - 33 => 'LPOP', - 34 => 'RPOP', - 35 => 'RPOPLPUSH', - 36 => 'SADD', - 37 => 'SREM', - 38 => 'SPOP', - 39 => 'SMOVE', - 40 => 'SCARD', - 41 => 'SISMEMBER', - 42 => 'SINTER', - 43 => 'SINTERSTORE', - 44 => 'SUNION', - 45 => 'SUNIONSTORE', - 46 => 'SDIFF', - 47 => 'SDIFFSTORE', - 48 => 'SMEMBERS', - 49 => 'SRANDMEMBER', - 50 => 'ZADD', - 51 => 'ZINCRBY', - 52 => 'ZREM', - 53 => 'ZRANGE', - 54 => 'ZREVRANGE', - 55 => 'ZRANGEBYSCORE', - 56 => 'ZCARD', - 57 => 'ZSCORE', - 58 => 'ZREMRANGEBYSCORE', - 59 => 'PING', - 60 => 'AUTH', - 61 => 'SELECT', - 62 => 'ECHO', - 63 => 'QUIT', - 64 => 'INFO', - 65 => 'SLAVEOF', - 66 => 'MONITOR', - 67 => 'DBSIZE', - 68 => 'FLUSHDB', - 69 => 'FLUSHALL', - 70 => 'SAVE', - 71 => 'BGSAVE', - 72 => 'LASTSAVE', - 73 => 'SHUTDOWN', - 74 => 'BGREWRITEAOF', - 75 => 'SETEX', - 76 => 'APPEND', - 77 => 'SUBSTR', - 78 => 'BLPOP', - 79 => 'BRPOP', - 80 => 'ZUNIONSTORE', - 81 => 'ZINTERSTORE', - 82 => 'ZCOUNT', - 83 => 'ZRANK', - 84 => 'ZREVRANK', - 85 => 'ZREMRANGEBYRANK', - 86 => 'HSET', - 87 => 'HSETNX', - 88 => 'HMSET', - 89 => 'HINCRBY', - 90 => 'HGET', - 91 => 'HMGET', - 92 => 'HDEL', - 93 => 'HEXISTS', - 94 => 'HLEN', - 95 => 'HKEYS', - 96 => 'HVALS', - 97 => 'HGETALL', - 98 => 'MULTI', - 99 => 'EXEC', + 0 => 'EXISTS', + 1 => 'DEL', + 2 => 'TYPE', + 3 => 'KEYS', + 4 => 'RANDOMKEY', + 5 => 'RENAME', + 6 => 'RENAMENX', + 7 => 'EXPIRE', + 8 => 'EXPIREAT', + 9 => 'TTL', + 10 => 'MOVE', + 11 => 'SORT', + 12 => 'DUMP', + 13 => 'RESTORE', + 14 => 'SET', + 15 => 'SETNX', + 16 => 'MSET', + 17 => 'MSETNX', + 18 => 'GET', + 19 => 'MGET', + 20 => 'GETSET', + 21 => 'INCR', + 22 => 'INCRBY', + 23 => 'DECR', + 24 => 'DECRBY', + 25 => 'RPUSH', + 26 => 'LPUSH', + 27 => 'LLEN', + 28 => 'LRANGE', + 29 => 'LTRIM', + 30 => 'LINDEX', + 31 => 'LSET', + 32 => 'LREM', + 33 => 'LPOP', + 34 => 'RPOP', + 35 => 'RPOPLPUSH', + 36 => 'SADD', + 37 => 'SREM', + 38 => 'SPOP', + 39 => 'SMOVE', + 40 => 'SCARD', + 41 => 'SISMEMBER', + 42 => 'SINTER', + 43 => 'SINTERSTORE', + 44 => 'SUNION', + 45 => 'SUNIONSTORE', + 46 => 'SDIFF', + 47 => 'SDIFFSTORE', + 48 => 'SMEMBERS', + 49 => 'SRANDMEMBER', + 50 => 'ZADD', + 51 => 'ZINCRBY', + 52 => 'ZREM', + 53 => 'ZRANGE', + 54 => 'ZREVRANGE', + 55 => 'ZRANGEBYSCORE', + 56 => 'ZCARD', + 57 => 'ZSCORE', + 58 => 'ZREMRANGEBYSCORE', + 59 => 'PING', + 60 => 'AUTH', + 61 => 'SELECT', + 62 => 'ECHO', + 63 => 'QUIT', + 64 => 'INFO', + 65 => 'SLAVEOF', + 66 => 'MONITOR', + 67 => 'DBSIZE', + 68 => 'FLUSHDB', + 69 => 'FLUSHALL', + 70 => 'SAVE', + 71 => 'BGSAVE', + 72 => 'LASTSAVE', + 73 => 'SHUTDOWN', + 74 => 'BGREWRITEAOF', + 75 => 'SETEX', + 76 => 'APPEND', + 77 => 'SUBSTR', + 78 => 'BLPOP', + 79 => 'BRPOP', + 80 => 'ZUNIONSTORE', + 81 => 'ZINTERSTORE', + 82 => 'ZCOUNT', + 83 => 'ZRANK', + 84 => 'ZREVRANK', + 85 => 'ZREMRANGEBYRANK', + 86 => 'HSET', + 87 => 'HSETNX', + 88 => 'HMSET', + 89 => 'HINCRBY', + 90 => 'HGET', + 91 => 'HMGET', + 92 => 'HDEL', + 93 => 'HEXISTS', + 94 => 'HLEN', + 95 => 'HKEYS', + 96 => 'HVALS', + 97 => 'HGETALL', + 98 => 'MULTI', + 99 => 'EXEC', 100 => 'DISCARD', 101 => 'SUBSCRIBE', 102 => 'UNSUBSCRIBE', diff --git a/tests/Predis/Protocol/Text/Handler/BulkResponseTest.php b/tests/Predis/Protocol/Text/Handler/BulkResponseTest.php index d7cc1ae3..5debafd6 100644 --- a/tests/Predis/Protocol/Text/Handler/BulkResponseTest.php +++ b/tests/Predis/Protocol/Text/Handler/BulkResponseTest.php @@ -41,7 +41,7 @@ class BulkResponseTest extends PredisTestCase */ public function testBulk() { - $bulk = "This is a bulk string."; + $bulk = 'This is a bulk string.'; $bulkLengh = strlen($bulk); $handler = new Handler\BulkResponse(); diff --git a/tests/Predis/Protocol/Text/Handler/ErrorResponseTest.php b/tests/Predis/Protocol/Text/Handler/ErrorResponseTest.php index abf06ae8..00b3dc7c 100644 --- a/tests/Predis/Protocol/Text/Handler/ErrorResponseTest.php +++ b/tests/Predis/Protocol/Text/Handler/ErrorResponseTest.php @@ -30,7 +30,7 @@ class ErrorResponseTest extends PredisTestCase $connection->expects($this->never())->method('readLine'); $connection->expects($this->never())->method('readBuffer'); - $message = "ERR Operation against a key holding the wrong kind of value"; + $message = 'ERR Operation against a key holding the wrong kind of value'; $response = $handler->handle($connection, $message); $this->assertInstanceOf('Predis\Response\Error', $response); diff --git a/tests/Predis/Protocol/Text/Handler/MultiBulkResponseTest.php b/tests/Predis/Protocol/Text/Handler/MultiBulkResponseTest.php index 781d0f19..c32b6124 100644 --- a/tests/Predis/Protocol/Text/Handler/MultiBulkResponseTest.php +++ b/tests/Predis/Protocol/Text/Handler/MultiBulkResponseTest.php @@ -33,7 +33,7 @@ class MultiBulkResponseTest extends PredisTestCase $connection->expects($this->at(1)) ->method('readLine') - ->will($this->returnValue("$3")); + ->will($this->returnValue('$3')); $connection->expects($this->at(2)) ->method('readBuffer') @@ -41,7 +41,7 @@ class MultiBulkResponseTest extends PredisTestCase $connection->expects($this->at(3)) ->method('readLine') - ->will($this->returnValue("$3")); + ->will($this->returnValue('$3')); $connection->expects($this->at(4)) ->method('readBuffer') diff --git a/tests/Predis/Protocol/Text/ProtocolProcessorTest.php b/tests/Predis/Protocol/Text/ProtocolProcessorTest.php index ec0df5f1..294e4e02 100644 --- a/tests/Predis/Protocol/Text/ProtocolProcessorTest.php +++ b/tests/Predis/Protocol/Text/ProtocolProcessorTest.php @@ -56,26 +56,26 @@ class ProtocolProcessorTest extends PredisTestCase $connection->expects($this->at(0)) ->method('readLine') - ->will($this->returnValue("+OK")); + ->will($this->returnValue('+OK')); $connection->expects($this->at(1)) ->method('readLine') - ->will($this->returnValue("-ERR error message")); + ->will($this->returnValue('-ERR error message')); $connection->expects($this->at(2)) ->method('readLine') - ->will($this->returnValue(":2")); + ->will($this->returnValue(':2')); $connection->expects($this->at(3)) ->method('readLine') - ->will($this->returnValue("$-1")); + ->will($this->returnValue('$-1')); $connection->expects($this->at(4)) ->method('readLine') - ->will($this->returnValue("*-1")); + ->will($this->returnValue('*-1')); $this->assertEquals('OK', $protocol->read($connection)); - $this->assertEquals("ERR error message", $protocol->read($connection)); + $this->assertEquals('ERR error message', $protocol->read($connection)); $this->assertSame(2, $protocol->read($connection)); $this->assertNull($protocol->read($connection)); $this->assertNull($protocol->read($connection)); @@ -93,7 +93,7 @@ class ProtocolProcessorTest extends PredisTestCase $connection->expects($this->once(4)) ->method('readLine') - ->will($this->returnValue("*1")); + ->will($this->returnValue('*1')); $this->assertInstanceOf('Predis\Response\Iterator\MultiBulk', $protocol->read($connection)); } diff --git a/tests/Predis/Protocol/Text/ResponseReaderTest.php b/tests/Predis/Protocol/Text/ResponseReaderTest.php index 7c31f177..dd3ec595 100644 --- a/tests/Predis/Protocol/Text/ResponseReaderTest.php +++ b/tests/Predis/Protocol/Text/ResponseReaderTest.php @@ -61,23 +61,23 @@ class ResponseReaderTest extends PredisTestCase $connection->expects($this->at(0)) ->method('readLine') - ->will($this->returnValue("+OK")); + ->will($this->returnValue('+OK')); $connection->expects($this->at(1)) ->method('readLine') - ->will($this->returnValue("-ERR error message")); + ->will($this->returnValue('-ERR error message')); $connection->expects($this->at(2)) ->method('readLine') - ->will($this->returnValue(":2")); + ->will($this->returnValue(':2')); $connection->expects($this->at(3)) ->method('readLine') - ->will($this->returnValue("$-1")); + ->will($this->returnValue('$-1')); $connection->expects($this->at(4)) ->method('readLine') - ->will($this->returnValue("*-1")); + ->will($this->returnValue('*-1')); $this->assertEquals('OK', $reader->read($connection)); $this->assertEquals('ERR error message', $reader->read($connection)); diff --git a/tests/Predis/Replication/ReplicationStrategyTest.php b/tests/Predis/Replication/ReplicationStrategyTest.php index afba1521..5f4684b2 100644 --- a/tests/Predis/Replication/ReplicationStrategyTest.php +++ b/tests/Predis/Replication/ReplicationStrategyTest.php @@ -258,139 +258,139 @@ class ReplicationStrategyTest extends PredisTestCase { $commands = array( /* commands operating on the connection */ - 'AUTH' => 'read', - 'SELECT' => 'read', - 'ECHO' => 'read', - 'QUIT' => 'read', - 'OBJECT' => 'read', - 'TIME' => 'read', - 'SHUTDOWN' => 'disallowed', - 'INFO' => 'disallowed', - 'DBSIZE' => 'disallowed', - 'LASTSAVE' => 'disallowed', - 'CONFIG' => 'disallowed', - 'MONITOR' => 'disallowed', - 'SLAVEOF' => 'disallowed', - 'SAVE' => 'disallowed', - 'BGSAVE' => 'disallowed', - 'BGREWRITEAOF' => 'disallowed', - 'SLOWLOG' => 'disallowed', + 'AUTH' => 'read', + 'SELECT' => 'read', + 'ECHO' => 'read', + 'QUIT' => 'read', + 'OBJECT' => 'read', + 'TIME' => 'read', + 'SHUTDOWN' => 'disallowed', + 'INFO' => 'disallowed', + 'DBSIZE' => 'disallowed', + 'LASTSAVE' => 'disallowed', + 'CONFIG' => 'disallowed', + 'MONITOR' => 'disallowed', + 'SLAVEOF' => 'disallowed', + 'SAVE' => 'disallowed', + 'BGSAVE' => 'disallowed', + 'BGREWRITEAOF' => 'disallowed', + 'SLOWLOG' => 'disallowed', /* commands operating on the key space */ - 'EXISTS' => 'read', - 'DEL' => 'write', - 'TYPE' => 'read', - 'EXPIRE' => 'write', - 'EXPIREAT' => 'write', - 'PERSIST' => 'write', - 'PEXPIRE' => 'write', - 'PEXPIREAT' => 'write', - 'TTL' => 'read', - 'PTTL' => 'write', - 'SORT' => 'variable', - 'KEYS' => 'read', - 'SCAN' => 'read', - 'RANDOMKEY' => 'read', + 'EXISTS' => 'read', + 'DEL' => 'write', + 'TYPE' => 'read', + 'EXPIRE' => 'write', + 'EXPIREAT' => 'write', + 'PERSIST' => 'write', + 'PEXPIRE' => 'write', + 'PEXPIREAT' => 'write', + 'TTL' => 'read', + 'PTTL' => 'write', + 'SORT' => 'variable', + 'KEYS' => 'read', + 'SCAN' => 'read', + 'RANDOMKEY' => 'read', /* commands operating on string values */ - 'APPEND' => 'write', - 'DECR' => 'write', - 'DECRBY' => 'write', - 'GET' => 'read', - 'GETBIT' => 'read', - 'BITCOUNT' => 'read', - 'BITPOS' => 'read', - 'BITOP' => 'write', - 'MGET' => 'read', - 'SET' => 'write', - 'GETRANGE' => 'read', - 'GETSET' => 'write', - 'INCR' => 'write', - 'INCRBY' => 'write', - 'INCRBYFLOAT' => 'write', - 'SETBIT' => 'write', - 'SETEX' => 'write', - 'MSET' => 'write', - 'MSETNX' => 'write', - 'SETNX' => 'write', - 'SETRANGE' => 'write', - 'STRLEN' => 'read', - 'SUBSTR' => 'read', + 'APPEND' => 'write', + 'DECR' => 'write', + 'DECRBY' => 'write', + 'GET' => 'read', + 'GETBIT' => 'read', + 'BITCOUNT' => 'read', + 'BITPOS' => 'read', + 'BITOP' => 'write', + 'MGET' => 'read', + 'SET' => 'write', + 'GETRANGE' => 'read', + 'GETSET' => 'write', + 'INCR' => 'write', + 'INCRBY' => 'write', + 'INCRBYFLOAT' => 'write', + 'SETBIT' => 'write', + 'SETEX' => 'write', + 'MSET' => 'write', + 'MSETNX' => 'write', + 'SETNX' => 'write', + 'SETRANGE' => 'write', + 'STRLEN' => 'read', + 'SUBSTR' => 'read', /* commands operating on lists */ - 'LINSERT' => 'write', - 'LINDEX' => 'read', - 'LLEN' => 'read', - 'LPOP' => 'write', - 'RPOP' => 'write', - 'BLPOP' => 'write', - 'BRPOP' => 'write', - 'LPUSH' => 'write', - 'LPUSHX' => 'write', - 'RPUSH' => 'write', - 'RPUSHX' => 'write', - 'LRANGE' => 'read', - 'LREM' => 'write', - 'LSET' => 'write', - 'LTRIM' => 'write', + 'LINSERT' => 'write', + 'LINDEX' => 'read', + 'LLEN' => 'read', + 'LPOP' => 'write', + 'RPOP' => 'write', + 'BLPOP' => 'write', + 'BRPOP' => 'write', + 'LPUSH' => 'write', + 'LPUSHX' => 'write', + 'RPUSH' => 'write', + 'RPUSHX' => 'write', + 'LRANGE' => 'read', + 'LREM' => 'write', + 'LSET' => 'write', + 'LTRIM' => 'write', /* commands operating on sets */ - 'SADD' => 'write', - 'SCARD' => 'read', - 'SISMEMBER' => 'read', - 'SMEMBERS' => 'read', - 'SSCAN' => 'read', - 'SRANDMEMBER' => 'read', - 'SPOP' => 'write', - 'SREM' => 'write', - 'SINTER' => 'read', - 'SUNION' => 'read', - 'SDIFF' => 'read', + 'SADD' => 'write', + 'SCARD' => 'read', + 'SISMEMBER' => 'read', + 'SMEMBERS' => 'read', + 'SSCAN' => 'read', + 'SRANDMEMBER' => 'read', + 'SPOP' => 'write', + 'SREM' => 'write', + 'SINTER' => 'read', + 'SUNION' => 'read', + 'SDIFF' => 'read', /* commands operating on sorted sets */ - 'ZADD' => 'write', - 'ZCARD' => 'read', - 'ZCOUNT' => 'read', - 'ZINCRBY' => 'write', - 'ZRANGE' => 'read', - 'ZRANGEBYSCORE' => 'read', - 'ZRANK' => 'read', - 'ZREM' => 'write', - 'ZREMRANGEBYRANK' => 'write', - 'ZREMRANGEBYSCORE' => 'write', - 'ZREVRANGE' => 'read', - 'ZREVRANGEBYSCORE' => 'read', - 'ZREVRANK' => 'read', - 'ZSCORE' => 'read', - 'ZSCAN' => 'read', - 'ZLEXCOUNT' => 'read', - 'ZRANGEBYLEX' => 'read', - 'ZREMRANGEBYLEX' => 'write', - 'ZREVRANGEBYLEX' => 'read', + 'ZADD' => 'write', + 'ZCARD' => 'read', + 'ZCOUNT' => 'read', + 'ZINCRBY' => 'write', + 'ZRANGE' => 'read', + 'ZRANGEBYSCORE' => 'read', + 'ZRANK' => 'read', + 'ZREM' => 'write', + 'ZREMRANGEBYRANK' => 'write', + 'ZREMRANGEBYSCORE' => 'write', + 'ZREVRANGE' => 'read', + 'ZREVRANGEBYSCORE' => 'read', + 'ZREVRANK' => 'read', + 'ZSCORE' => 'read', + 'ZSCAN' => 'read', + 'ZLEXCOUNT' => 'read', + 'ZRANGEBYLEX' => 'read', + 'ZREMRANGEBYLEX' => 'write', + 'ZREVRANGEBYLEX' => 'read', /* commands operating on hashes */ - 'HDEL' => 'write', - 'HEXISTS' => 'read', - 'HGET' => 'read', - 'HGETALL' => 'read', - 'HMGET' => 'read', - 'HINCRBY' => 'write', - 'HINCRBYFLOAT' => 'write', - 'HKEYS' => 'read', - 'HLEN' => 'read', - 'HSET' => 'write', - 'HSETNX' => 'write', - 'HVALS' => 'read', - 'HSCAN' => 'read', + 'HDEL' => 'write', + 'HEXISTS' => 'read', + 'HGET' => 'read', + 'HGETALL' => 'read', + 'HMGET' => 'read', + 'HINCRBY' => 'write', + 'HINCRBYFLOAT' => 'write', + 'HKEYS' => 'read', + 'HLEN' => 'read', + 'HSET' => 'write', + 'HSETNX' => 'write', + 'HVALS' => 'read', + 'HSCAN' => 'read', /* commands operating on HyperLogLog */ - 'PFADD' => 'write', - 'PFMERGE' => 'write', - 'PFCOUNT' => 'read', + 'PFADD' => 'write', + 'PFMERGE' => 'write', + 'PFCOUNT' => 'read', /* scripting */ - 'EVAL' => 'write', - 'EVALSHA' => 'write', + 'EVAL' => 'write', + 'EVALSHA' => 'write', ); if (isset($type)) { diff --git a/tests/Predis/Transaction/MultiExecTest.php b/tests/Predis/Transaction/MultiExecTest.php index 1711d839..e880bf9c 100644 --- a/tests/Predis/Transaction/MultiExecTest.php +++ b/tests/Predis/Transaction/MultiExecTest.php @@ -655,7 +655,7 @@ class MultiExecTest extends PredisTestCase try { $client->transaction(function ($tx) { $tx->set('foo', 'bar'); - throw new \RuntimeException("TEST"); + throw new \RuntimeException('TEST'); }); } catch (\Exception $ex) { $exception = $ex; @@ -868,7 +868,7 @@ class MultiExecTest extends PredisTestCase case 'MULTI': if ($multi) { - return new Response\Error("ERR MULTI calls can not be nested"); + return new Response\Error('ERR MULTI calls can not be nested'); } return $multi = true; @@ -884,7 +884,7 @@ class MultiExecTest extends PredisTestCase $commands = $cas = array(); $abort = false; - return null; + return; } return $expected;