some PHPDoc fixes in lib

and removed some unused imports also
This commit is contained in:
Alexandru Patranescu
2013-06-02 23:58:19 +03:00
parent 7e0ec1a265
commit 2d2930d24f
25 changed files with 28 additions and 47 deletions
+1 -3
View File
@@ -15,14 +15,12 @@ use Predis\Command\CommandInterface;
use Predis\Command\ScriptedCommand;
use Predis\Connection\AggregatedConnectionInterface;
use Predis\Connection\ConnectionInterface;
use Predis\Connection\ConnectionFactory;
use Predis\Connection\ConnectionFactoryInterface;
use Predis\Monitor\MonitorContext;
use Predis\Option\ClientOptions;
use Predis\Option\ClientOptionsInterface;
use Predis\Pipeline\PipelineContext;
use Predis\Profile\ServerProfile;
use Predis\Profile\ServerProfileInterface;
use Predis\PubSub\PubSubContext;
use Predis\Transaction\MultiExecContext;
@@ -205,7 +203,7 @@ class Client implements ClientInterface
* Retrieves a single connection out of an aggregated connections instance.
*
* @param string $connectionId Index or alias of the connection.
* @return SingleConnectionInterface
* @return Connection\SingleConnectionInterface
*/
public function getConnectionById($connectionId)
{
+1 -1
View File
@@ -60,7 +60,7 @@ interface ClientInterface extends BasicClientInterface
*
* @param string $method The name of a Redis command.
* @param array $arguments The arguments for the command.
* @return CommandInterface
* @return Command\CommandInterface
*/
public function createCommand($method, $arguments = array());
}
@@ -11,6 +11,8 @@
namespace Predis\Cluster\Distribution;
use Predis\Cluster\Hash\HashGeneratorInterface;
/**
* A distributor implements the logic to automatically distribute
* keys among several nodes for client-side sharding.
@@ -44,7 +46,7 @@ interface DistributionStrategyInterface
/**
* Returns the underlying hash generator instance.
*
* @return Predis\Cluster\Hash\HashGeneratorInterface
* @return HashGeneratorInterface
*/
public function getHashGenerator();
}
@@ -11,8 +11,6 @@
namespace Predis\Connection;
use Predis\Command\CommandInterface;
/**
* Defines a cluster of Redis servers formed by aggregating multiple
* connection objects.
@@ -11,8 +11,6 @@
namespace Predis\Connection;
use Predis\Profile\ServerProfileInterface;
/**
* Interface that must be implemented by classes that provide their own mechanism
* to create and initialize new instances of Predis\Connection\SingleConnectionInterface.
@@ -40,16 +38,16 @@ interface ConnectionFactoryInterface
* Creates a new connection object.
*
* @param mixed $parameters Parameters for the connection.
* @return Predis\Connection\SingleConnectionInterface
* @return SingleConnectionInterface
*/
public function create($parameters);
/**
* Prepares an aggregation of connection objects.
*
* @param AggregatedConnectionInterface Instance of an aggregated connection class.
* @param AggregatedConnectionInterface $cluster Instance of an aggregated connection class.
* @param array $parameters List of parameters for each connection object.
* @return Predis\Connection\AggregatedConnectionInterface
* @return AggregatedConnectionInterface
*/
public function createAggregated(AggregatedConnectionInterface $cluster, Array $parameters);
}
@@ -12,7 +12,6 @@
namespace Predis\Connection;
use Predis\ClientException;
use Predis\Option\OptionInterface;
/**
* Handles parsing and validation of connection parameters.
@@ -11,7 +11,6 @@
namespace Predis\Connection;
use Predis\NotSupportedException;
use Predis\Command\CommandInterface;
use Predis\Replication\ReplicationStrategy;
@@ -11,7 +11,6 @@
namespace Predis\Connection;
use Predis\ClientException;
use Predis\NotSupportedException;
use Predis\ResponseError;
use Predis\ResponseQueued;
+2 -2
View File
@@ -11,7 +11,7 @@
namespace Predis\Connection;
use Predis\ClientException;
use Predis\Cluster\CommandHashStrategyInterface;
use Predis\NotSupportedException;
use Predis\Cluster\PredisClusterHashStrategy;
use Predis\Cluster\Distribution\DistributionStrategyInterface;
@@ -166,7 +166,7 @@ class PredisCluster implements ClusterConnectionInterface, \IteratorAggregate, \
* Returns the underlying command hash strategy used to hash
* commands by their keys.
*
* @return Predis\Cluster\CommandHashStrategyInterface
* @return CommandHashStrategyInterface
*/
public function getCommandHashStrategy()
{
+2 -1
View File
@@ -12,6 +12,7 @@
namespace Predis\Connection;
use Predis\ClientException;
use Predis\Cluster\CommandHashStrategyInterface;
use Predis\NotSupportedException;
use Predis\ResponseErrorInterface;
use Predis\Cluster\RedisClusterHashStrategy;
@@ -306,7 +307,7 @@ class RedisCluster implements ClusterConnectionInterface, \IteratorAggregate, \C
* Returns the underlying command hash strategy used to hash
* commands by their keys.
*
* @return Predis\Cluster\CommandHashStrategyInterface
* @return CommandHashStrategyInterface
*/
public function getCommandHashStrategy()
{
@@ -11,8 +11,6 @@
namespace Predis\Connection;
use Predis\Command\CommandInterface;
/**
* Defines a group of Redis servers in a master/slave replication configuration.
*
@@ -11,7 +11,6 @@
namespace Predis\Connection;
use Predis\NotSupportedException;
use Predis\ResponseError;
use Predis\ResponseQueued;
use Predis\Command\CommandInterface;
-4
View File
@@ -11,10 +11,6 @@
namespace Predis;
use Predis\Connection\AggregatedConnectionInterface;
use Predis\Connection\ClusterConnectionInterface;
use Predis\Connection\ConnectionInterface;
/**
* Defines a few helper methods.
*
+2 -2
View File
@@ -27,7 +27,7 @@ class MonitorContext implements \Iterator
private $position;
/**
* @param ClientInterface Client instance used by the context.
* @param ClientInterface $client Client instance used by the context.
*/
public function __construct(ClientInterface $client)
{
@@ -48,7 +48,7 @@ class MonitorContext implements \Iterator
* Checks if the passed client instance satisfies the required conditions
* needed to initialize a monitor context.
*
* @param ClientInterface Client instance used by the context.
* @param ClientInterface $client Client instance used by the context.
*/
private function checkCapabilities(ClientInterface $client)
{
@@ -28,7 +28,7 @@ class FireAndForgetExecutor implements PipelineExecutorInterface
* connection before starting to execute the commands stored
* in the pipeline.
*
* @param ConnectionInterface Connection instance.
* @param ConnectionInterface $connection Connection instance.
*/
protected function checkConnection(ConnectionInterface $connection)
{
+1 -2
View File
@@ -16,7 +16,6 @@ use SplQueue;
use Predis\ClientException;
use Predis\ResponseErrorInterface;
use Predis\ResponseObjectInterface;
use Predis\ResponseQueued;
use Predis\ServerException;
use Predis\Connection\ConnectionInterface;
use Predis\Connection\SingleConnectionInterface;
@@ -47,7 +46,7 @@ class MultiExecExecutor implements PipelineExecutorInterface
* connection before starting to execute the commands stored
* in the pipeline.
*
* @param ConnectionInterface Connection instance.
* @param ConnectionInterface $connection Connection instance.
*/
protected function checkConnection(ConnectionInterface $connection)
{
+1 -1
View File
@@ -48,7 +48,7 @@ class PipelineContext implements BasicClientInterface, ExecutableContextInterfac
* Returns a pipeline executor depending on the kind of the underlying
* connection and the passed options.
*
* @param ClientInterface Client instance used by the context.
* @param ClientInterface $client Client instance used by the context.
* @return PipelineExecutorInterface
*/
protected function createExecutor(ClientInterface $client)
-1
View File
@@ -13,7 +13,6 @@ namespace Predis\Pipeline;
use SplQueue;
use Predis\CommunicationException;
use Predis\ServerException;
use Predis\Connection\ConnectionInterface;
/**
+1 -1
View File
@@ -44,7 +44,7 @@ class StandardExecutor implements PipelineExecutorInterface
* connection before starting to execute the commands stored
* in the pipeline.
*
* @param ConnectionInterface Connection instance.
* @param ConnectionInterface $connection Connection instance.
*/
protected function checkConnection(ConnectionInterface $connection)
{
@@ -11,6 +11,7 @@
namespace Predis\Profile;
use Predis\Command\CommandInterface;
/**
* A server profile defines features and commands supported by certain
@@ -49,7 +50,7 @@ interface ServerProfileInterface
*
* @param string $method Command ID.
* @param array $arguments Arguments for the command.
* @return Predis\Command\CommandInterface
* @return CommandInterface
*/
public function createCommand($method, $arguments = array());
}
@@ -14,7 +14,6 @@ namespace Predis\Protocol\Text;
use Predis\CommunicationException;
use Predis\ResponseError;
use Predis\ResponseQueued;
use Predis\ServerException;
use Predis\Command\CommandInterface;
use Predis\Connection\ComposableConnectionInterface;
use Predis\Iterator\MultiBulkResponseSimple;
@@ -11,10 +11,6 @@
namespace Predis\PubSub;
use Predis\ClientException;
use Predis\ClientInterface;
use Predis\NotSupportedException;
/**
* Client-side abstraction of a Publish / Subscribe context.
*
+2 -2
View File
@@ -28,7 +28,7 @@ class DispatcherLoop
protected $subscriptionCallback;
/**
* @param ClientInterface Client instance used by the context.
* @param ClientInterface $client Client instance used by the context.
*/
public function __construct(ClientInterface $client)
{
@@ -39,7 +39,7 @@ class DispatcherLoop
/**
* Checks if the passed argument is a valid callback.
*
* @param mixed A callback.
* @param mixed $callable A callback.
*/
protected function validateCallback($callable)
{
+3 -3
View File
@@ -28,8 +28,8 @@ class PubSubContext extends AbstractPubSubContext
private $options;
/**
* @param ClientInterface Client instance used by the context.
* @param array Options for the context initialization.
* @param ClientInterface $client Client instance used by the context.
* @param array $options Options for the context initialization.
*/
public function __construct(ClientInterface $client, Array $options = null)
{
@@ -55,7 +55,7 @@ class PubSubContext extends AbstractPubSubContext
* Checks if the passed client instance satisfies the required conditions
* needed to initialize a Publish / Subscribe context.
*
* @param ClientInterface Client instance used by the context.
* @param ClientInterface $client Client instance used by the context.
*/
private function checkCapabilities(ClientInterface $client)
{
+3 -3
View File
@@ -47,8 +47,8 @@ class MultiExecContext implements BasicClientInterface, ExecutableContextInterfa
protected $commands;
/**
* @param ClientInterface Client instance used by the context.
* @param array Options for the context initialization.
* @param ClientInterface $client Client instance used by the context.
* @param array $options Options for the context initialization.
*/
public function __construct(ClientInterface $client, Array $options = null)
{
@@ -113,7 +113,7 @@ class MultiExecContext implements BasicClientInterface, ExecutableContextInterfa
* Checks if the passed client instance satisfies the required conditions
* needed to initialize a transaction context.
*
* @param ClientInterface Client instance used by the context.
* @param ClientInterface $client Client instance used by the context.
*/
private function checkCapabilities(ClientInterface $client)
{