Browse Source

Apply code styling fixes.

There is actually no need for such indentations.
Daniele Alessandri 11 years ago
parent
commit
427309db69

+ 1 - 1
examples/SimpleDebuggableConnection.php

@@ -25,7 +25,7 @@ class SimpleDebuggableConnection extends StreamConnection {
     }
 
     private function storeDebug(CommandInterface $command, $direction) {
-        $firtsArg  = $command->getArgument(0);
+        $firtsArg = $command->getArgument(0);
         $timestamp = round(microtime(true) - $this->tstart, 4);
 
         $debug  = $command->getId();

+ 3 - 3
lib/Predis/Client.php

@@ -49,9 +49,9 @@ class Client implements ClientInterface
      */
     public function __construct($parameters = null, $options = null)
     {
-        $this->options    = $this->createOptions($options ?: array());
+        $this->options = $this->createOptions($options ?: array());
         $this->connection = $this->createConnection($parameters ?: array());
-        $this->profile    = $this->options->profile;
+        $this->profile = $this->options->profile;
     }
 
     /**
@@ -289,7 +289,7 @@ class Client implements ClientInterface
      */
     public function __call($commandID, $arguments)
     {
-        $command  = $this->createCommand($commandID, $arguments);
+        $command = $this->createCommand($commandID, $arguments);
         $response = $this->executeCommand($command);
 
         return $response;

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

@@ -207,7 +207,7 @@ class HashRing implements DistributorInterface, HashGeneratorInterface
 
         while ($lower <= $upper) {
             $index = ($lower + $upper) >> 1;
-            $item  = $ringKeys[$index];
+            $item = $ringKeys[$index];
 
             if ($item > $key) {
                 $upper = $index - 1;

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

@@ -62,7 +62,7 @@ class ComposableStreamConnection extends StreamConnection implements ComposableC
             throw new \InvalidArgumentException('Length parameter must be greater than 0');
         }
 
-        $value  = '';
+        $value = '';
         $socket = $this->getResource();
 
         do {
@@ -83,7 +83,7 @@ class ComposableStreamConnection extends StreamConnection implements ComposableC
      */
     public function readLine()
     {
-        $value  = '';
+        $value = '';
         $socket = $this->getResource();
 
         do {

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

@@ -155,7 +155,7 @@ class PhpiredisConnection extends AbstractConnection
      */
     private function emitSocketError()
     {
-        $errno  = socket_last_error();
+        $errno = socket_last_error();
         $errstr = socket_strerror($errno);
 
         $this->disconnect();

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

@@ -176,13 +176,13 @@ class StreamConnection extends AbstractConnection
     public function read()
     {
         $socket = $this->getResource();
-        $chunk  = fgets($socket);
+        $chunk = fgets($socket);
 
         if ($chunk === false || $chunk === '') {
             $this->onConnectionError('Error while reading line from the server');
         }
 
-        $prefix  = $chunk[0];
+        $prefix = $chunk[0];
         $payload = substr($chunk, 1, -2);
 
         switch ($prefix) {

+ 1 - 1
lib/Predis/Pipeline/Atomic.php

@@ -94,7 +94,7 @@ class Atomic extends Pipeline
             );
         }
 
-        $responses  = array();
+        $responses = array();
         $sizeOfPipe = count($commands);
         $exceptions = $this->throwServerExceptions();
 

+ 1 - 1
lib/Predis/Pipeline/ConnectionErrorProof.php

@@ -86,7 +86,7 @@ class ConnectionErrorProof extends Pipeline
      */
     public function executeCluster(ClusterConnectionInterface $connection, SplQueue $commands)
     {
-        $responses  = array();
+        $responses = array();
         $sizeOfPipe = count($commands);
         $exceptions = array();
 

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

@@ -125,11 +125,11 @@ class Pipeline implements BasicClientInterface, ExecutableContextInterface
             $connection->writeRequest($command);
         }
 
-        $responses  = array();
+        $responses = array();
         $exceptions = $this->throwServerExceptions();
 
         while (!$commands->isEmpty()) {
-            $command  = $commands->dequeue();
+            $command = $commands->dequeue();
             $response = $connection->readResponse($command);
 
             if (!$response instanceof Response\ResponseInterface) {