Parcourir la source

Run php-cs against source code.

Daniele Alessandri il y a 10 ans
Parent
commit
0df05ae008

+ 4 - 3
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 = <<<EOS
 local hashes = {}
 for _, key in pairs(KEYS) do
@@ -38,7 +38,8 @@ end
 return hashes
 EOS;
 
-    public function getScript() {
+    public function getScript()
+    {
         return self::BODY;
     }
 }

+ 0 - 2
lib/Predis/Cluster/RedisClusterHashStrategy.php

@@ -13,8 +13,6 @@ namespace Predis\Cluster;
 
 use Predis\Cluster\Hash\CRC16HashGenerator;
 use Predis\Cluster\Hash\HashGeneratorInterface;
-use Predis\Command\CommandInterface;
-use Predis\Command\ScriptedCommand;
 
 /**
  * Default class used by Predis to calculate hashes out of keys of

+ 1 - 1
lib/Predis/Command/RawCommand.php

@@ -42,7 +42,7 @@ class RawCommand implements CommandInterface
     /**
      * Creates a new raw command using a variadic method.
      *
-     * @param string $commandID Redis command ID.
+     * @param  string           $commandID Redis command ID.
      * @param string ... Arguments list for the command.
      * @return CommandInterface
      */

+ 2 - 1
lib/Predis/Command/ServerInfo.php

@@ -48,7 +48,7 @@ class ServerInfo extends AbstractCommand
     /**
      * Parses single row of the reply buffer and returns the key-value pair.
      *
-     * @param string $row Single row of the reply buffer.
+     * @param  string $row Single row of the reply buffer.
      * @return array
      */
     public function parseRow($row)
@@ -62,6 +62,7 @@ class ServerInfo extends AbstractCommand
         } else {
             $v = $this->parseDatabaseStats($v);
         }
+
         return array($k, $v);
     }
 

+ 0 - 1
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;
 
 /**

+ 3 - 3
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)

+ 2 - 2
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.');

+ 1 - 1
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

+ 0 - 1
tests/Predis/Connection/ConnectionExceptionTest.php

@@ -14,7 +14,6 @@ namespace Predis\Connection;
 require_once __DIR__.'/../CommunicationExceptionTest.php';
 
 use Predis\CommunicationExceptionTest;
-use Predis\Connection\SingleConnectionInterface;
 
 /**
  *

+ 1 - 1
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

+ 1 - 1
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.');