Переглянути джерело

Fix some errors in phpdocs.

[ci skip]
Daniele Alessandri 11 роки тому
батько
коміт
25cd43033f

+ 2 - 2
lib/Predis/Client.php

@@ -240,8 +240,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.
-     * @return SingleConnectionInterface
+     * @param  string                               $connectionID Index or alias of the single connection.
+     * @return Connection\SingleConnectionInterface
      */
     public function getConnectionById($connectionID)
     {

+ 2 - 2
lib/Predis/Collection/Iterator/CursorBasedIterator.php

@@ -59,8 +59,8 @@ abstract class CursorBasedIterator implements Iterator
      * Ensures that the client supports the specified Redis command required to
      * fetch elements from the server to perform the iteration.
      *
-     * @param ClientInterface Client connected to Redis.
-     * @param string $commandID Command ID.
+     * @param ClientInterface $client    Client connected to Redis.
+     * @param string          $commandID Command ID.
      */
     protected function requiredCommand(ClientInterface $client, $commandID)
     {

+ 2 - 2
lib/Predis/Collection/Iterator/ListKey.php

@@ -65,8 +65,8 @@ class ListKey implements Iterator
      * Ensures that the client instance supports the specified Redis command
      * required to fetch elements from the server to perform the iteration.
      *
-     * @param ClientInterface Client connected to Redis.
-     * @param string $commandID Command ID.
+     * @param ClientInterface $client    Client connected to Redis.
+     * @param string          $commandID Command ID.
      */
     protected function requiredCommand(ClientInterface $client, $commandID)
     {

+ 1 - 3
lib/Predis/Command/Command.php

@@ -59,9 +59,7 @@ abstract class Command implements CommandInterface
     }
 
     /**
-     * Gets the argument from the arguments list at the specified index.
-     *
-     * @param array $arguments Position of the argument.
+     * {@inheritdoc}
      */
     public function getArgument($index)
     {

+ 1 - 1
lib/Predis/Command/PubSubPubsub.php

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

+ 2 - 3
lib/Predis/Command/RawCommand.php

@@ -46,6 +46,7 @@ class RawCommand implements CommandInterface
      *
      * @param string $commandID Redis command ID.
      * @param string ... Arguments list for the command.
+     * @return CommandInterface
      */
     public static function create($commandID /* [ $arg, ... */)
     {
@@ -89,9 +90,7 @@ class RawCommand implements CommandInterface
     }
 
     /**
-     * Gets the argument from the arguments list at the specified index.
-     *
-     * @param array $arguments Position of the argument.
+     * {@inheritdoc}
      */
     public function getArgument($index)
     {

+ 1 - 1
lib/Predis/Command/ServerSentinel.php

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

+ 2 - 1
lib/Predis/Connection/AbstractConnection.php

@@ -50,7 +50,8 @@ abstract class AbstractConnection implements SingleConnectionInterface
     /**
      * 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)
     {

+ 1 - 1
lib/Predis/Connection/Parameters.php

@@ -38,7 +38,7 @@ class Parameters implements ParametersInterface
     );
 
     /**
-     * @param array Named array of connection parameters.
+     * @param array $parameters Named array of connection parameters.
      */
     public function __construct(array $parameters = array())
     {

+ 1 - 1
lib/Predis/Connection/RedisCluster.php

@@ -481,7 +481,7 @@ class RedisCluster implements ClusterConnectionInterface, IteratorAggregate, Cou
      * Returns the underlying command hash strategy used to hash commands by
      * using keys found in their arguments.
      *
-     * @return ClusterStrategyInterface
+     * @return \Predis\Cluster\StrategyInterface
      */
     public function getClusterStrategy()
     {

+ 2 - 2
lib/Predis/Protocol/Text/ResponseReader.php

@@ -64,8 +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.
-     * @return ResponseHandlerInterface
+     * @param  string                           $prefix Identifier of the type of response.
+     * @return Handler\ResponseHandlerInterface
      */
     public function getHandler($prefix)
     {