Browse Source

[phpdoc] Fix missing throws of phpdoc headers.

Thibaud BARDIN 10 years ago
parent
commit
0fc5c5ee77

+ 6 - 0
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)
     {

+ 2 - 0
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)
     {

+ 2 - 0
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)
     {

+ 2 - 0
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)
     {

+ 2 - 0
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)
     {

+ 2 - 0
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)
     {

+ 4 - 0
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)
     {

+ 2 - 0
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)
     {

+ 2 - 0
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)
     {

+ 2 - 0
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)
     {

+ 2 - 0
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)
     {

+ 2 - 0
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)
     {

+ 2 - 0
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)
     {

+ 3 - 0
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)
     {