diff --git a/examples/MasterSlaveReplicationComplex.php b/examples/MasterSlaveReplicationComplex.php index 786d595c..1367d4ed 100644 --- a/examples/MasterSlaveReplicationComplex.php +++ b/examples/MasterSlaveReplicationComplex.php @@ -20,7 +20,6 @@ require 'SharedConfigurations.php'; use Predis\Command\ScriptedCommand; use Predis\Connection\MasterSlaveReplication; -use Predis\Profile\ServerProfile; use Predis\Replication\ReplicationStrategy; // ------------------------------------------------------------------------- // @@ -28,7 +27,8 @@ use Predis\Replication\ReplicationStrategy; // Define a new scripted command that returns all the fields // of a variable number of hashes with a single roundtrip. -class HashMultipleGetAll extends ScriptedCommand { +class HashMultipleGetAll extends ScriptedCommand +{ const BODY = <<parseDatabaseStats($v); } + return array($k, $v); } diff --git a/lib/Predis/Connection/WebdisConnection.php b/lib/Predis/Connection/WebdisConnection.php index b8972686..9b2c85c6 100644 --- a/lib/Predis/Connection/WebdisConnection.php +++ b/lib/Predis/Connection/WebdisConnection.php @@ -14,7 +14,6 @@ namespace Predis\Connection; use Predis\NotSupportedException; use Predis\ResponseError; use Predis\Command\CommandInterface; -use Predis\Connection\ConnectionException; use Predis\Protocol\ProtocolException; /** diff --git a/lib/Predis/Pipeline/PipelineContext.php b/lib/Predis/Pipeline/PipelineContext.php index ce14a0ce..54121544 100644 --- a/lib/Predis/Pipeline/PipelineContext.php +++ b/lib/Predis/Pipeline/PipelineContext.php @@ -65,8 +65,8 @@ class PipelineContext implements BasicClientInterface, ExecutableContextInterfac /** * Queues a command into the pipeline buffer. * - * @param string $method Command ID. - * @param array $arguments Arguments for the command. + * @param string $method Command ID. + * @param array $arguments Arguments for the command. * @return $this */ public function __call($method, $arguments) @@ -90,7 +90,7 @@ class PipelineContext implements BasicClientInterface, ExecutableContextInterfac /** * Queues a command instance into the pipeline buffer. * - * @param CommandInterface $command Command to queue in the buffer. + * @param CommandInterface $command Command to queue in the buffer. * @return $this */ public function executeCommand(CommandInterface $command) diff --git a/lib/Predis/Transaction/MultiExecContext.php b/lib/Predis/Transaction/MultiExecContext.php index 871ce4bd..80b24fe8 100644 --- a/lib/Predis/Transaction/MultiExecContext.php +++ b/lib/Predis/Transaction/MultiExecContext.php @@ -200,7 +200,7 @@ class MultiExecContext implements BasicClientInterface, ExecutableContextInterfa /** * Executes the specified Redis command. * - * @param CommandInterface $command Command instance. + * @param CommandInterface $command Command instance. * @return $this|mixed */ public function executeCommand(CommandInterface $command) @@ -215,7 +215,7 @@ class MultiExecContext implements BasicClientInterface, ExecutableContextInterfa if ($response instanceof ResponseQueued) { $this->commands->enqueue($command); - } else if ($response instanceof ResponseErrorInterface) { + } elseif ($response instanceof ResponseErrorInterface) { throw new AbortedMultiExecException($this, $response->getMessage()); } else { $this->onProtocolError('The server did not return a +QUEUED status response.'); diff --git a/tests/Predis/Collection/Iterator/SortedSetKeyTest.php b/tests/Predis/Collection/Iterator/SortedSetKeyTest.php index 955a6997..2f7cf820 100644 --- a/tests/Predis/Collection/Iterator/SortedSetKeyTest.php +++ b/tests/Predis/Collection/Iterator/SortedSetKeyTest.php @@ -18,7 +18,7 @@ use Predis\Profile\ServerProfile; /** * @group realm-iterators */ -class SortedSetTest extends PredisTestCase +class SortedSetKeyTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/Predis/Connection/ConnectionExceptionTest.php b/tests/Predis/Connection/ConnectionExceptionTest.php index 71cb4b6f..1a879ded 100644 --- a/tests/Predis/Connection/ConnectionExceptionTest.php +++ b/tests/Predis/Connection/ConnectionExceptionTest.php @@ -14,7 +14,6 @@ namespace Predis\Connection; require_once __DIR__.'/../CommunicationExceptionTest.php'; use Predis\CommunicationExceptionTest; -use Predis\Connection\SingleConnectionInterface; /** * diff --git a/tests/Predis/Connection/ConnectionParametersTest.php b/tests/Predis/Connection/ConnectionParametersTest.php index d31b32ad..b7675982 100644 --- a/tests/Predis/Connection/ConnectionParametersTest.php +++ b/tests/Predis/Connection/ConnectionParametersTest.php @@ -16,7 +16,7 @@ use PredisTestCase; * @todo ConnectionParameters::define(); * @todo ConnectionParameters::undefine(); */ -class ParametersTest extends PredisTestCase +class ConnectionParametersTest extends PredisTestCase { /** * @group disconnected diff --git a/tests/bootstrap.php b/tests/bootstrap.php index e55c9065..4ff9aca7 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -11,7 +11,7 @@ if (file_exists(__DIR__.'/../autoload.php')) { require __DIR__.'/../autoload.php'; -} else if (@include('Predis/Autoloader.php')) { +} elseif (@include('Predis/Autoloader.php')) { Predis\Autoloader::register(); } else { die('ERROR: Unable to find a suitable mean to register Predis\Autoloader.');