Browse Source

[phpdoc] Fix formatting of phpdoc headers.

Daniele Alessandri 11 năm trước cách đây
mục cha
commit
45e351be79
71 tập tin đã thay đổi với 365 bổ sung215 xóa
  1. 34 20
      src/Client.php
  2. 7 4
      src/ClientContextInterface.php
  3. 8 5
      src/ClientInterface.php
  4. 18 9
      src/Cluster/ClusterStrategy.php
  5. 8 4
      src/Cluster/Distributor/DistributorInterface.php
  6. 4 3
      src/Cluster/Distributor/HashRing.php
  7. 2 1
      src/Cluster/Hash/HashGeneratorInterface.php
  8. 4 2
      src/Cluster/StrategyInterface.php
  9. 6 3
      src/Command/Command.php
  10. 4 2
      src/Command/CommandInterface.php
  11. 2 1
      src/Command/HashScan.php
  12. 2 1
      src/Command/KeyScan.php
  13. 2 1
      src/Command/PubSubPubsub.php
  14. 6 2
      src/Command/RawCommand.php
  15. 2 1
      src/Command/ServerClient.php
  16. 6 3
      src/Command/ServerInfo.php
  17. 2 1
      src/Command/ServerSentinel.php
  18. 2 1
      src/Command/SetScan.php
  19. 2 1
      src/Command/ZSetRange.php
  20. 2 1
      src/Command/ZSetScan.php
  21. 2 1
      src/Command/ZSetUnionStore.php
  22. 3 2
      src/Configuration/ClusterOption.php
  23. 5 3
      src/Configuration/OptionInterface.php
  24. 8 4
      src/Configuration/OptionsInterface.php
  25. 2 1
      src/Connection/AbstractConnection.php
  26. 7 4
      src/Connection/Aggregate/PredisCluster.php
  27. 17 10
      src/Connection/Aggregate/RedisCluster.php
  28. 7 4
      src/Connection/AggregateConnectionInterface.php
  29. 1 0
      src/Connection/CompositeConnectionInterface.php
  30. 4 2
      src/Connection/ConnectionInterface.php
  31. 4 2
      src/Connection/Factory.php
  32. 2 1
      src/Connection/FactoryInterface.php
  33. 6 3
      src/Connection/Parameters.php
  34. 4 2
      src/Connection/ParametersInterface.php
  35. 4 2
      src/Connection/PhpiredisSocketConnection.php
  36. 4 2
      src/Connection/StreamConnection.php
  37. 5 3
      src/Connection/WebdisConnection.php
  38. 1 1
      src/Monitor/Consumer.php
  39. 12 9
      src/Pipeline/Pipeline.php
  40. 2 1
      src/Profile/Factory.php
  41. 8 5
      src/Profile/ProfileInterface.php
  42. 2 1
      src/Profile/RedisProfile.php
  43. 2 1
      src/Protocol/ProtocolProcessorInterface.php
  44. 2 1
      src/Protocol/RequestSerializerInterface.php
  45. 2 1
      src/Protocol/ResponseReaderInterface.php
  46. 3 2
      src/Protocol/Text/Handler/ResponseHandlerInterface.php
  47. 2 1
      src/Protocol/Text/ResponseReader.php
  48. 6 4
      src/PubSub/AbstractConsumer.php
  49. 6 3
      src/Replication/ReplicationStrategy.php
  50. 2 1
      src/Response/Status.php
  51. 12 7
      src/Transaction/MultiExec.php
  52. 2 1
      src/Transaction/MultiExecState.php
  53. 6 3
      tests/PHPUnit/PredisCommandTestCase.php
  54. 4 3
      tests/PHPUnit/PredisConnectionTestCase.php
  55. 6 4
      tests/PHPUnit/PredisDistributorTestCase.php
  56. 4 2
      tests/PHPUnit/PredisProfileTestCase.php
  57. 25 15
      tests/PHPUnit/PredisTestCase.php
  58. 3 2
      tests/Predis/ClientTest.php
  59. 0 7
      tests/Predis/Cluster/Distributor/HashRingTest.php
  60. 2 1
      tests/Predis/Cluster/PredisStrategyTest.php
  61. 2 1
      tests/Predis/Cluster/RedisStrategyTest.php
  62. 7 5
      tests/Predis/CommunicationExceptionTest.php
  63. 2 1
      tests/Predis/Connection/Aggregate/MasterSlaveReplicationTest.php
  64. 2 1
      tests/Predis/Connection/Aggregate/PredisClusterTest.php
  65. 2 1
      tests/Predis/Connection/Aggregate/RedisClusterTest.php
  66. 3 2
      tests/Predis/Connection/ParametersTest.php
  67. 3 2
      tests/Predis/Connection/WebdisConnectionTest.php
  68. 3 2
      tests/Predis/Pipeline/PipelineTest.php
  69. 2 1
      tests/Predis/Protocol/Text/ProtocolProcessorTest.php
  70. 2 1
      tests/Predis/Replication/ReplicationStrategyTest.php
  71. 15 10
      tests/Predis/Transaction/MultiExecTest.php

+ 34 - 20
src/Client.php

@@ -64,7 +64,8 @@ class Client implements ClientInterface
      * types of arguments or simply returns the passed argument if it is an
      * instance of Predis\Configuration\OptionsInterface.
      *
-     * @param  mixed            $options Client options.
+     * @param mixed $options Client options.
+     *
      * @return OptionsInterface
      */
     protected function createOptions($options)
@@ -93,7 +94,8 @@ class Client implements ClientInterface
      *  - String
      *  - Callable
      *
-     * @param  mixed               $parameters Connection parameters or connection instance.
+     * @param mixed $parameters Connection parameters or connection instance.
+     *
      * @return ConnectionInterface
      */
     protected function createConnection($parameters)
@@ -143,7 +145,8 @@ class Client implements ClientInterface
      * Wraps a callable to make sure that its returned value represents a valid
      * connection type.
      *
-     * @param  mixed    $callable
+     * @param mixed $callable
+     *
      * @return \Closure
      */
     protected function getConnectionInitializerWrapper($callable)
@@ -182,7 +185,8 @@ class Client implements ClientInterface
      * only when working with an aggregate connection (cluster, replication).
      * The new client instances uses the same options of the original one.
      *
-     * @param  string $connectionID Identifier of a connection.
+     * @param string $connectionID Identifier of a connection.
+     *
      * @return Client
      */
     public function getClientFor($connectionID)
@@ -243,7 +247,8 @@ class Client implements ClientInterface
      * Retrieves the specified connection from the aggregate connection when the
      * client is in cluster or replication mode.
      *
-     * @param  string                             $connectionID Index or alias of the single connection.
+     * @param string $connectionID Index or alias of the single connection.
+     *
      * @return Connection\NodeConnectionInterface
      *
      * @throws NotSupportedException
@@ -267,8 +272,9 @@ class Client implements ClientInterface
      * It is possibile to indentify Redis error responses from normal responses
      * using the second optional argument which is populated by reference.
      *
-     * @param  array $arguments Command arguments as defined by the command signature.
-     * @param  bool  $error     Set to TRUE when Redis returned an error response.
+     * @param array $arguments Command arguments as defined by the command signature.
+     * @param bool  $error     Set to TRUE when Redis returned an error response.
+     *
      * @return mixed
      */
     public function executeRaw(array $arguments, &$error = null)
@@ -329,8 +335,9 @@ class Client implements ClientInterface
     /**
      * Handles -ERR responses returned by Redis.
      *
-     * @param  CommandInterface       $command  Redis command that generated the error.
-     * @param  ErrorResponseInterface $response Instance of the error response.
+     * @param CommandInterface       $command  Redis command that generated the error.
+     * @param ErrorResponseInterface $response Instance of the error response.
+     *
      * @return mixed
      *
      * @throws ServerException
@@ -363,8 +370,9 @@ class Client implements ClientInterface
      * simply an utility method to create Redis contexts instances since they
      * follow a common initialization path.
      *
-     * @param  string $initializer Method name.
-     * @param  array  $argv        Arguments for the method.
+     * @param string $initializer Method name.
+     * @param array  $argv        Arguments for the method.
+     *
      * @return mixed
      */
     private function sharedContextFactory($initializer, $argv = null)
@@ -392,7 +400,8 @@ class Client implements ClientInterface
      * Creates a new pipeline context and returns it, or returns the results of
      * a pipeline executed inside the optionally provided callable object.
      *
-     * @param  mixed          ... Array of options, a callable for execution, or both.
+     * @param mixed ... Array of options, a callable for execution, or both.
+     *
      * @return Pipeline|array
      */
     public function pipeline(/* arguments */)
@@ -403,8 +412,9 @@ class Client implements ClientInterface
     /**
      * Actual pipeline context initializer method.
      *
-     * @param  array          $options  Options for the context.
-     * @param  mixed          $callable Optional callable used to execute the context.
+     * @param array $options  Options for the context.
+     * @param mixed $callable Optional callable used to execute the context.
+     *
      * @return Pipeline|array
      */
     protected function createPipeline(array $options = null, $callable = null)
@@ -433,7 +443,8 @@ class Client implements ClientInterface
      * Creates a new transaction context and returns it, or returns the results
      * of a transaction executed inside the optionally provided callable object.
      *
-     * @param  mixed                      ... Array of options, a callable for execution, or both.
+     * @param mixed ... Array of options, a callable for execution, or both.
+     *
      * @return MultiExecTransaction|array
      */
     public function transaction(/* arguments */)
@@ -444,8 +455,9 @@ class Client implements ClientInterface
     /**
      * Actual transaction context initializer method.
      *
-     * @param  array                      $options  Options for the context.
-     * @param  mixed                      $callable Optional callable used to execute the context.
+     * @param array $options  Options for the context.
+     * @param mixed $callable Optional callable used to execute the context.
+     *
      * @return MultiExecTransaction|array
      */
     protected function createTransaction(array $options = null, $callable = null)
@@ -463,7 +475,8 @@ class Client implements ClientInterface
      * Creates a new publis/subscribe context and returns it, or starts its loop
      * inside the optionally provided callable object.
      *
-     * @param  mixed               ... Array of options, a callable for execution, or both.
+     * @param mixed ... Array of options, a callable for execution, or both.
+     *
      * @return PubSubConsumer|NULL
      */
     public function pubSubLoop(/* arguments */)
@@ -474,8 +487,9 @@ class Client implements ClientInterface
     /**
      * Actual publish/subscribe context initializer method.
      *
-     * @param  array               $options  Options for the context.
-     * @param  mixed               $callable Optional callable used to execute the context.
+     * @param array $options  Options for the context.
+     * @param mixed $callable Optional callable used to execute the context.
+     *
      * @return PubSubConsumer|NULL
      */
     protected function createPubSub(array $options = null, $callable = null)

+ 7 - 4
src/ClientContextInterface.php

@@ -162,7 +162,8 @@ interface ClientContextInterface
     /**
      * Sends the specified command instance to Redis.
      *
-     * @param  CommandInterface $command Command instance.
+     * @param CommandInterface $command Command instance.
+     *
      * @return mixed
      */
     public function executeCommand(CommandInterface $command);
@@ -170,8 +171,9 @@ interface ClientContextInterface
     /**
      * Sends the specified command with its arguments to Redis.
      *
-     * @param  string $method    Command ID.
-     * @param  array  $arguments Arguments for the command.
+     * @param string $method    Command ID.
+     * @param array  $arguments Arguments for the command.
+     *
      * @return mixed
      */
     public function __call($method, $arguments);
@@ -179,7 +181,8 @@ interface ClientContextInterface
     /**
      * Starts the execution of the context.
      *
-     * @param  mixed $callable Optional callback for execution.
+     * @param mixed $callable Optional callback for execution.
+     *
      * @return array
      */
     public function execute($callable = null);

+ 8 - 5
src/ClientInterface.php

@@ -200,8 +200,9 @@ interface ClientInterface
     /**
      * Creates a new instance of the specified Redis command.
      *
-     * @param  string           $method    Command ID.
-     * @param  array            $arguments Arguments for the command.
+     * @param string $method    Command ID.
+     * @param array  $arguments Arguments for the command.
+     *
      * @return CommandInterface
      */
     public function createCommand($method, $arguments = array());
@@ -209,7 +210,8 @@ interface ClientInterface
     /**
      * Executes the specified Redis command.
      *
-     * @param  CommandInterface $command Command instance.
+     * @param CommandInterface $command Command instance.
+     *
      * @return mixed
      */
     public function executeCommand(CommandInterface $command);
@@ -218,8 +220,9 @@ interface ClientInterface
      * Creates a Redis command with the specified arguments and sends a request
      * to the server.
      *
-     * @param  string $method    Command ID.
-     * @param  array  $arguments Arguments for the command.
+     * @param string $method    Command ID.
+     * @param array  $arguments Arguments for the command.
+     *
      * @return mixed
      */
     public function __call($method, $arguments);

+ 18 - 9
src/Cluster/ClusterStrategy.php

@@ -210,7 +210,8 @@ abstract class ClusterStrategy implements StrategyInterface
     /**
      * Extracts the key from the first argument of a command instance.
      *
-     * @param  CommandInterface $command Command instance.
+     * @param CommandInterface $command Command instance.
+     *
      * @return string
      */
     protected function getKeyFromFirstArgument(CommandInterface $command)
@@ -222,7 +223,8 @@ abstract class ClusterStrategy implements StrategyInterface
      * Extracts the key from a command with multiple keys only when all keys in
      * the arguments array produce the same hash.
      *
-     * @param  CommandInterface $command Command instance.
+     * @param CommandInterface $command Command instance.
+     *
      * @return string
      */
     protected function getKeyFromAllArguments(CommandInterface $command)
@@ -240,7 +242,8 @@ abstract class ClusterStrategy implements StrategyInterface
      * Extracts the key from a command with multiple keys only when all keys in
      * the arguments array produce the same hash.
      *
-     * @param  CommandInterface $command Command instance.
+     * @param CommandInterface $command Command instance.
+     *
      * @return string
      */
     protected function getKeyFromInterleavedArguments(CommandInterface $command)
@@ -262,7 +265,8 @@ abstract class ClusterStrategy implements StrategyInterface
     /**
      * Extracts the key from BLPOP and BRPOP commands.
      *
-     * @param  CommandInterface $command Command instance.
+     * @param CommandInterface $command Command instance.
+     *
      * @return string
      */
     protected function getKeyFromBlockingListCommands(CommandInterface $command)
@@ -279,7 +283,8 @@ abstract class ClusterStrategy implements StrategyInterface
     /**
      * Extracts the key from BITOP command.
      *
-     * @param  CommandInterface $command Command instance.
+     * @param CommandInterface $command Command instance.
+     *
      * @return string
      */
     protected function getKeyFromBitOp(CommandInterface $command)
@@ -296,7 +301,8 @@ abstract class ClusterStrategy implements StrategyInterface
     /**
      * Extracts the key from ZINTERSTORE and ZUNIONSTORE commands.
      *
-     * @param  CommandInterface $command Command instance.
+     * @param CommandInterface $command Command instance.
+     *
      * @return string
      */
     protected function getKeyFromZsetAggregationCommands(CommandInterface $command)
@@ -314,7 +320,8 @@ abstract class ClusterStrategy implements StrategyInterface
     /**
      * Extracts the key from EVAL and EVALSHA commands.
      *
-     * @param  CommandInterface $command Command instance.
+     * @param CommandInterface $command Command instance.
+     *
      * @return string
      */
     protected function getKeyFromScriptingCommands(CommandInterface $command)
@@ -359,7 +366,8 @@ abstract class ClusterStrategy implements StrategyInterface
     /**
      * Checks if the specified array of keys will generate the same hash.
      *
-     * @param  array $keys Array of keys.
+     * @param array $keys Array of keys.
+     *
      * @return bool
      */
     protected function checkSameSlotForKeys(array $keys)
@@ -387,7 +395,8 @@ abstract class ClusterStrategy implements StrategyInterface
      * Returns only the hashable part of a key (delimited by "{...}"), or the
      * whole key if a key tag is not found in the string.
      *
-     * @param  string $key A key.
+     * @param string $key A key.
+     *
      * @return string
      */
     protected function extractKeyTag($key)

+ 8 - 4
src/Cluster/Distributor/DistributorInterface.php

@@ -40,7 +40,8 @@ interface DistributorInterface
      * Returns the corresponding slot of a node from the distributor using the
      * computed hash of a key.
      *
-     * @param  mixed $hash
+     * @param mixed $hash
+     *
      * @return mixed
      */
     public function getSlot($hash);
@@ -48,7 +49,8 @@ interface DistributorInterface
     /**
      * Returns a node from the distributor using its assigned slot ID.
      *
-     * @param  mixed $slot
+     * @param mixed $slot
+     *
      * @return mixed
      */
     public function getBySlot($slot);
@@ -56,7 +58,8 @@ interface DistributorInterface
     /**
      * Returns a node from the distributor using the computed hash of a key.
      *
-     * @param  mixed $hash
+     * @param mixed $hash
+     *
      * @return mixed
      */
     public function getByHash($hash);
@@ -64,7 +67,8 @@ interface DistributorInterface
     /**
      * Returns a node from the distributor mapping to the specified value.
      *
-     * @param  string $value
+     * @param string $value
+     *
      * @return mixed
      */
     public function get($value);

+ 4 - 3
src/Cluster/Distributor/HashRing.php

@@ -249,9 +249,10 @@ class HashRing implements DistributorInterface, HashGeneratorInterface
     /**
      * Implements a strategy to deal with wrap-around errors during binary searches.
      *
-     * @param  int $upper
-     * @param  int $lower
-     * @param  int $ringKeysCount
+     * @param int $upper
+     * @param int $lower
+     * @param int $ringKeysCount
+     *
      * @return int
      */
     protected function wrapAroundStrategy($upper, $lower, $ringKeysCount)

+ 2 - 1
src/Cluster/Hash/HashGeneratorInterface.php

@@ -22,7 +22,8 @@ interface HashGeneratorInterface
     /**
      * Generates an hash from a string to be used for distribution.
      *
-     * @param  string $value String value.
+     * @param string $value String value.
+     *
      * @return int
      */
     public function hash($value);

+ 4 - 2
src/Cluster/StrategyInterface.php

@@ -28,7 +28,8 @@ interface StrategyInterface
      * Returns a slot for the given command used for clustering distribution or
      * NULL when this is not possible.
      *
-     * @param  CommandInterface $command Command instance.
+     * @param CommandInterface $command Command instance.
+     *
      * @return int
      */
     public function getSlot(CommandInterface $command);
@@ -37,7 +38,8 @@ interface StrategyInterface
      * Returns a slot for the given key used for clustering distribution or NULL
      * when this is not possible.
      *
-     * @param  string $key Key string.
+     * @param string $key Key string.
+     *
      * @return int
      */
     public function getSlotByKey($key);

+ 6 - 3
src/Command/Command.php

@@ -24,7 +24,8 @@ abstract class Command implements CommandInterface
     /**
      * Returns a filtered array of the arguments.
      *
-     * @param  array $arguments List of arguments.
+     * @param array $arguments List of arguments.
+     *
      * @return array
      */
     protected function filterArguments(array $arguments)
@@ -101,7 +102,8 @@ abstract class Command implements CommandInterface
     /**
      * Normalizes the arguments array passed to a Redis command.
      *
-     * @param  array $arguments Arguments for a command.
+     * @param array $arguments Arguments for a command.
+     *
      * @return array
      */
     public static function normalizeArguments(array $arguments)
@@ -116,7 +118,8 @@ abstract class Command implements CommandInterface
     /**
      * Normalizes the arguments array passed to a variadic Redis command.
      *
-     * @param  array $arguments Arguments for a command.
+     * @param array $arguments Arguments for a command.
+     *
      * @return array
      */
     public static function normalizeVariadic(array $arguments)

+ 4 - 2
src/Command/CommandInterface.php

@@ -64,7 +64,8 @@ interface CommandInterface
     /**
      * Gets the argument of the command at the specified index.
      *
-     * @param  int   $index Index of the desired argument.
+     * @param int $index Index of the desired argument.
+     *
      * @return mixed
      */
     public function getArgument($index);
@@ -72,7 +73,8 @@ interface CommandInterface
     /**
      * Parses a raw response and returns a PHP object.
      *
-     * @param  string $data Binary string containing the whole response.
+     * @param string $data Binary string containing the whole response.
+     *
      * @return mixed
      */
     public function parseResponse($data);

+ 2 - 1
src/Command/HashScan.php

@@ -41,7 +41,8 @@ class HashScan extends Command
     /**
      * Returns a list of options and modifiers compatible with Redis.
      *
-     * @param  array $options List of options.
+     * @param array $options List of options.
+     *
      * @return array
      */
     protected function prepareOptions($options)

+ 2 - 1
src/Command/KeyScan.php

@@ -41,7 +41,8 @@ class KeyScan extends Command
     /**
      * Returns a list of options and modifiers compatible with Redis.
      *
-     * @param  array $options List of options.
+     * @param array $options List of options.
+     *
      * @return array
      */
     protected function prepareOptions($options)

+ 2 - 1
src/Command/PubSubPubsub.php

@@ -42,7 +42,8 @@ class PubSubPubsub extends Command
     /**
      * Returns the processed response to PUBSUB NUMSUB.
      *
-     * @param  array $channels List of channels
+     * @param array $channels List of channels
+     *
      * @return array
      */
     protected static function processNumsub(array $channels)

+ 6 - 2
src/Command/RawCommand.php

@@ -29,6 +29,9 @@ class RawCommand implements CommandInterface
     private $commandID;
     private $arguments;
 
+    /**
+     * @param array $arguments Command ID and its arguments.
+     */
     public function __construct(array $arguments)
     {
         if (!$arguments) {
@@ -44,8 +47,9 @@ class RawCommand implements CommandInterface
     /**
      * Creates a new raw command using a variadic method.
      *
-     * @param  string           $commandID Redis command ID.
-     * @param string ... Arguments list for the command.
+     * @param string $commandID Redis command ID.
+     * @param string ...        Arguments list for the command.
+     *
      * @return CommandInterface
      */
     public static function create($commandID /* [ $arg, ... */)

+ 2 - 1
src/Command/ServerClient.php

@@ -49,7 +49,8 @@ class ServerClient extends Command
     /**
      * Parses the response to CLIENT LIST and returns a structured list.
      *
-     * @param  string $data Response buffer.
+     * @param string $data Response buffer.
+     *
      * @return array
      */
     protected function parseClientList($data)

+ 6 - 3
src/Command/ServerInfo.php

@@ -48,7 +48,8 @@ class ServerInfo extends Command
     /**
      * Parses a single row of the response and returns the key-value pair.
      *
-     * @param  string $row Single row of the response.
+     * @param string $row Single row of the response.
+     *
      * @return array
      */
     protected function parseRow($row)
@@ -65,7 +66,8 @@ class ServerInfo extends Command
     /**
      * Extracts the statistics of each logical DB from the string buffer.
      *
-     * @param  string $str Response buffer.
+     * @param string $str Response buffer.
+     *
      * @return array
      */
     protected function parseDatabaseStats($str)
@@ -83,7 +85,8 @@ class ServerInfo extends Command
     /**
      * Parses the response and extracts the allocation statistics.
      *
-     * @param  string $str Response buffer.
+     * @param string $str Response buffer.
+     *
      * @return array
      */
     protected function parseAllocationStats($str)

+ 2 - 1
src/Command/ServerSentinel.php

@@ -43,7 +43,8 @@ class ServerSentinel extends Command
     /**
      * Returns a processed response to SENTINEL MASTERS or SENTINEL SLAVES.
      *
-     * @param  array $servers List of Redis servers.
+     * @param array $servers List of Redis servers.
+     *
      * @return array
      */
     protected static function processMastersOrSlaves(array $servers)

+ 2 - 1
src/Command/SetScan.php

@@ -41,7 +41,8 @@ class SetScan extends Command
     /**
      * Returns a list of options and modifiers compatible with Redis.
      *
-     * @param  array $options List of options.
+     * @param array $options List of options.
+     *
      * @return array
      */
     protected function prepareOptions($options)

+ 2 - 1
src/Command/ZSetRange.php

@@ -52,7 +52,8 @@ class ZSetRange extends Command
     /**
      * Returns a list of options and modifiers compatible with Redis.
      *
-     * @param  array $options List of options.
+     * @param array $options List of options.
+     *
      * @return array
      */
     protected function prepareOptions($options)

+ 2 - 1
src/Command/ZSetScan.php

@@ -41,7 +41,8 @@ class ZSetScan extends Command
     /**
      * Returns a list of options and modifiers compatible with Redis.
      *
-     * @param  array $options List of options.
+     * @param array $options List of options.
+     *
      * @return array
      */
     protected function prepareOptions($options)

+ 2 - 1
src/Command/ZSetUnionStore.php

@@ -50,7 +50,8 @@ class ZSetUnionStore extends Command
     /**
      * Returns a list of options and modifiers compatible with Redis.
      *
-     * @param  array $options List of options.
+     * @param array $options List of options.
+     *
      * @return array
      */
     private function prepareOptions($options)

+ 3 - 2
src/Configuration/ClusterOption.php

@@ -28,8 +28,9 @@ class ClusterOption implements OptionInterface
     /**
      * Creates a new cluster connection from on a known descriptive name.
      *
-     * @param  OptionsInterface $options Instance of the client options.
-     * @param  string           $id      Descriptive identifier of the cluster type (`predis`, `redis-cluster`)
+     * @param OptionsInterface $options Instance of the client options.
+     * @param string           $id      Descriptive identifier of the cluster type (`predis`, `redis-cluster`)
+     *
      * @return ClusterInterface
      */
     protected function createByDescription(OptionsInterface $options, $id)

+ 5 - 3
src/Configuration/OptionInterface.php

@@ -22,8 +22,9 @@ interface OptionInterface
     /**
      * Filters and validates the passed value.
      *
-     * @param  OptionsInterface $options Options container.
-     * @param  mixed            $value   Input value.
+     * @param OptionsInterface $options Options container.
+     * @param mixed            $value   Input value.
+     *
      * @return mixed
      */
     public function filter(OptionsInterface $options, $value);
@@ -31,7 +32,8 @@ interface OptionInterface
     /**
      * Returns the default value for the option.
      *
-     * @param  OptionsInterface $options Options container.
+     * @param OptionsInterface $options Options container.
+     *
      * @return mixed
      */
     public function getDefault(OptionsInterface $options);

+ 8 - 4
src/Configuration/OptionsInterface.php

@@ -29,7 +29,8 @@ interface OptionsInterface
     /**
      * Returns the default value for the given option.
      *
-     * @param  string $option Name of the option.
+     * @param string $option Name of the option.
+     *
      * @return mixed
      */
     public function getDefault($option);
@@ -37,7 +38,8 @@ interface OptionsInterface
     /**
      * Checks if the given option has been set by the user upon initialization.
      *
-     * @param  string $option Name of the option.
+     * @param string $option Name of the option.
+     *
      * @return bool
      */
     public function defined($option);
@@ -45,7 +47,8 @@ interface OptionsInterface
     /**
      * Checks if the given option has been set and does not evaluate to NULL.
      *
-     * @param  string $option Name of the option.
+     * @param string $option Name of the option.
+     *
      * @return bool
      */
     public function __isset($option);
@@ -53,7 +56,8 @@ interface OptionsInterface
     /**
      * Returns the value of the given option.
      *
-     * @param  string $option Name of the option.
+     * @param string $option Name of the option.
+     *
      * @return mixed
      */
     public function __get($option);

+ 2 - 1
src/Connection/AbstractConnection.php

@@ -50,7 +50,8 @@ abstract class AbstractConnection implements NodeConnectionInterface
     /**
      * Checks some of the parameters used to initialize the connection.
      *
-     * @param  ParametersInterface $parameters Initialization parameters for the connection.
+     * @param ParametersInterface $parameters Initialization parameters for the connection.
+     *
      * @return ParametersInterface
      */
     protected function assertParameters(ParametersInterface $parameters)

+ 7 - 4
src/Connection/Aggregate/PredisCluster.php

@@ -112,8 +112,9 @@ class PredisCluster implements ClusterInterface, IteratorAggregate, Countable
     /**
      * Removes a connection instance using its alias or index.
      *
-     * @param  string $connectionID Alias or index of a connection.
-     * @return bool   Returns true if the connection was in the pool.
+     * @param string $connectionID Alias or index of a connection.
+     *
+     * @return bool Returns true if the connection was in the pool.
      */
     public function removeById($connectionID)
     {
@@ -153,7 +154,8 @@ class PredisCluster implements ClusterInterface, IteratorAggregate, Countable
     /**
      * Retrieves a connection instance from the cluster using a key.
      *
-     * @param  string                  $key Key string.
+     * @param string $key Key string.
+     *
      * @return NodeConnectionInterface
      */
     public function getConnectionByKey($key)
@@ -218,7 +220,8 @@ class PredisCluster implements ClusterInterface, IteratorAggregate, Countable
     /**
      * Executes the specified Redis command on all the nodes of a cluster.
      *
-     * @param  CommandInterface $command A Redis command.
+     * @param CommandInterface $command A Redis command.
+     *
      * @return array
      */
     public function executeCommandOnNodes(CommandInterface $command)

+ 17 - 10
src/Connection/Aggregate/RedisCluster.php

@@ -131,8 +131,9 @@ class RedisCluster implements ClusterInterface, IteratorAggregate, Countable
     /**
      * Removes a connection instance by using its identifier.
      *
-     * @param  string $connectionID Connection identifier.
-     * @return bool   True if the connection was in the pool.
+     * @param string $connectionID Connection identifier.
+     *
+     * @return bool True if the connection was in the pool.
      */
     public function removeById($connectionID)
     {
@@ -178,7 +179,8 @@ class RedisCluster implements ClusterInterface, IteratorAggregate, Countable
      * the CLUSTER SLOTS command against the specified node or a random one from
      * the pool.
      *
-     * @param  NodeConnectionInterface $connection Optional connection instance.
+     * @param NodeConnectionInterface $connection Optional connection instance.
+     *
      * @return array
      */
     public function askSlotsMap(NodeConnectionInterface $connection = null)
@@ -246,7 +248,8 @@ class RedisCluster implements ClusterInterface, IteratorAggregate, Countable
      * slots map, falling back to the same logic used by Redis to initialize a
      * cluster (best-effort).
      *
-     * @param  int    $slot Slot index.
+     * @param int $slot Slot index.
+     *
      * @return string Connection ID.
      */
     protected function guessNode($slot)
@@ -269,7 +272,8 @@ class RedisCluster implements ClusterInterface, IteratorAggregate, Countable
     /**
      * Creates a new connection instance from the given connection ID.
      *
-     * @param  string                  $connectionID Identifier for the connection.
+     * @param string $connectionID Identifier for the connection.
+     *
      * @return NodeConnectionInterface
      */
     protected function createConnection($connectionID)
@@ -309,7 +313,8 @@ class RedisCluster implements ClusterInterface, IteratorAggregate, Countable
     /**
      * Returns the connection currently associated to a given slot.
      *
-     * @param  int                     $slot Slot index.
+     * @param int $slot Slot index.
+     *
      * @return NodeConnectionInterface
      */
     public function getConnectionBySlot($slot)
@@ -374,8 +379,9 @@ class RedisCluster implements ClusterInterface, IteratorAggregate, Countable
     /**
      * Handles -ERR responses returned by Redis.
      *
-     * @param  CommandInterface       $command Command that generated the -ERR response.
-     * @param  ErrorResponseInterface $error   Redis error response object.
+     * @param CommandInterface       $command Command that generated the -ERR response.
+     * @param ErrorResponseInterface $error   Redis error response object.
+     *
      * @return mixed
      */
     protected function onErrorResponse(CommandInterface $command, ErrorResponseInterface $error)
@@ -398,8 +404,9 @@ class RedisCluster implements ClusterInterface, IteratorAggregate, Countable
      * Handles -MOVED responses by executing again the command against the node
      * indicated by the Redis response.
      *
-     * @param  CommandInterface $command Command that generated the -MOVED response.
-     * @param  string           $details Parameters of the -MOVED response.
+     * @param CommandInterface $command Command that generated the -MOVED response.
+     * @param string           $details Parameters of the -MOVED response.
+     *
      * @return mixed
      */
     protected function onMovedResponse(CommandInterface $command, $details)

+ 7 - 4
src/Connection/AggregateConnectionInterface.php

@@ -31,15 +31,17 @@ interface AggregateConnectionInterface extends ConnectionInterface
     /**
      * Removes the specified connection instance from the aggregate connection.
      *
-     * @param  NodeConnectionInterface $connection Connection instance.
-     * @return bool                    Returns true if the connection was in the pool.
+     * @param NodeConnectionInterface $connection Connection instance.
+     *
+     * @return bool Returns true if the connection was in the pool.
      */
     public function remove(NodeConnectionInterface $connection);
 
     /**
      * Returns the connection instance in charge for the given command.
      *
-     * @param  CommandInterface        $command Command instance.
+     * @param CommandInterface $command Command instance.
+     *
      * @return NodeConnectionInterface
      */
     public function getConnection(CommandInterface $command);
@@ -47,7 +49,8 @@ interface AggregateConnectionInterface extends ConnectionInterface
     /**
      * Returns a connection instance from the aggregate connection by its alias.
      *
-     * @param  string                  $connectionID Connection alias.
+     * @param string $connectionID Connection alias.
+     *
      * @return NodeConnectionInterface
      */
     public function getConnectionById($connectionID);

+ 1 - 0
src/Connection/CompositeConnectionInterface.php

@@ -35,6 +35,7 @@ interface CompositeConnectionInterface extends NodeConnectionInterface
      * Reads the given number of bytes from the connection.
      *
      * @param int $length Number of bytes to read from the connection.
+     *
      * @return string
      */
     public function readBuffer($length);

+ 4 - 2
src/Connection/ConnectionInterface.php

@@ -48,7 +48,8 @@ interface ConnectionInterface
     /**
      * Reads the response to the given command from the connection.
      *
-     * @param  CommandInterface $command Command instance.
+     * @param CommandInterface $command Command instance.
+     *
      * @return mixed
      */
     public function readResponse(CommandInterface $command);
@@ -57,7 +58,8 @@ interface ConnectionInterface
      * Writes a request for the given command over the connection and reads back
      * the response returned by Redis.
      *
-     * @param  CommandInterface $command Command instance.
+     * @param CommandInterface $command Command instance.
+     *
      * @return mixed
      */
     public function executeCommand(CommandInterface $command);

+ 4 - 2
src/Connection/Factory.php

@@ -34,7 +34,8 @@ class Factory implements FactoryInterface
      * implementing Predis\Connection\NodeConnectionInterface. Optionally,
      * callable objects are used for lazy initialization of connection objects.
      *
-     * @param  mixed $initializer FQN of a connection class or a callable for lazy initialization.
+     * @param mixed $initializer FQN of a connection class or a callable for lazy initialization.
+     *
      * @return mixed
      */
     protected function checkInitializer($initializer)
@@ -117,7 +118,8 @@ class Factory implements FactoryInterface
     /**
      * Creates a connection parameters instance from the supplied argument.
      *
-     * @param  mixed               $parameters Original connection parameters.
+     * @param mixed $parameters Original connection parameters.
+     *
      * @return ParametersInterface
      */
     protected function createParameters($parameters)

+ 2 - 1
src/Connection/FactoryInterface.php

@@ -36,7 +36,8 @@ interface FactoryInterface
     /**
      * Creates a new connection object.
      *
-     * @param  mixed                   $parameters Initialization parameters for the connection.
+     * @param mixed $parameters Initialization parameters for the connection.
+     *
      * @return NodeConnectionInterface
      */
     public function create($parameters);

+ 6 - 3
src/Connection/Parameters.php

@@ -53,7 +53,8 @@ class Parameters implements ParametersInterface
      * Creates a new instance by supplying the initial parameters either in the
      * form of an URI string or a named array.
      *
-     * @param  array|string $parameters Set of connection parameters.
+     * @param array|string $parameters Set of connection parameters.
+     *
      * @return Parameters
      */
     public static function create($parameters)
@@ -68,7 +69,8 @@ class Parameters implements ParametersInterface
     /**
      * Parses an URI string returning an array of connection parameters.
      *
-     * @param  string $uri URI string.
+     * @param string $uri URI string.
+     *
      * @return array
      */
     public static function parse($uri)
@@ -95,7 +97,8 @@ class Parameters implements ParametersInterface
     /**
      * Validates and converts each value of the connection parameters array.
      *
-     * @param  array $parameters Connection parameters.
+     * @param array $parameters Connection parameters.
+     *
      * @return array
      */
     protected function filter(array $parameters)

+ 4 - 2
src/Connection/ParametersInterface.php

@@ -38,7 +38,8 @@ interface ParametersInterface
     /**
      * Checks if the specified parameters is set.
      *
-     * @param  string $parameter Name of the parameter.
+     * @param string $parameter Name of the parameter.
+     *
      * @return bool
      */
     public function __isset($parameter);
@@ -46,7 +47,8 @@ interface ParametersInterface
     /**
      * Returns the value of the specified parameter.
      *
-     * @param  string $parameter Name of the parameter.
+     * @param string $parameter Name of the parameter.
+     *
      * @return mixed
      */
     public function __get($parameter);

+ 4 - 2
src/Connection/PhpiredisSocketConnection.php

@@ -226,7 +226,8 @@ class PhpiredisSocketConnection extends AbstractConnection
     /**
      * Gets the address from the connection parameters.
      *
-     * @param  ParametersInterface $parameters Parameters used to initialize the connection.
+     * @param ParametersInterface $parameters Parameters used to initialize the connection.
+     *
      * @return string
      */
     protected static function getAddress(ParametersInterface $parameters)
@@ -251,7 +252,8 @@ class PhpiredisSocketConnection extends AbstractConnection
     /**
      * Opens the actual connection to the server with a timeout.
      *
-     * @param  ParametersInterface $parameters Parameters used to initialize the connection.
+     * @param ParametersInterface $parameters Parameters used to initialize the connection.
+     *
      * @return string
      */
     private function connectWithTimeout(ParametersInterface $parameters)

+ 4 - 2
src/Connection/StreamConnection.php

@@ -61,7 +61,8 @@ class StreamConnection extends AbstractConnection
     /**
      * Initializes a TCP stream resource.
      *
-     * @param  ParametersInterface $parameters Initialization parameters for the connection.
+     * @param ParametersInterface $parameters Initialization parameters for the connection.
+     *
      * @return resource
      */
     protected function tcpStreamInitializer(ParametersInterface $parameters)
@@ -103,7 +104,8 @@ class StreamConnection extends AbstractConnection
     /**
      * Initializes a UNIX stream resource.
      *
-     * @param  ParametersInterface $parameters Initialization parameters for the connection.
+     * @param ParametersInterface $parameters Initialization parameters for the connection.
+     *
      * @return resource
      */
     protected function unixStreamInitializer(ParametersInterface $parameters)

+ 5 - 3
src/Connection/WebdisConnection.php

@@ -176,8 +176,9 @@ class WebdisConnection implements NodeConnectionInterface
     /**
      * Feeds the phpredis reader resource with the data read from the network.
      *
-     * @param  resource $resource Reader resource.
-     * @param  string   $buffer   Buffer of data read from a connection.
+     * @param resource $resource Reader resource.
+     * @param string   $buffer   Buffer of data read from a connection.
+     *
      * @return int
      */
     protected function feedReader($resource, $buffer)
@@ -214,7 +215,8 @@ class WebdisConnection implements NodeConnectionInterface
     /**
      * Checks if the specified command is supported by this connection class.
      *
-     * @param  CommandInterface $command Command instance.
+     * @param CommandInterface $command Command instance.
+     *
      * @return string
      *
      * @throws NotSupportedException

+ 1 - 1
src/Monitor/Consumer.php

@@ -124,7 +124,7 @@ class Consumer implements Iterator
     /**
      * Checks if the the consumer is still in a valid state to continue.
      *
-     * @return Boolean
+     * @return bool
      */
     public function valid()
     {

+ 12 - 9
src/Pipeline/Pipeline.php

@@ -52,8 +52,9 @@ class Pipeline implements ClientContextInterface
     /**
      * Queues a command into the pipeline buffer.
      *
-     * @param  string $method    Command ID.
-     * @param  array  $arguments Arguments for the command.
+     * @param string $method    Command ID.
+     * @param array  $arguments Arguments for the command.
+     *
      * @return $this
      */
     public function __call($method, $arguments)
@@ -77,7 +78,8 @@ class Pipeline implements ClientContextInterface
     /**
      * Queues a command instance into the pipeline buffer.
      *
-     * @param  CommandInterface $command Command instance to be queued in the buffer.
+     * @param CommandInterface $command Command instance to be queued in the buffer.
+     *
      * @return $this
      */
     public function executeCommand(CommandInterface $command)
@@ -123,8 +125,9 @@ class Pipeline implements ClientContextInterface
      * Implements the logic to flush the queued commands and read the responses
      * from the current connection.
      *
-     * @param  ConnectionInterface $connection Current connection instance.
-     * @param  SplQueue            $commands   Queued commands.
+     * @param ConnectionInterface $connection Current connection instance.
+     * @param SplQueue            $commands   Queued commands.
+     *
      * @return array
      */
     protected function executePipeline(ConnectionInterface $connection, SplQueue $commands)
@@ -155,7 +158,8 @@ class Pipeline implements ClientContextInterface
     /**
      * Flushes the buffer holding all of the commands queued so far.
      *
-     * @param  bool  $send Specifies if the commands in the buffer should be sent to Redis.
+     * @param bool $send Specifies if the commands in the buffer should be sent to Redis.
+     *
      * @return $this
      */
     public function flushPipeline($send = true)
@@ -189,8 +193,8 @@ class Pipeline implements ClientContextInterface
     /**
      * Handles the actual execution of the whole pipeline.
      *
-     * @param  mixed $callable Optional callback for execution.
-     * @throws null
+     * @param mixed $callable Optional callback for execution.
+     *
      * @return array
      *
      * @throws Exception
@@ -227,7 +231,6 @@ class Pipeline implements ClientContextInterface
     /**
      * Returns if the pipeline should throw exceptions on server errors.
      *
-     * @todo Awful naming...
      * @return bool
      */
     protected function throwServerExceptions()

+ 2 - 1
src/Profile/Factory.php

@@ -81,7 +81,8 @@ final class Factory
     /**
      * Returns the specified server profile.
      *
-     * @param  string           $version Profile version or alias.
+     * @param string $version Profile version or alias.
+     *
      * @return ProfileInterface
      *
      * @throws ClientException

+ 8 - 5
src/Profile/ProfileInterface.php

@@ -32,15 +32,17 @@ interface ProfileInterface
     /**
      * Checks if the profile supports the specified command.
      *
-     * @param  string  $commandID Command ID.
-     * @return Boolean
+     * @param string $commandID Command ID.
+     *
+     * @return bool
      */
     public function supportsCommand($commandID);
 
     /**
      * Checks if the profile supports the specified list of commands.
      *
-     * @param  array  $commandIDs List of command IDs.
+     * @param array $commandIDs List of command IDs.
+     *
      * @return string
      */
     public function supportsCommands(array $commandIDs);
@@ -48,8 +50,9 @@ interface ProfileInterface
     /**
      * Creates a new command instance.
      *
-     * @param  string           $commandID Command ID.
-     * @param  array            $arguments Arguments for the command.
+     * @param string $commandID Command ID.
+     * @param array  $arguments Arguments for the command.
+     *
      * @return CommandInterface
      */
     public function createCommand($commandID, $arguments = array());

+ 2 - 1
src/Profile/RedisProfile.php

@@ -68,7 +68,8 @@ abstract class RedisProfile implements ProfileInterface
      * Returns the fully-qualified name of a class representing the specified
      * command ID registered in the current server profile.
      *
-     * @param  string $commandID Command ID.
+     * @param string $commandID Command ID.
+     *
      * @return string
      */
     public function getCommandClass($commandID)

+ 2 - 1
src/Protocol/ProtocolProcessorInterface.php

@@ -33,7 +33,8 @@ interface ProtocolProcessorInterface
     /**
      * Reads a response from a connection to Redis.
      *
-     * @param  CompositeConnectionInterface $connection Redis connection.
+     * @param CompositeConnectionInterface $connection Redis connection.
+     *
      * @return mixed
      */
     public function read(CompositeConnectionInterface $connection);

+ 2 - 1
src/Protocol/RequestSerializerInterface.php

@@ -23,7 +23,8 @@ interface RequestSerializerInterface
     /**
      * Serializes a Redis command.
      *
-     * @param  CommandInterface $command Redis command.
+     * @param CommandInterface $command Redis command.
+     *
      * @return string
      */
     public function serialize(CommandInterface $command);

+ 2 - 1
src/Protocol/ResponseReaderInterface.php

@@ -24,7 +24,8 @@ interface ResponseReaderInterface
     /**
      * Reads a response from a connection to Redis.
      *
-     * @param  CompositeConnectionInterface $connection Redis connection.
+     * @param CompositeConnectionInterface $connection Redis connection.
+     *
      * @return mixed
      */
     public function read(CompositeConnectionInterface $connection);

+ 3 - 2
src/Protocol/Text/Handler/ResponseHandlerInterface.php

@@ -24,8 +24,9 @@ interface ResponseHandlerInterface
      * Deserializes a response returned by Redis and reads more data from the
      * connection if needed.
      *
-     * @param  CompositeConnectionInterface $connection Redis connection.
-     * @param  string                       $payload    String payload.
+     * @param CompositeConnectionInterface $connection Redis connection.
+     * @param string                       $payload    String payload.
+     *
      * @return mixed
      */
     public function handle(CompositeConnectionInterface $connection, $payload);

+ 2 - 1
src/Protocol/Text/ResponseReader.php

@@ -64,7 +64,8 @@ class ResponseReader implements ResponseReaderInterface
     /**
      * Returns the response handler associated to a certain type of response.
      *
-     * @param  string                           $prefix Identifier of the type of response.
+     * @param string $prefix Identifier of the type of response.
+     *
      * @return Handler\ResponseHandlerInterface
      */
     public function getHandler($prefix)

+ 6 - 4
src/PubSub/AbstractConsumer.php

@@ -46,8 +46,9 @@ abstract class AbstractConsumer implements Iterator
     /**
      * Checks if the specified flag is valid based on the state of the consumer.
      *
-     * @param  int     $value Flag.
-     * @return Boolean
+     * @param int $value Flag.
+     *
+     * @return bool
      */
     protected function isFlagSet($value)
     {
@@ -111,7 +112,8 @@ abstract class AbstractConsumer implements Iterator
      * Closes the context by unsubscribing from all the subscribed channels. The
      * context can be forcefully closed by dropping the underlying connection.
      *
-     * @param  bool $drop Indicates if the context should be closed by dropping the connection.
+     * @param bool $drop Indicates if the context should be closed by dropping the connection.
+     *
      * @return bool Returns false when there are no pending messages.
      */
     public function stop($drop = false)
@@ -190,7 +192,7 @@ abstract class AbstractConsumer implements Iterator
     /**
      * Checks if the the consumer is still in a valid state to continue.
      *
-     * @return Boolean
+     * @return bool
      */
     public function valid()
     {

+ 6 - 3
src/Replication/ReplicationStrategy.php

@@ -39,7 +39,8 @@ class ReplicationStrategy
      * Returns if the specified command will perform a read-only operation
      * on Redis or not.
      *
-     * @param  CommandInterface $command Command instance.
+     * @param CommandInterface $command Command instance.
+     *
      * @return bool
      *
      * @throws NotSupportedException
@@ -79,7 +80,8 @@ class ReplicationStrategy
      * Returns if the specified command is not allowed for execution in a master
      * / slave replication context.
      *
-     * @param  CommandInterface $command Command instance.
+     * @param CommandInterface $command Command instance.
+     *
      * @return bool
      */
     public function isDisallowedOperation(CommandInterface $command)
@@ -91,7 +93,8 @@ class ReplicationStrategy
      * Checks if a SORT command is a readable operation by parsing the arguments
      * array of the specified commad instance.
      *
-     * @param  CommandInterface $command Command instance.
+     * @param CommandInterface $command Command instance.
+     *
      * @return bool
      */
     protected function isSortReadOnly(CommandInterface $command)

+ 2 - 1
src/Response/Status.php

@@ -57,7 +57,8 @@ class Status implements ResponseInterface
      * Common status responses such as OK or QUEUED are cached in order to lower
      * the global memory usage especially when using pipelines.
      *
-     * @param  string $payload Status response payload.
+     * @param string $payload Status response payload.
+     *
      * @return string
      */
     public static function get($payload)

+ 12 - 7
src/Transaction/MultiExec.php

@@ -153,8 +153,9 @@ class MultiExec implements ClientContextInterface
     /**
      * Dynamically invokes a Redis command with the specified arguments.
      *
-     * @param  string $method    Command ID.
-     * @param  array  $arguments Arguments for the command.
+     * @param string $method    Command ID.
+     * @param array  $arguments Arguments for the command.
+     *
      * @return mixed
      */
     public function __call($method, $arguments)
@@ -168,8 +169,9 @@ class MultiExec implements ClientContextInterface
     /**
      * Executes a Redis command bypassing the transaction logic.
      *
-     * @param  string $commandID Command ID.
-     * @param  array  $arguments Arguments for the command.
+     * @param string $commandID Command ID.
+     * @param array  $arguments Arguments for the command.
+     *
      * @return mixed
      *
      * @throws ServerException
@@ -189,7 +191,8 @@ class MultiExec implements ClientContextInterface
     /**
      * Executes the specified Redis command.
      *
-     * @param  CommandInterface $command Command instance.
+     * @param CommandInterface $command Command instance.
+     *
      * @return $this|mixed
      *
      * @throws AbortedMultiExecException
@@ -219,7 +222,8 @@ class MultiExec implements ClientContextInterface
     /**
      * Executes WATCH against one or more keys.
      *
-     * @param  string|array $keys One or more keys.
+     * @param string|array $keys One or more keys.
+     *
      * @return mixed
      *
      * @throws NotSupportedException
@@ -346,7 +350,8 @@ class MultiExec implements ClientContextInterface
     /**
      * Handles the actual execution of the whole transaction.
      *
-     * @param  mixed $callable Optional callback for execution.
+     * @param mixed $callable Optional callback for execution.
+     *
      * @return array
      *
      * @throws CommunicationException

+ 2 - 1
src/Transaction/MultiExecState.php

@@ -77,7 +77,8 @@ class MultiExecState
     /**
      * Returns if the specified flag or set of flags is set.
      *
-     * @param  int  $flags Flag
+     * @param int $flags Flag
+     *
      * @return bool
      */
     public function check($flags)

+ 6 - 3
tests/PHPUnit/PredisCommandTestCase.php

@@ -49,7 +49,8 @@ abstract class PredisCommandTestCase extends PredisTestCase
     /**
      * Returns a new client instance.
      *
-     * @param  bool   $flushdb Flush selected database before returning the client.
+     * @param bool $flushdb Flush selected database before returning the client.
+     *
      * @return Client
      */
     public function getClient($flushdb = true)
@@ -70,7 +71,7 @@ abstract class PredisCommandTestCase extends PredisTestCase
     /**
      * Returns wether the command is prefixable or not.
      *
-     * @return Boolean
+     * @return bool
      */
     protected function isPrefixable()
     {
@@ -81,6 +82,7 @@ abstract class PredisCommandTestCase extends PredisTestCase
      * Returns a new command instance with the specified arguments.
      *
      * @param ... List of arguments for the command.
+     *
      * @return CommandInterface
      */
     protected function getCommandWithArguments(/* arguments */)
@@ -91,7 +93,8 @@ abstract class PredisCommandTestCase extends PredisTestCase
     /**
      * Returns a new command instance with the specified arguments.
      *
-     * @param  array            $arguments Arguments for the command.
+     * @param array $arguments Arguments for the command.
+     *
      * @return CommandInterface
      */
     protected function getCommandWithArgumentsArray(array $arguments)

+ 4 - 3
tests/PHPUnit/PredisConnectionTestCase.php

@@ -337,9 +337,10 @@ abstract class PredisConnectionTestCase extends PredisTestCase
     /**
      * Returns a new instance of a connection instance.
      *
-     * @param  Profile\ProfileInterface $profile    Reference to the server profile instance.
-     * @param  Boolean                  $initialize Push default initialization commands (SELECT and FLUSHDB).
-     * @param  array                    $parameters Additional connection parameters.
+     * @param Profile\ProfileInterface $profile    Reference to the server profile instance.
+     * @param bool                     $initialize Push default initialization commands (SELECT and FLUSHDB).
+     * @param array                    $parameters Additional connection parameters.
+     *
      * @return StreamConnection
      */
     abstract protected function getConnection(&$profile = null, $initialize = false, array $parameters = array());

+ 6 - 4
tests/PHPUnit/PredisDistributorTestCase.php

@@ -28,9 +28,10 @@ abstract class PredisDistributorTestCase extends PredisTestCase
     /**
      * Returns a list of nodes from the hashring.
      *
-     * @param  DistributorInterface $distributor Distributor instance.
-     * @param  int                  $iterations  Number of nodes to fetch.
-     * @return array                Nodes from the hashring.
+     * @param DistributorInterface $distributor Distributor instance.
+     * @param int                  $iterations  Number of nodes to fetch.
+     *
+     * @return array Nodes from the hashring.
      */
     protected function getNodes(DistributorInterface $distributor, $iterations = 10)
     {
@@ -47,7 +48,8 @@ abstract class PredisDistributorTestCase extends PredisTestCase
     /**
      * Returns a distributor instance with the specified nodes added.
      *
-     * @param  array                $nodes Nodes to add to the distributor.
+     * @param array $nodes Nodes to add to the distributor.
+     *
      * @return DistributorInterface
      */
     protected function getSampleDistribution(array $nodes)

+ 4 - 2
tests/PHPUnit/PredisProfileTestCase.php

@@ -23,7 +23,8 @@ abstract class PredisProfileTestCase extends PredisTestCase
     /**
      * Returns a new instance of the tested profile.
      *
-     * @param  string           $version Version of Redis.
+     * @param string $version Version of Redis.
+     *
      * @return ProfileInterface
      */
     protected function getProfile($version = null)
@@ -49,7 +50,8 @@ abstract class PredisProfileTestCase extends PredisTestCase
      * Returns the list of commands supported by the current
      * server profile.
      *
-     * @param  ProfileInterface $profile Server profile instance.
+     * @param ProfileInterface $profile Server profile instance.
+     *
      * @return array
      */
     protected function getCommands(ProfileInterface $profile)

+ 25 - 15
tests/PHPUnit/PredisTestCase.php

@@ -25,8 +25,9 @@ abstract class PredisTestCase extends \PHPUnit_Framework_TestCase
      * Verifies that a Redis command is a valid Predis\Command\CommandInterface
      * instance with the specified ID and command arguments.
      *
-     * @param  string|Command\CommandInterface $command   Expected command or command ID.
-     * @param  array                           $arguments Expected command arguments.
+     * @param string|Command\CommandInterface $command   Expected command or command ID.
+     * @param array                           $arguments Expected command arguments.
+     *
      * @return RedisCommandConstraint
      */
     public function isRedisCommand($command = null, array $arguments = null)
@@ -99,7 +100,8 @@ abstract class PredisTestCase extends \PHPUnit_Framework_TestCase
      * Returns a named array with the default connection parameters merged with
      * the specified additional parameters.
      *
-     * @param  array $additional Additional connection parameters.
+     * @param array $additional Additional connection parameters.
+     *
      * @return array Connection parameters.
      */
     protected function getParametersArray(array $additional)
@@ -110,8 +112,9 @@ abstract class PredisTestCase extends \PHPUnit_Framework_TestCase
     /**
      * Returns a new instance of connection parameters.
      *
-     * @param  array                 $additional Additional connection parameters.
-     * @return Connection\Parameters Default connection parameters.
+     * @param array $additional Additional connection parameters.
+     *
+     * @return Connection\Parameters
      */
     protected function getParameters($additional = array())
     {
@@ -124,7 +127,8 @@ abstract class PredisTestCase extends \PHPUnit_Framework_TestCase
     /**
      * Returns a new instance of server profile.
      *
-     * @param  string                   $version Redis profile.
+     * @param string $version Redis profile.
+     *
      * @return Profile\ProfileInterface
      */
     protected function getProfile($version = null)
@@ -135,9 +139,10 @@ abstract class PredisTestCase extends \PHPUnit_Framework_TestCase
     /**
      * Returns a new client instance.
      *
-     * @param  array  $parameters Additional connection parameters.
-     * @param  array  $options    Additional client options.
-     * @param  bool   $flushdb    Flush selected database before returning the client.
+     * @param array $parameters Additional connection parameters.
+     * @param array $options    Additional client options.
+     * @param bool  $flushdb    Flush selected database before returning the client.
+     *
      * @return Client
      */
     protected function createClient(array $parameters = null, array $options = null, $flushdb = true)
@@ -168,6 +173,7 @@ abstract class PredisTestCase extends \PHPUnit_Framework_TestCase
      * Returns the server version of the Redis instance used by the test suite.
      *
      * @return string
+     *
      * @throws RuntimeException When the client cannot retrieve the current server version
      */
     protected function getRedisServerVersion()
@@ -195,10 +201,12 @@ abstract class PredisTestCase extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @param  string                              $expectedVersion Expected redis version.
-     * @param  string                              $operator        Comparison operator.
-     * @param  callable                            $callback        Callback for matching version.
+     * @param string   $expectedVersion Expected redis version.
+     * @param string   $operator        Comparison operator.
+     * @param callable $callback        Callback for matching version.
+     *
      * @return string
+     *
      * @throws \PHPUnit_Framework_SkippedTestError When expected redis version is not met
      */
     protected function executeOnRedisVersion($expectedVersion, $operator, $callback)
@@ -214,10 +222,12 @@ abstract class PredisTestCase extends \PHPUnit_Framework_TestCase
     }
 
     /**
-     * @param  string                              $expectedVersion Expected redis version.
-     * @param  string                              $operator        Comparison operator.
-     * @param  callable                            $callback        Callback for matching version.
+     * @param string   $expectedVersion Expected redis version.
+     * @param string   $operator        Comparison operator.
+     * @param callable $callback        Callback for matching version.
+     *
      * @return string
+     *
      * @throws \PHPUnit_Framework_SkippedTestError When expected redis version is not met
      */
     protected function executeOnProfileVersion($expectedVersion, $operator, $callback)

+ 3 - 2
tests/Predis/ClientTest.php

@@ -824,8 +824,9 @@ class ClientTest extends PredisTestCase
     /**
      * Returns an URI string representation of the specified connection parameters.
      *
-     * @param  array  $parameters Array of connection parameters.
-     * @return String URI string.
+     * @param array $parameters Array of connection parameters.
+     *
+     * @return string URI string.
      */
     protected function getParametersString(array $parameters)
     {

+ 0 - 7
tests/Predis/Cluster/Distributor/HashRingTest.php

@@ -174,13 +174,6 @@ class HashRingTest extends PredisDistributorTestCase
             '127.0.0.1:7002',
         ));
 
-/*
-$hash = $ring->hash('uid:641');
-$slot32 = $ring->getSlot($hash);
-$slot64 = sprintf("%u", $slot32 & 0xffffffff);
-echo "32: $slot32 - 64: $slot64\n";
-exit();
-*/
         $this->assertSame('127.0.0.1:7001', $ring->getBySlot(PHP_INT_SIZE == 4 ? -1255075679 : 3039891617)); // uid:256
         $this->assertSame('127.0.0.1:7001', $ring->getBySlot(PHP_INT_SIZE == 4 ? -1642314910 : 2652652386)); // uid:281
         $this->assertSame('127.0.0.1:7000', $ring->getBySlot(PHP_INT_SIZE == 4 ?  -687739295 : 3607228001)); // uid:312

+ 2 - 1
tests/Predis/Cluster/PredisStrategyTest.php

@@ -247,7 +247,8 @@ class PredisStrategyTest extends PredisTestCase
     /**
      * Returns the list of expected supported commands.
      *
-     * @param  string $type Optional type of command (based on its keys)
+     * @param string $type Optional type of command (based on its keys)
+     *
      * @return array
      */
     protected function getExpectedCommands($type = null)

+ 2 - 1
tests/Predis/Cluster/RedisStrategyTest.php

@@ -257,7 +257,8 @@ class RedisStrategyTest extends PredisTestCase
     /**
      * Returns the list of expected supported commands.
      *
-     * @param  string $type Optional type of command (based on its keys)
+     * @param string $type Optional type of command (based on its keys)
+     *
      * @return array
      */
     protected function getExpectedCommands($type = null)

+ 7 - 5
tests/Predis/CommunicationExceptionTest.php

@@ -77,7 +77,8 @@ class CommunicationExceptionTest extends PredisTestCase
     /**
      * Returns a mocked connection instance.
      *
-     * @param  mixed                              $parameters Connection parameters.
+     * @param mixed $parameters Connection parameters.
+     *
      * @return Connection\NodeConnectionInterface
      */
     protected function getMockedConnectionBase($parameters = null)
@@ -96,10 +97,11 @@ class CommunicationExceptionTest extends PredisTestCase
     /**
      * Returns a connection exception instance.
      *
-     * @param  Connection\NodeConnectionInterface $connection Connection instance.
-     * @param  string                             $message    Exception message.
-     * @param  int                                $code       Exception code.
-     * @param  \Exception                         $inner      Inner exception.
+     * @param Connection\NodeConnectionInterface $connection Connection instance.
+     * @param string                             $message    Exception message.
+     * @param int                                $code       Exception code.
+     * @param \Exception                         $inner      Inner exception.
+     *
      * @return \Predis\CommunicationException
      */
     protected function getException(

+ 2 - 1
tests/Predis/Connection/Aggregate/MasterSlaveReplicationTest.php

@@ -570,7 +570,8 @@ class MasterSlaveReplicationTest extends PredisTestCase
     /**
      * Returns a base mocked connection from Predis\Connection\NodeConnectionInterface.
      *
-     * @param  mixed $parameters Optional parameters.
+     * @param mixed $parameters Optional parameters.
+     *
      * @return mixed
      */
     protected function getMockConnection($parameters = null)

+ 2 - 1
tests/Predis/Connection/Aggregate/PredisClusterTest.php

@@ -405,7 +405,8 @@ class PredisClusterTest extends PredisTestCase
     /**
      * Returns a base mocked connection from Predis\Connection\NodeConnectionInterface.
      *
-     * @param  mixed $parameters Optional parameters.
+     * @param mixed $parameters Optional parameters.
+     *
      * @return mixed
      */
     protected function getMockConnection($parameters = null)

+ 2 - 1
tests/Predis/Connection/Aggregate/RedisClusterTest.php

@@ -758,7 +758,8 @@ class RedisClusterTest extends PredisTestCase
     /**
      * Returns a base mocked connection from Predis\Connection\NodeConnectionInterface.
      *
-     * @param  mixed $parameters Optional parameters.
+     * @param mixed $parameters Optional parameters.
+     *
      * @return mixed
      */
     protected function getMockConnection($parameters = null)

+ 3 - 2
tests/Predis/Connection/ParametersTest.php

@@ -252,8 +252,9 @@ class ParametersTest extends PredisTestCase
     /**
      * Returns an URI string representation of the specified connection parameters.
      *
-     * @param  array  $parameters array of connection parameters.
-     * @return String URI string.
+     * @param array $parameters array of connection parameters.
+     *
+     * @return string URI string.
      */
     protected function getParametersString(array $parameters)
     {

+ 3 - 2
tests/Predis/Connection/WebdisConnectionTest.php

@@ -171,8 +171,9 @@ class WebdisConnectionTest extends PredisTestCase
     /**
      * Returns a new instance of a connection instance.
      *
-     * @param  mixed            $profile    Redis profile.
-     * @param  array            $parameters Additional connection parameters.
+     * @param mixed $profile    Redis profile.
+     * @param array $parameters Additional connection parameters.
+     *
      * @return WebdisConnection
      */
     protected function getConnection(&$profile = null, array $parameters = array())

+ 3 - 2
tests/Predis/Pipeline/PipelineTest.php

@@ -487,8 +487,9 @@ class PipelineTest extends PredisTestCase
      * Returns a client instance connected to the specified Redis
      * server instance to perform integration tests.
      *
-     * @param  array  $parameters Additional connection parameters.
-     * @param  array  $options    Additional client options.
+     * @param array $parameters Additional connection parameters.
+     * @param array $options    Additional client options.
+     *
      * @return Client
      */
     protected function getClient(array $parameters = array(), array $options = array())

+ 2 - 1
tests/Predis/Protocol/Text/ProtocolProcessorTest.php

@@ -46,8 +46,9 @@ class ProtocolProcessorTest extends PredisTestCase
     }
 
     /**
-     * @todo Improve test coverage
      * @group disconnected
+     *
+     * @todo Improve test coverage
      */
     public function testConnectionRead()
     {

+ 2 - 1
tests/Predis/Replication/ReplicationStrategyTest.php

@@ -232,7 +232,8 @@ class ReplicationStrategyTest extends PredisTestCase
     /**
      * Returns the list of expected supported commands.
      *
-     * @param  string $type Optional type of command (based on its keys)
+     * @param string $type Optional type of command (based on its keys)
+     *
      * @return array
      */
     protected function getExpectedCommands($type = null)

+ 15 - 10
tests/Predis/Transaction/MultiExecTest.php

@@ -802,7 +802,8 @@ class MultiExecTest extends PredisTestCase
      * Returns a mocked instance of Predis\Connection\NodeConnectionInterface
      * using the specified callback to return values from executeCommand().
      *
-     * @param  \Closure                                   $executeCallback
+     * @param \Closure $executeCallback
+     *
      * @return \Predis\Connection\NodeConnectionInterface
      */
     protected function getMockedConnection($executeCallback)
@@ -820,9 +821,10 @@ class MultiExecTest extends PredisTestCase
      * the specified callback to return values from the executeCommand method
      * of the underlying connection.
      *
-     * @param  \Closure  $executeCallback
-     * @param  array     $txOpts
-     * @param  array     $clientOpts
+     * @param \Closure $executeCallback
+     * @param array    $txOpts
+     * @param array    $clientOpts
+     *
      * @return MultiExec
      */
     protected function getMockedTransaction($executeCallback, $txOpts = null, $clientOpts = null)
@@ -837,9 +839,10 @@ class MultiExecTest extends PredisTestCase
     /**
      * Returns a callback that emulates a server-side MULTI/EXEC transaction context.
      *
-     * @param  array    $expected Expected responses.
-     * @param  array    $commands Reference to an array storing the whole flow of commands.
-     * @param  array    $cas      Check and set operations performed by the transaction.
+     * @param array $expected Expected responses.
+     * @param array $commands Reference to an array storing the whole flow of commands.
+     * @param array $cas      Check and set operations performed by the transaction.
+     *
      * @return \Closure
      */
     protected function getExecuteCallback($expected = array(), &$commands = array(), &$cas = array())
@@ -921,7 +924,8 @@ class MultiExecTest extends PredisTestCase
      * Converts an array of instances of Predis\Command\CommandInterface and
      * returns an array containing their IDs.
      *
-     * @param  array $commands List of commands instances.
+     * @param array $commands List of commands instances.
+     *
      * @return array
      */
     protected static function commandsToIDs($commands)
@@ -933,8 +937,9 @@ class MultiExecTest extends PredisTestCase
      * Returns a client instance connected to the specified Redis
      * server instance to perform integration tests.
      *
-     * @param  array  $parameters Additional connection parameters.
-     * @param  array  $options    Additional client options.
+     * @param array $parameters Additional connection parameters.
+     * @param array $options    Additional client options.
+     *
      * @return Client
      */
     protected function getClient(array $parameters = array(), array $options = array())