From 427309db69d310c61e6d55971fb7d5a67620e261 Mon Sep 17 00:00:00 2001 From: Daniele Alessandri Date: Sat, 7 Dec 2013 15:41:18 +0100 Subject: [PATCH] Apply code styling fixes. There is actually no need for such indentations. --- examples/SimpleDebuggableConnection.php | 2 +- lib/Predis/Client.php | 6 +++--- lib/Predis/Cluster/Distributor/HashRing.php | 2 +- lib/Predis/Connection/ComposableStreamConnection.php | 4 ++-- lib/Predis/Connection/PhpiredisConnection.php | 2 +- lib/Predis/Connection/StreamConnection.php | 4 ++-- lib/Predis/Pipeline/Atomic.php | 2 +- lib/Predis/Pipeline/ConnectionErrorProof.php | 2 +- lib/Predis/Pipeline/Pipeline.php | 4 ++-- 9 files changed, 14 insertions(+), 14 deletions(-) diff --git a/examples/SimpleDebuggableConnection.php b/examples/SimpleDebuggableConnection.php index 86c6e379..641ac201 100644 --- a/examples/SimpleDebuggableConnection.php +++ b/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(); diff --git a/lib/Predis/Client.php b/lib/Predis/Client.php index 7b0ddc2b..b0b2e0cc 100644 --- a/lib/Predis/Client.php +++ b/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; diff --git a/lib/Predis/Cluster/Distributor/HashRing.php b/lib/Predis/Cluster/Distributor/HashRing.php index 00434e24..c946d73d 100644 --- a/lib/Predis/Cluster/Distributor/HashRing.php +++ b/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; diff --git a/lib/Predis/Connection/ComposableStreamConnection.php b/lib/Predis/Connection/ComposableStreamConnection.php index 1bbcaada..7903c93f 100644 --- a/lib/Predis/Connection/ComposableStreamConnection.php +++ b/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 { diff --git a/lib/Predis/Connection/PhpiredisConnection.php b/lib/Predis/Connection/PhpiredisConnection.php index 41758267..91710264 100644 --- a/lib/Predis/Connection/PhpiredisConnection.php +++ b/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(); diff --git a/lib/Predis/Connection/StreamConnection.php b/lib/Predis/Connection/StreamConnection.php index ddab47a9..f3a581df 100644 --- a/lib/Predis/Connection/StreamConnection.php +++ b/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) { diff --git a/lib/Predis/Pipeline/Atomic.php b/lib/Predis/Pipeline/Atomic.php index 5b56c1b4..4dea47b4 100644 --- a/lib/Predis/Pipeline/Atomic.php +++ b/lib/Predis/Pipeline/Atomic.php @@ -94,7 +94,7 @@ class Atomic extends Pipeline ); } - $responses = array(); + $responses = array(); $sizeOfPipe = count($commands); $exceptions = $this->throwServerExceptions(); diff --git a/lib/Predis/Pipeline/ConnectionErrorProof.php b/lib/Predis/Pipeline/ConnectionErrorProof.php index f593d91b..e37584f8 100644 --- a/lib/Predis/Pipeline/ConnectionErrorProof.php +++ b/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(); diff --git a/lib/Predis/Pipeline/Pipeline.php b/lib/Predis/Pipeline/Pipeline.php index e9f50696..bab7b3f5 100644 --- a/lib/Predis/Pipeline/Pipeline.php +++ b/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) {