diff --git a/src/Client.php b/src/Client.php index 94f9c7c9..a8aae736 100644 --- a/src/Client.php +++ b/src/Client.php @@ -67,6 +67,8 @@ class Client implements ClientInterface * @param mixed $options Client options. * * @return OptionsInterface + * + * @throws \InvalidArgumentException */ protected function createOptions($options) { @@ -97,6 +99,8 @@ class Client implements ClientInterface * @param mixed $parameters Connection parameters or connection instance. * * @return ConnectionInterface + * + * @throws \InvalidArgumentException */ protected function createConnection($parameters) { @@ -188,6 +192,8 @@ class Client implements ClientInterface * @param string $connectionID Identifier of a connection. * * @return Client + * + * @throws \InvalidArgumentException */ public function getClientFor($connectionID) { diff --git a/src/Cluster/ClusterStrategy.php b/src/Cluster/ClusterStrategy.php index 2361435b..4d49f43f 100644 --- a/src/Cluster/ClusterStrategy.php +++ b/src/Cluster/ClusterStrategy.php @@ -187,6 +187,8 @@ abstract class ClusterStrategy implements StrategyInterface * * @param string $commandID Command ID. * @param mixed $callback A valid callable object, or NULL to unset the handler. + * + * @throws \InvalidArgumentException */ public function setCommandHandler($commandID, $callback = null) { diff --git a/src/Collection/Iterator/ListKey.php b/src/Collection/Iterator/ListKey.php index da5f6042..e8d31ec1 100644 --- a/src/Collection/Iterator/ListKey.php +++ b/src/Collection/Iterator/ListKey.php @@ -45,6 +45,8 @@ class ListKey implements Iterator * @param ClientInterface $client Client connected to Redis. * @param string $key Redis list key. * @param int $count Number of items retrieved on each fetch operation. + * + * @throws \InvalidArgumentException */ public function __construct(ClientInterface $client, $key, $count = 10) { diff --git a/src/Command/Processor/KeyPrefixProcessor.php b/src/Command/Processor/KeyPrefixProcessor.php index d189c067..b873ab42 100644 --- a/src/Command/Processor/KeyPrefixProcessor.php +++ b/src/Command/Processor/KeyPrefixProcessor.php @@ -203,6 +203,8 @@ class KeyPrefixProcessor implements ProcessorInterface * * @param string $commandID The ID of the command to be handled. * @param mixed $callback A valid callable object or NULL. + * + * @throws \InvalidArgumentException */ public function setCommandHandler($commandID, $callback = null) { diff --git a/src/Command/RawCommand.php b/src/Command/RawCommand.php index a7f17894..cc072400 100644 --- a/src/Command/RawCommand.php +++ b/src/Command/RawCommand.php @@ -31,6 +31,8 @@ class RawCommand implements CommandInterface /** * @param array $arguments Command ID and its arguments. + * + * @throws \InvalidArgumentException */ public function __construct(array $arguments) { diff --git a/src/Connection/AbstractConnection.php b/src/Connection/AbstractConnection.php index 6807b31d..46ec1ab6 100644 --- a/src/Connection/AbstractConnection.php +++ b/src/Connection/AbstractConnection.php @@ -53,6 +53,8 @@ abstract class AbstractConnection implements NodeConnectionInterface * @param ParametersInterface $parameters Initialization parameters for the connection. * * @return ParametersInterface + * + * @throws \InvalidArgumentException */ protected function assertParameters(ParametersInterface $parameters) { diff --git a/src/Connection/Aggregate/RedisCluster.php b/src/Connection/Aggregate/RedisCluster.php index 3d3b84f4..7a23f302 100644 --- a/src/Connection/Aggregate/RedisCluster.php +++ b/src/Connection/Aggregate/RedisCluster.php @@ -227,6 +227,8 @@ class RedisCluster implements ClusterInterface, IteratorAggregate, Countable * @param int $first Initial slot of the range. * @param int $last Last slot of the range. * @param NodeConnectionInterface|string $connection ID or connection instance. + * + * @throws \OutOfBoundsException */ public function setSlots($first, $last, $connection) { @@ -316,6 +318,8 @@ class RedisCluster implements ClusterInterface, IteratorAggregate, Countable * @param int $slot Slot index. * * @return NodeConnectionInterface + * + * @throws \OutOfBoundsException */ public function getConnectionBySlot($slot) { diff --git a/src/Connection/Factory.php b/src/Connection/Factory.php index 2ce1a798..f26a1df3 100644 --- a/src/Connection/Factory.php +++ b/src/Connection/Factory.php @@ -37,6 +37,8 @@ class Factory implements FactoryInterface * @param mixed $initializer FQN of a connection class or a callable for lazy initialization. * * @return mixed + * + * @throws \InvalidArgumentException */ protected function checkInitializer($initializer) { diff --git a/src/Connection/Parameters.php b/src/Connection/Parameters.php index 45a7be17..2dea94df 100644 --- a/src/Connection/Parameters.php +++ b/src/Connection/Parameters.php @@ -72,6 +72,8 @@ class Parameters implements ParametersInterface * @param string $uri URI string. * * @return array + * + * @throws \InvalidArgumentException */ public static function parse($uri) { diff --git a/src/Connection/WebdisConnection.php b/src/Connection/WebdisConnection.php index d056aa03..96d01326 100644 --- a/src/Connection/WebdisConnection.php +++ b/src/Connection/WebdisConnection.php @@ -51,6 +51,8 @@ class WebdisConnection implements NodeConnectionInterface /** * @param ParametersInterface $parameters Initialization parameters for the connection. + * + * @throws \InvalidArgumentException */ public function __construct(ParametersInterface $parameters) { diff --git a/src/Profile/Factory.php b/src/Profile/Factory.php index 1773f186..f1f02475 100644 --- a/src/Profile/Factory.php +++ b/src/Profile/Factory.php @@ -66,6 +66,8 @@ final class Factory * * @param string $alias Profile version or alias. * @param string $class FQN of a class implementing Predis\Profile\ProfileInterface. + * + * @throws \InvalidArgumentException */ public static function define($alias, $class) { diff --git a/src/Profile/RedisProfile.php b/src/Profile/RedisProfile.php index df69e9a9..acfd802e 100644 --- a/src/Profile/RedisProfile.php +++ b/src/Profile/RedisProfile.php @@ -106,6 +106,8 @@ abstract class RedisProfile implements ProfileInterface * * @param string $commandID Command ID. * @param string $class Fully-qualified name of a Predis\Command\CommandInterface. + * + * @throws \InvalidArgumentException */ public function defineCommand($commandID, $class) { diff --git a/src/PubSub/DispatcherLoop.php b/src/PubSub/DispatcherLoop.php index 7a099deb..b1088484 100644 --- a/src/PubSub/DispatcherLoop.php +++ b/src/PubSub/DispatcherLoop.php @@ -40,6 +40,8 @@ class DispatcherLoop * Checks if the passed argument is a valid callback. * * @param mixed $callable A callback. + * + * @throws \InvalidArgumentException */ protected function assertCallback($callable) { diff --git a/src/Response/Iterator/MultiBulkTuple.php b/src/Response/Iterator/MultiBulkTuple.php index 42bcbc93..9cf4eea9 100644 --- a/src/Response/Iterator/MultiBulkTuple.php +++ b/src/Response/Iterator/MultiBulkTuple.php @@ -45,6 +45,9 @@ class MultiBulkTuple extends MultiBulk implements OuterIterator * Checks for valid preconditions. * * @param MultiBulk $iterator Inner multibulk response iterator. + * + * @throws \UnexpectedValueException + * @throws \InvalidArgumentException */ protected function checkPreconditions(MultiBulk $iterator) {