Forráskód Böngészése

Apply some more minor phpdoc fixes.

Daniele Alessandri 11 éve
szülő
commit
d2debfd43e

+ 1 - 1
lib/Predis/Autoloader.php

@@ -36,7 +36,7 @@ class Autoloader
     /**
      * Registers the autoloader class with the PHP SPL autoloader.
      *
-     * @param boolean $prepend Prepend the autoloader on the stack instead of appending it.
+     * @param bool $prepend Prepend the autoloader on the stack instead of appending it.
      */
     public static function register($prepend = false)
     {

+ 8 - 8
lib/Predis/Client.php

@@ -20,7 +20,6 @@ use Predis\Monitor\MonitorContext;
 use Predis\Option\ClientOptions;
 use Predis\Option\ClientOptionsInterface;
 use Predis\Pipeline\PipelineContext;
-use Predis\Profile\ServerProfile;
 use Predis\PubSub\PubSubContext;
 use Predis\Transaction\MultiExecContext;
 
@@ -143,6 +142,7 @@ class Client implements ClientInterface
      * client is connected to a cluster. The new instance will use the same
      * options of the original client.
      *
+     * @param  string $connectionID Identifier for the connection.
      * @return Client
      */
     public function getClientFor($connectionID)
@@ -183,8 +183,8 @@ class Client implements ClientInterface
     /**
      * Checks if the underlying connection is connected to Redis.
      *
-     * @return Boolean True means that the connection is open.
-     *                 False means that the connection is closed.
+     * @return bool True means that the connection is open.
+     *              False means that the connection is closed.
      */
     public function isConnected()
     {
@@ -351,7 +351,7 @@ class Client implements ClientInterface
     /**
      * Executes a pipeline context when a callable object is passed.
      *
-     * @param  array                 $options  Options of the context initialization.
+     * @param  PipelineContext       $pipeline Pipeline context instance.
      * @param  mixed                 $callable Optional callable object used to execute the context.
      * @return PipelineContext|array
      */
@@ -411,8 +411,8 @@ class Client implements ClientInterface
      *             Client::pubSubLoop() to create Predis\PubSub\PubSubContext
      *             instances from now on.
      *
-     * @param  mixed                   ... Options for the context, a callable object, or both.
-     * @return PubSubExecContext|array
+     * @param  mixed               ... Options for the context, a callable object, or both.
+     * @return PubSubContext|array
      */
     public function pubSub(/* arguments */)
     {
@@ -423,8 +423,8 @@ class Client implements ClientInterface
      * Creates a new Publish / Subscribe context and returns it, or executes it
      * inside the optionally provided callable object.
      *
-     * @param  mixed                   ... Options for the context, a callable object, or both.
-     * @return PubSubExecContext|array
+     * @param  mixed               ... Options for the context, a callable object, or both.
+     * @return PubSubContext|array
      */
     public function pubSubLoop(/* arguments */)
     {

+ 1 - 1
lib/Predis/Cluster/Distribution/HashRing.php

@@ -90,7 +90,7 @@ class HashRing implements DistributionStrategyInterface, HashGeneratorInterface
     /**
      * Returns the initialization status of the distributor.
      *
-     * @return Boolean
+     * @return bool
      */
     private function isInitialized()
     {

+ 2 - 2
lib/Predis/Cluster/PredisClusterHashStrategy.php

@@ -345,8 +345,8 @@ class PredisClusterHashStrategy implements CommandHashStrategyInterface
     /**
      * Checks if the specified array of keys will generate the same hash.
      *
-     * @param  array   $keys Array of keys.
-     * @return Boolean
+     * @param  array $keys Array of keys.
+     * @return bool
      */
     protected function checkSameHashForKeys(Array $keys)
     {

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

@@ -70,7 +70,7 @@ class ZSetRange extends PrefixableCommand
     /**
      * Checks for the presence of the WITHSCORES modifier.
      *
-     * @return Boolean
+     * @return bool
      */
     protected function withScores()
     {

+ 1 - 1
lib/Predis/CommunicationException.php

@@ -48,7 +48,7 @@ abstract class CommunicationException extends PredisException
     /**
      * Indicates if the receiver should reset the underlying connection.
      *
-     * @return Boolean
+     * @return bool
      */
     public function shouldResetConnection()
     {

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

@@ -32,7 +32,7 @@ interface AggregatedConnectionInterface extends ConnectionInterface
      * connection.
      *
      * @param  SingleConnectionInterface $connection Instance of a connection.
-     * @return Boolean                   Returns true if the connection was in the pool.
+     * @return bool                      Returns true if the connection was in the pool.
      */
     public function remove(SingleConnectionInterface $connection);
 

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

@@ -34,7 +34,7 @@ interface ConnectionInterface
     /**
      * Returns if the connection is open.
      *
-     * @return Boolean
+     * @return bool
      */
     public function isConnected();
 

+ 2 - 2
lib/Predis/Connection/ConnectionParameters.php

@@ -71,8 +71,8 @@ class ConnectionParameters implements ConnectionParametersInterface
     /**
      * Validates value as boolean.
      *
-     * @param  mixed   $value Input value.
-     * @return boolean
+     * @param  mixed $value Input value.
+     * @return bool
      */
     private static function castBoolean($value)
     {

+ 0 - 1
lib/Predis/Connection/PhpiredisConnection.php

@@ -137,7 +137,6 @@ class PhpiredisConnection extends AbstractConnection
     /**
      * Gets the handler used by the protocol reader to handle Redis errors.
      *
-     * @param  Boolean  $throw_errors Specify if Redis errors throw exceptions.
      * @return \Closure
      */
     private function getErrorHandler()

+ 0 - 1
lib/Predis/Connection/PhpiredisStreamConnection.php

@@ -133,7 +133,6 @@ class PhpiredisStreamConnection extends StreamConnection
     /**
      * Gets the handler used by the protocol reader to handle Redis errors.
      *
-     * @param  Boolean  $throw_errors Specify if Redis errors throw exceptions.
      * @return \Closure
      */
     protected function getErrorHandler()

+ 2 - 2
lib/Predis/Connection/PredisCluster.php

@@ -112,8 +112,8 @@ class PredisCluster implements ClusterConnectionInterface, \IteratorAggregate, \
     /**
      * Removes a connection instance using its alias or index.
      *
-     * @param  string  $connectionId Alias or index of a connection.
-     * @return Boolean Returns true if the connection was in the pool.
+     * @param  string $connectionId Alias or index of a connection.
+     * @return bool   Returns true if the connection was in the pool.
      */
     public function removeById($connectionId)
     {

+ 2 - 2
lib/Predis/Iterator/MultiBulkResponseSimple.php

@@ -49,8 +49,8 @@ class MultiBulkResponseSimple extends MultiBulkResponse
      * read from the connection by consuming the rest of the multibulk reply,
      * or simply by dropping the connection.
      *
-     * @param Boolean $drop True to synchronize the client by dropping the connection.
-     *                      False to synchronize the client by consuming the multibulk reply.
+     * @param bool $drop True to synchronize the client by dropping the connection.
+     *                   False to synchronize the client by consuming the multibulk reply.
      */
     public function sync($drop = false)
     {

+ 1 - 1
lib/Predis/Monitor/MonitorContext.php

@@ -117,7 +117,7 @@ class MonitorContext implements \Iterator
     /**
      * Checks if the the context is still in a valid state to continue.
      *
-     * @return Boolean
+     * @return bool
      */
     public function valid()
     {

+ 2 - 2
lib/Predis/Option/ClientOptions.php

@@ -75,8 +75,8 @@ class ClientOptions implements ClientOptionsInterface
     /**
      * Checks if the specified option is set.
      *
-     * @param  string  $option Name of the option.
-     * @return Boolean
+     * @param  string $option Name of the option.
+     * @return bool
      */
     public function __isset($option)
     {

+ 3 - 3
lib/Predis/Pipeline/PipelineContext.php

@@ -103,7 +103,7 @@ class PipelineContext implements BasicClientInterface, ExecutableContextInterfac
     /**
      * Flushes the buffer that holds the queued commands.
      *
-     * @param  Boolean         $send Specifies if the commands in the buffer should be sent to Redis.
+     * @param  bool            $send Specifies if the commands in the buffer should be sent to Redis.
      * @return PipelineContext
      */
     public function flushPipeline($send = true)
@@ -122,8 +122,8 @@ class PipelineContext implements BasicClientInterface, ExecutableContextInterfac
     /**
      * Marks the running status of the pipeline.
      *
-     * @param Boolean $bool True if the pipeline is running.
-     *                      False if the pipeline is not running.
+     * @param bool $bool True if the pipeline is running.
+     *                   False if the pipeline is not running.
      */
     private function setRunning($bool)
     {

+ 3 - 2
lib/Predis/Pipeline/StandardExecutor.php

@@ -77,8 +77,9 @@ class StandardExecutor implements PipelineExecutorInterface
     /**
      * Handles -ERR responses returned by Redis.
      *
-     * @param ConnectionInterface    $connection The connection that returned the error.
-     * @param ResponseErrorInterface $response   The error response instance.
+     * @param  ConnectionInterface    $connection The connection that returned the error.
+     * @param  ResponseErrorInterface $response   The error response instance.
+     * @return ResponseErrorInterface
      */
     protected function onResponseError(ConnectionInterface $connection, ResponseErrorInterface $response)
     {

+ 2 - 2
lib/Predis/Profile/ServerProfileInterface.php

@@ -32,8 +32,8 @@ interface ServerProfileInterface
     /**
      * Checks if the profile supports the specified command.
      *
-     * @param  string  $command Command ID.
-     * @return Boolean
+     * @param  string $command Command ID.
+     * @return bool
      */
     public function supportsCommand($command);
 

+ 5 - 5
lib/Predis/PubSub/AbstractPubSubContext.php

@@ -43,8 +43,8 @@ abstract class AbstractPubSubContext implements \Iterator
     /**
      * Checks if the specified flag is valid in the state of the context.
      *
-     * @param  int     $value Flag.
-     * @return Boolean
+     * @param  int  $value Flag.
+     * @return bool
      */
     protected function isFlagSet($value)
     {
@@ -98,8 +98,8 @@ abstract class AbstractPubSubContext implements \Iterator
      * Optionally, the context can be forcefully closed by dropping the
      * underlying connection.
      *
-     * @param  Boolean $force Forcefully close the context by closing the connection.
-     * @return Boolean Returns false if there are no pending messages.
+     * @param  bool $force Forcefully close the context by closing the connection.
+     * @return bool Returns false if there are no pending messages.
      */
     public function closeContext($force = false)
     {
@@ -177,7 +177,7 @@ abstract class AbstractPubSubContext implements \Iterator
     /**
      * Checks if the the context is still in a valid state to continue.
      *
-     * @return Boolean
+     * @return bool
      */
     public function valid()
     {

+ 3 - 3
lib/Predis/Replication/ReplicationStrategy.php

@@ -40,7 +40,7 @@ class ReplicationStrategy
      * against a key stored on Redis.
      *
      * @param  CommandInterface $command Instance of Redis command.
-     * @return Boolean
+     * @return bool
      */
     public function isReadOperation(CommandInterface $command)
     {
@@ -76,7 +76,7 @@ class ReplicationStrategy
      * replication context.
      *
      * @param  CommandInterface $command Instance of Redis command.
-     * @return Boolean
+     * @return bool
      */
     public function isDisallowedOperation(CommandInterface $command)
     {
@@ -88,7 +88,7 @@ class ReplicationStrategy
      * array of the specified commad instance.
      *
      * @param  CommandInterface $command Instance of Redis command.
-     * @return Boolean
+     * @return bool
      */
     protected function isSortReadOnly(CommandInterface $command)
     {

+ 2 - 2
lib/Predis/ResponseQueued.php

@@ -43,8 +43,8 @@ class ResponseQueued implements ResponseObjectInterface
     /**
      * Checks if the specified property is set.
      *
-     * @param  string  $property Name of the property.
-     * @return Boolean
+     * @param  string $property Name of the property.
+     * @return bool
      */
     public function __isset($property)
     {

+ 2 - 2
lib/Predis/Transaction/MultiExecContext.php

@@ -101,8 +101,8 @@ class MultiExecContext implements BasicClientInterface, ExecutableContextInterfa
     /**
      * Checks is a flag is set.
      *
-     * @param  int     $flags Flag
-     * @return Boolean
+     * @param  int  $flags Flag
+     * @return bool
      */
     protected function checkState($flags)
     {

+ 1 - 1
tests/PHPUnit/PredisCommandTestCase.php

@@ -69,7 +69,7 @@ abstract class PredisCommandTestCase extends PredisTestCase
     /**
      * Returns wether the command is prefixable or not.
      *
-     * @return Boolean
+     * @return bool
      */
     protected function isPrefixable()
     {

+ 1 - 1
tests/PHPUnit/PredisConnectionTestCase.php

@@ -325,7 +325,7 @@ abstract class PredisConnectionTestCase extends PredisTestCase
      * Returns a new instance of a connection instance.
      *
      * @param  ServerProfile    $profile    Reference to the server profile instance.
-     * @param  Boolean          $initialize Push default initialization commands (SELECT and FLUSHDB).
+     * @param  bool             $initialize Push default initialization commands (SELECT and FLUSHDB).
      * @param  array            $parameters Additional connection parameters.
      * @return StreamConnection
      */