diff --git a/lib/Predis/Client.php b/lib/Predis/Client.php index 32b71169..25d819f3 100644 --- a/lib/Predis/Client.php +++ b/lib/Predis/Client.php @@ -180,6 +180,7 @@ 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. * @return Client */ public function getClientFor($connectionID) @@ -390,7 +391,7 @@ 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 $arg,... 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 */) @@ -428,7 +429,7 @@ 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 $arg,... Array of options, a callable for execution, or both. + * @param mixed ... Array of options, a callable for execution, or both. * @return TransactionMultiExec|array */ public function transaction(/* arguments */) @@ -458,7 +459,7 @@ 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 $arg,... 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 */) diff --git a/lib/Predis/Cluster/Distributor/DistributorInterface.php b/lib/Predis/Cluster/Distributor/DistributorInterface.php index 853320f9..f96bf8e9 100644 --- a/lib/Predis/Cluster/Distributor/DistributorInterface.php +++ b/lib/Predis/Cluster/Distributor/DistributorInterface.php @@ -39,6 +39,7 @@ interface DistributorInterface /** * Returns a node from the distributor using the computed hash of a key. * + * @param mixed $key * @return mixed */ public function get($key); diff --git a/lib/Predis/Command/CommandInterface.php b/lib/Predis/Command/CommandInterface.php index ce16ab95..56337c37 100644 --- a/lib/Predis/Command/CommandInterface.php +++ b/lib/Predis/Command/CommandInterface.php @@ -64,7 +64,8 @@ interface CommandInterface /** * Gets the argument of the command at the specified index. * - * @return array + * @param int $index Index of the desired argument. + * @return mixed */ public function getArgument($index); diff --git a/lib/Predis/Configuration/OptionInterface.php b/lib/Predis/Configuration/OptionInterface.php index 9e6f730a..e728376e 100644 --- a/lib/Predis/Configuration/OptionInterface.php +++ b/lib/Predis/Configuration/OptionInterface.php @@ -22,7 +22,8 @@ interface OptionInterface /** * Filters and validates the passed value. * - * @param mixed $value Input value. + * @param OptionsInterface $options Options container. + * @param mixed $value Input value. * @return mixed */ public function filter(OptionsInterface $options, $value); @@ -30,7 +31,7 @@ interface OptionInterface /** * Returns the default value for the option. * - * @param mixed $value Input value. + * @param OptionsInterface $options Options container. * @return mixed */ public function getDefault(OptionsInterface $options); diff --git a/lib/Predis/Connection/ParametersInterface.php b/lib/Predis/Connection/ParametersInterface.php index a07f39a5..4fb1d2b5 100644 --- a/lib/Predis/Connection/ParametersInterface.php +++ b/lib/Predis/Connection/ParametersInterface.php @@ -21,8 +21,8 @@ interface ParametersInterface /** * Checks if the specified parameters is set. * - * @param string $property Name of the property. - * @return Boolean + * @param string $parameter Name of the parameter. + * @return bool */ public function __isset($parameter); diff --git a/lib/Predis/Profile/RedisProfile.php b/lib/Predis/Profile/RedisProfile.php index 030091df..456952f4 100644 --- a/lib/Predis/Profile/RedisProfile.php +++ b/lib/Predis/Profile/RedisProfile.php @@ -103,8 +103,8 @@ abstract class RedisProfile implements ProfileInterface /** * Defines a new command in the server profile. * - * @param string $commandID Command ID. - * @param string $commandClass Fully-qualified name of a Predis\Command\CommandInterface. + * @param string $commandID Command ID. + * @param string $class Fully-qualified name of a Predis\Command\CommandInterface. */ public function defineCommand($commandID, $class) { diff --git a/lib/Predis/PubSub/AbstractConsumer.php b/lib/Predis/PubSub/AbstractConsumer.php index f1f135e6..c87a151d 100644 --- a/lib/Predis/PubSub/AbstractConsumer.php +++ b/lib/Predis/PubSub/AbstractConsumer.php @@ -56,9 +56,9 @@ abstract class AbstractConsumer implements Iterator /** * Subscribes to the specified channels. * - * @param mixed $arg,... One or more channel names. + * @param mixed $channel,... One or more channel names. */ - public function subscribe(/* arguments */) + public function subscribe($channel /*, ... */) { $this->writeRequest(self::SUBSCRIBE, func_get_args()); $this->statusFlags |= self::STATUS_SUBSCRIBED; @@ -67,9 +67,9 @@ abstract class AbstractConsumer implements Iterator /** * Unsubscribes from the specified channels. * - * @param mixed $arg,... One or more channel names. + * @param string ... One or more channel names. */ - public function unsubscribe(/* arguments */) + public function unsubscribe(/* ... */) { $this->writeRequest(self::UNSUBSCRIBE, func_get_args()); } @@ -77,9 +77,9 @@ abstract class AbstractConsumer implements Iterator /** * Subscribes to the specified channels using a pattern. * - * @param mixed $arg,... One or more channel name patterns. + * @param mixed $pattern,... One or more channel name patterns. */ - public function psubscribe(/* arguments */) + public function psubscribe($pattern /* ... */) { $this->writeRequest(self::PSUBSCRIBE, func_get_args()); $this->statusFlags |= self::STATUS_PSUBSCRIBED; @@ -88,9 +88,9 @@ abstract class AbstractConsumer implements Iterator /** * Unsubscribes from the specified channels using a pattern. * - * @param mixed $arg,... One or more channel name patterns. + * @param string ... One or more channel name patterns. */ - public function punsubscribe(/* arguments */) + public function punsubscribe(/* ... */) { $this->writeRequest(self::PUNSUBSCRIBE, func_get_args()); } diff --git a/lib/Predis/Response/Status.php b/lib/Predis/Response/Status.php index 393612ea..77feddcd 100644 --- a/lib/Predis/Response/Status.php +++ b/lib/Predis/Response/Status.php @@ -57,6 +57,7 @@ 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. * @return string */ public static function get($payload) diff --git a/lib/Predis/Transaction/MultiExec.php b/lib/Predis/Transaction/MultiExec.php index 7cd81e75..76cde033 100644 --- a/lib/Predis/Transaction/MultiExec.php +++ b/lib/Predis/Transaction/MultiExec.php @@ -165,7 +165,7 @@ class MultiExec implements BasicClientInterface, ExecutableContextInterface /** * Executes a Redis command bypassing the transaction logic. * - * @param string $method Command ID. + * @param string $commandID Command ID. * @param array $arguments Arguments for the command. * @return mixed */ diff --git a/tests/PHPUnit/PredisCommandTestCase.php b/tests/PHPUnit/PredisCommandTestCase.php index 56e9bf59..ac36151f 100644 --- a/tests/PHPUnit/PredisCommandTestCase.php +++ b/tests/PHPUnit/PredisCommandTestCase.php @@ -49,7 +49,7 @@ abstract class PredisCommandTestCase extends PredisTestCase /** * Returns a new client instance. * - * @param bool $connect Flush selected database before returning the client. + * @param bool $flushdb Flush selected database before returning the client. * @return Client */ public function getClient($flushdb = true) diff --git a/tests/PHPUnit/PredisProfileTestCase.php b/tests/PHPUnit/PredisProfileTestCase.php index 644edd71..891db9e5 100644 --- a/tests/PHPUnit/PredisProfileTestCase.php +++ b/tests/PHPUnit/PredisProfileTestCase.php @@ -22,6 +22,7 @@ abstract class PredisProfileTestCase extends PredisTestCase /** * Returns a new instance of the tested profile. * + * @param string $version Version of Redis. * @return ProfileInterface */ protected function getProfile($version = null) diff --git a/tests/PHPUnit/PredisTestCase.php b/tests/PHPUnit/PredisTestCase.php index 22643a50..4452b0e4 100644 --- a/tests/PHPUnit/PredisTestCase.php +++ b/tests/PHPUnit/PredisTestCase.php @@ -23,8 +23,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|CommandInterface $command Expected command or command ID. - * @param array $arguments Expected command arguments. + * @param string|CommandInterface $command Expected command or command ID. + * @param array $arguments Expected command arguments. + * @return RedisCommandConstraint */ public function isRedisCommand($command = null, array $arguments = null) { @@ -121,7 +122,7 @@ abstract class PredisTestCase extends PHPUnit_Framework_TestCase /** * Returns a new instance of server profile. * - * @param array $additional Additional connection parameters. + * @param string $version Redis profile. * @return Profile\ProfileInterface */ protected function getProfile($version = null) @@ -132,7 +133,9 @@ abstract class PredisTestCase extends PHPUnit_Framework_TestCase /** * Returns a new client instance. * - * @param bool $connect 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) @@ -160,8 +163,9 @@ abstract class PredisTestCase extends PHPUnit_Framework_TestCase } /** - * @param string $expectedVersion Expected redis version + * @param string $expectedVersion Expected redis version. * @param string $operator Comparison operator. + * @param callable $callback Callback for matching version. * @throws PHPUnit_Framework_SkippedTestError When expected redis version is not met */ protected function executeOnRedisVersion($expectedVersion, $operator, $callback) @@ -189,8 +193,9 @@ abstract class PredisTestCase extends PHPUnit_Framework_TestCase } /** - * @param string $expectedVersion Expected redis version + * @param string $expectedVersion Expected redis version. * @param string $operator Comparison operator. + * @param callable $callback Callback for matching version. * @throws PHPUnit_Framework_SkippedTestError When expected redis version is not met */ protected function executeOnProfileVersion($expectedVersion, $operator, $callback) diff --git a/tests/PHPUnit/RedisCommandConstraint.php b/tests/PHPUnit/RedisCommandConstraint.php index dee7d869..7bf6bc70 100644 --- a/tests/PHPUnit/RedisCommandConstraint.php +++ b/tests/PHPUnit/RedisCommandConstraint.php @@ -20,7 +20,8 @@ class RedisCommandConstraint extends PHPUnit_Framework_Constraint protected $arguments; /** - * @param array $array + * @param string|CommandInterface $command Expected command ID or instance. + * @param array $arguments Expected command arguments. */ public function __construct($command = null, array $arguments = null) { diff --git a/tests/Predis/CommunicationExceptionTest.php b/tests/Predis/CommunicationExceptionTest.php index 5d9425e7..1d88cd79 100644 --- a/tests/Predis/CommunicationExceptionTest.php +++ b/tests/Predis/CommunicationExceptionTest.php @@ -97,10 +97,10 @@ class CommunicationExceptionTest extends PredisTestCase /** * Returns a connection exception instance. * - * @param Connection\SingleConnectionInterface $message Connection instance. - * @param string $message Exception message. - * @param int $code Exception code. - * @param \Exception $inner Inner exception. + * @param Connection\SingleConnectionInterface $connection Connection instance. + * @param string $message Exception message. + * @param int $code Exception code. + * @param \Exception $inner Inner exception. * @return \Exception */ protected function getException( diff --git a/tests/Predis/Connection/WebdisConnectionTest.php b/tests/Predis/Connection/WebdisConnectionTest.php index b1b54b26..7cec786d 100644 --- a/tests/Predis/Connection/WebdisConnectionTest.php +++ b/tests/Predis/Connection/WebdisConnectionTest.php @@ -171,6 +171,7 @@ class WebdisConnectionTest extends PredisTestCase /** * Returns a new instance of a connection instance. * + * @param mixed $profile Redis profile. * @param array $parameters Additional connection parameters. * @return WebdisConnection */ diff --git a/tests/Predis/Pipeline/PipelineTest.php b/tests/Predis/Pipeline/PipelineTest.php index 6c184adc..3e574a97 100644 --- a/tests/Predis/Pipeline/PipelineTest.php +++ b/tests/Predis/Pipeline/PipelineTest.php @@ -487,9 +487,9 @@ class PipelineTest extends PredisTestCase * Returns a client instance connected to the specified Redis * server instance to perform integration tests. * - * @return array Additional connection parameters. - * @return array Additional client options. - * @return Client New client instance. + * @param array $parameters Additional connection parameters. + * @param array $options Additional client options. + * @return Client */ protected function getClient(array $parameters = array(), array $options = array()) { diff --git a/tests/Predis/Transaction/MultiExecTest.php b/tests/Predis/Transaction/MultiExecTest.php index 87ca2a3e..1ee49ace 100644 --- a/tests/Predis/Transaction/MultiExecTest.php +++ b/tests/Predis/Transaction/MultiExecTest.php @@ -749,6 +749,8 @@ class MultiExecTest extends PredisTestCase * of the underlying connection. * * @param \Closure $executeCallback + * @param array $txOpts + * @param array $clientOpts * @return MultiExec */ protected function getMockedTransaction($executeCallback, $txOpts = null, $clientOpts = null) @@ -764,7 +766,8 @@ 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 that stores the whole flow of commands. + * @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())