Run php-cs against codebase.

This commit is contained in:
Daniele Alessandri
2013-12-17 12:53:36 +01:00
parent 5529e33047
commit 02e43143d3
77 changed files with 248 additions and 258 deletions
+24 -23
View File
@@ -48,7 +48,7 @@ class Client implements ClientInterface
/**
* @param mixed $parameters Connection parameters for one or more servers.
* @param mixed $options Options to configure some behaviours of the client.
* @param mixed $options Options to configure some behaviours of the client.
*/
public function __construct($parameters = null, $options = null)
{
@@ -62,7 +62,7 @@ class Client implements ClientInterface
* types of arguments or simply returns the passed argument if it is an
* instance of Predis\Configuration\OptionsInterface.
*
* @param mixed $options Client options.
* @param mixed $options Client options.
* @return OptionsInterface
*/
protected function createOptions($options)
@@ -91,7 +91,7 @@ class Client implements ClientInterface
* - String
* - Callable
*
* @param mixed $parameters Connection parameters or connection instance.
* @param mixed $parameters Connection parameters or connection instance.
* @return ConnectionInterface
*/
protected function createConnection($parameters)
@@ -141,7 +141,7 @@ class Client implements ClientInterface
* Wraps a callable to make sure that its returned value represents a valid
* connection type.
*
* @param mixed $callable
* @param mixed $callable
* @return mixed
*/
protected function getConnectionInitializerWrapper($callable)
@@ -240,7 +240,7 @@ 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.
* @param string $connectionID Index or alias of the single connection.
* @return SingleConnectionInterface
*/
public function getConnectionById($connectionID)
@@ -262,8 +262,8 @@ class Client implements ClientInterface
* It is possibile to indentify Redis error responses from normal responses
* using the second optional argument which is populated by reference.
*
* @param array $arguments Command arguments as defined by the command signature.
* @param bool $error Set to TRUE when Redis returned an error response.
* @param array $arguments Command arguments as defined by the command signature.
* @param bool $error Set to TRUE when Redis returned an error response.
* @return mixed
*/
public function executeRaw(array $arguments, &$error = null)
@@ -288,8 +288,8 @@ class Client implements ClientInterface
* Creates a Redis command with the specified arguments and sends a request
* to the server.
*
* @param string $commandID Command ID.
* @param array $arguments Arguments for the command.
* @param string $commandID Command ID.
* @param array $arguments Arguments for the command.
* @return mixed
*/
public function __call($commandID, $arguments)
@@ -329,8 +329,8 @@ class Client implements ClientInterface
/**
* Handles -ERR responses returned by Redis.
*
* @param CommandInterface $command Redis command that generated the error.
* @param ErrorResponseInterface $response Instance of the error response.
* @param CommandInterface $command Redis command that generated the error.
* @param ErrorResponseInterface $response Instance of the error response.
* @return mixed
*/
protected function onErrorResponse(
@@ -363,8 +363,8 @@ class Client implements ClientInterface
* simply an utility method to create Redis contexts instances since they
* follow a common initialization path.
*
* @param string $initializer Method name.
* @param array $argv Arguments for the method.
* @param string $initializer Method name.
* @param array $argv Arguments for the method.
* @return mixed
*/
private function sharedContextFactory($initializer, $argv = null)
@@ -380,6 +380,7 @@ class Client implements ClientInterface
case 2:
list($arg0, $arg1) = $argv;
return $this->$initializer($arg0, $arg1);
default:
@@ -391,7 +392,7 @@ class Client implements ClientInterface
* Creates a new pipeline context and returns it, or returns the results of
* a pipeline executed inside the optionally provided callable object.
*
* @param mixed $arg,... Options for the context, or a callable, or both.
* @param mixed $arg,... Options for the context, or a callable, or both.
* @return Pipeline|array
*/
public function pipeline(/* arguments */)
@@ -402,15 +403,15 @@ class Client implements ClientInterface
/**
* Actual pipeline context initializer method.
*
* @param array $options Options for the context.
* @param mixed $callable Optional callable used to execute the context.
* @param array $options Options for the context.
* @param mixed $callable Optional callable used to execute the context.
* @return Pipeline|array
*/
protected function createPipeline(array $options = null, $callable = null)
{
if (isset($options['atomic']) && $options['atomic']) {
$class = 'Predis\Pipeline\Atomic';
} else if (isset($options['fire-and-forget']) && $options['fire-and-forget']) {
} elseif (isset($options['fire-and-forget']) && $options['fire-and-forget']) {
$class = 'Predis\Pipeline\FireAndForget';
} else {
$class = 'Predis\Pipeline\Pipeline';
@@ -429,7 +430,7 @@ class Client implements ClientInterface
* Creates a new transaction context and returns it, or returns the results
* of a transaction executed inside the optionally provided callable object.
*
* @param mixed $arg,... Options for the context, or a callable, or both.
* @param mixed $arg,... Options for the context, or a callable, or both.
* @return TransactionMultiExec|array
*/
public function transaction(/* arguments */)
@@ -440,8 +441,8 @@ class Client implements ClientInterface
/**
* Actual transaction context initializer method.
*
* @param array $options Options for the context.
* @param mixed $callable Optional callable used to execute the context.
* @param array $options Options for the context.
* @param mixed $callable Optional callable used to execute the context.
* @return TransactionMultiExec|array
*/
protected function createTransaction(array $options = null, $callable = null)
@@ -459,7 +460,7 @@ class Client implements ClientInterface
* Creates a new publis/subscribe context and returns it, or starts its loop
* inside the optionally provided callable object.
*
* @param mixed $arg,... Options for the context, or a callable, or both.
* @param mixed $arg,... Options for the context, or a callable, or both.
* @return PubSubConsumer|NULL
*/
public function pubSubLoop(/* arguments */)
@@ -470,8 +471,8 @@ class Client implements ClientInterface
/**
* Actual publish/subscribe context initializer method.
*
* @param array $options Options for the context.
* @param mixed $callable Optional callable used to execute the context.
* @param array $options Options for the context.
* @param mixed $callable Optional callable used to execute the context.
* @return PubSubConsumer|NULL
*/
protected function createPubSub(array $options = null, $callable = null)