mirror of
https://github.com/predis/predis.git
synced 2026-09-05 07:16:44 +00:00
Apply code styling fixes.
There is actually no need for such indentations.
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -94,7 +94,7 @@ class Atomic extends Pipeline
|
||||
);
|
||||
}
|
||||
|
||||
$responses = array();
|
||||
$responses = array();
|
||||
$sizeOfPipe = count($commands);
|
||||
$exceptions = $this->throwServerExceptions();
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ class ConnectionErrorProof extends Pipeline
|
||||
*/
|
||||
public function executeCluster(ClusterConnectionInterface $connection, SplQueue $commands)
|
||||
{
|
||||
$responses = array();
|
||||
$responses = array();
|
||||
$sizeOfPipe = count($commands);
|
||||
$exceptions = array();
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user