瀏覽代碼

Run php-cs-fixer.

Daniele Alessandri 8 年之前
父節點
當前提交
5b3a5bbef9

+ 0 - 2
examples/replication_sentinel.php

@@ -18,8 +18,6 @@ require __DIR__.'/shared.php';
 // updated configuration to clients thus avoiding static configurations for the
 // replication servers and their roles.
 
-use Predis\Connection\Aggregate\SentinelReplication;
-
 // Instead of connection parameters pointing to redis nodes, we provide a list
 // of instances of redis-sentinel. Users should always provide a timeout value
 // low enough to not hinder operations just in case a sentinel is unreachable

+ 2 - 2
src/Configuration/Options.php

@@ -70,10 +70,10 @@ class Options implements OptionsInterface
      */
     public function defined($option)
     {
-        return (
+        return
             array_key_exists($option, $this->options) ||
             array_key_exists($option, $this->input)
-        );
+        ;
     }
 
     /**

+ 1 - 1
src/Configuration/ReplicationOption.php

@@ -12,8 +12,8 @@
 namespace Predis\Configuration;
 
 use Predis\Connection\Aggregate\MasterSlaveReplication;
-use Predis\Connection\Aggregate\SentinelReplication;
 use Predis\Connection\Aggregate\ReplicationInterface;
+use Predis\Connection\Aggregate\SentinelReplication;
 
 /**
  * Configures an aggregate connection used for master/slave replication among

+ 1 - 1
src/Connection/Aggregate/SentinelReplication.php

@@ -11,9 +11,9 @@
 
 namespace Predis\Connection\Aggregate;
 
-use Predis\CommunicationException;
 use Predis\Command\CommandInterface;
 use Predis\Command\RawCommand;
+use Predis\CommunicationException;
 use Predis\Connection\ConnectionException;
 use Predis\Connection\FactoryInterface as ConnectionFactoryInterface;
 use Predis\Connection\NodeConnectionInterface;

+ 2 - 2
src/Monitor/Consumer.php

@@ -99,7 +99,7 @@ class Consumer implements \Iterator
     /**
      * Returns the last message payload retrieved from the server.
      *
-     * @return Object
+     * @return object
      */
     public function current()
     {
@@ -136,7 +136,7 @@ class Consumer implements \Iterator
      * Waits for a new message from the server generated by MONITOR and returns
      * it when available.
      *
-     * @return Object
+     * @return object
      */
     private function getValue()
     {

+ 1 - 1
src/PubSub/DispatcherLoop.php

@@ -91,7 +91,7 @@ class DispatcherLoop
      * Binds a callback to a channel.
      *
      * @param string   $channel  Channel name.
-     * @param Callable $callback A callback.
+     * @param callable $callback A callback.
      */
     public function attachCallback($channel, $callback)
     {

+ 1 - 1
tests/Predis/Collection/Iterator/HashKeyTest.php

@@ -72,7 +72,7 @@ class HashKeyTest extends PredisTestCase
                ->method('hscan')
                ->with('key:hash', 0, array())
                ->will($this->returnValue(array(0, array(
-                    1 => 'a', 2 => 'b', 3 => 100, 'foo' => 'bar'
+                    1 => 'a', 2 => 'b', 3 => 100, 'foo' => 'bar',
                ))));
 
         $iterator = new HashKey($client, 'key:hash');

+ 3 - 3
tests/Predis/Command/ServerClientTest.php

@@ -114,9 +114,9 @@ addr=127.0.0.1:45395 fd=8 idle=0 flags=N db=0 sub=0 psub=0
 BUFFER;
 
         $parsed = array(
-            array('addr' => '127.0.0.1:45393','fd' => '6','idle' => '0','flags' => 'N','db' => '0','sub' => '0','psub' => '0'),
-            array('addr' => '127.0.0.1:45394','fd' => '7','idle' => '0','flags' => 'N','db' => '0','sub' => '0','psub' => '0'),
-            array('addr' => '127.0.0.1:45395','fd' => '8','idle' => '0','flags' => 'N','db' => '0','sub' => '0','psub' => '0'),
+            array('addr' => '127.0.0.1:45393', 'fd' => '6', 'idle' => '0', 'flags' => 'N', 'db' => '0', 'sub' => '0', 'psub' => '0'),
+            array('addr' => '127.0.0.1:45394', 'fd' => '7', 'idle' => '0', 'flags' => 'N', 'db' => '0', 'sub' => '0', 'psub' => '0'),
+            array('addr' => '127.0.0.1:45395', 'fd' => '8', 'idle' => '0', 'flags' => 'N', 'db' => '0', 'sub' => '0', 'psub' => '0'),
         );
 
         $this->assertSame($parsed, $command->parseResponse($raw));

+ 1 - 1
tests/Predis/Command/ServerConfigTest.php

@@ -52,7 +52,7 @@ class ServerConfigTest extends PredisCommandTestCase
      */
     public function testParseResponseOfConfigGet()
     {
-        $raw = array('slowlog-log-slower-than','10000','slowlog-max-len','64','loglevel','verbose');
+        $raw = array('slowlog-log-slower-than', '10000', 'slowlog-max-len', '64', 'loglevel', 'verbose');
         $expected = array(
             'slowlog-log-slower-than' => '10000',
             'slowlog-max-len' => '64',

+ 1 - 1
tests/Predis/Command/ServerInfoTest.php

@@ -267,7 +267,7 @@ BUFFER;
             'used_cpu_user_children' => '0.00',
             'cluster_enabled' => '0',
             'db0' => array('keys' => '2', 'expires' => '0'),
-            'db5' => array('keys' => '1','expires' => '0'),
+            'db5' => array('keys' => '1', 'expires' => '0'),
         );
 
         $this->assertSame($expected, $this->getCommand()->parseResponse($raw));

+ 0 - 1
tests/Predis/Configuration/ReplicationOptionTest.php

@@ -78,7 +78,6 @@ class ReplicationOptionTest extends PredisTestCase
         $reflection->setAccessible(true);
 
         $this->assertTrue($reflection->getValue($replication));
-
     }
 
     /**

+ 14 - 15
tests/Predis/Connection/Aggregate/MasterSlaveReplicationTest.php

@@ -11,8 +11,8 @@
 
 namespace Predis\Connection\Aggregate;
 
-use Predis\Connection;
 use Predis\Command;
+use Predis\Connection;
 use Predis\Profile;
 use Predis\Replication\ReplicationStrategy;
 use Predis\Response;
@@ -291,6 +291,7 @@ class MasterSlaveReplicationTest extends PredisTestCase
 
     /**
      * @group disconnected
+     *
      * @todo We should find a way to test that the slave is indeed randomly selected.
      */
     public function testCanSwitchToRandomSlave()
@@ -880,7 +881,7 @@ class MasterSlaveReplicationTest extends PredisTestCase
         $master->expects($this->once())
                ->method('executeCommand')
                ->with($cmdInfo)
-               ->will($this->returnValue("
+               ->will($this->returnValue('
 # Replication
 role:master
 connected_slaves:2
@@ -891,7 +892,7 @@ repl_backlog_active:1
 repl_backlog_size:1048576
 repl_backlog_first_byte_offset:2
 repl_backlog_histlen:12978
-"));
+'));
 
         $replication = new MasterSlaveReplication();
         $replication->setConnectionFactory($connFactory);
@@ -936,7 +937,7 @@ repl_backlog_histlen:12978
         $slave1->expects($this->once())
                ->method('executeCommand')
                ->with($cmdInfo)
-               ->will($this->returnValue("
+               ->will($this->returnValue('
 # Replication
 role:slave
 master_host:127.0.0.1
@@ -953,12 +954,12 @@ repl_backlog_active:0
 repl_backlog_size:1048576
 repl_backlog_first_byte_offset:0
 repl_backlog_histlen:0
-"));
+'));
 
         $master->expects($this->once())
                ->method('executeCommand')
                ->with($cmdInfo)
-               ->will($this->returnValue("
+               ->will($this->returnValue('
 # Replication
 role:master
 connected_slaves:2
@@ -969,7 +970,7 @@ repl_backlog_active:1
 repl_backlog_size:1048576
 repl_backlog_first_byte_offset:2
 repl_backlog_histlen:12978
-"));
+'));
 
         $replication = new MasterSlaveReplication();
         $replication->setConnectionFactory($connFactory);
@@ -1012,7 +1013,6 @@ repl_backlog_histlen:12978
                     ->with(array('host' => '127.0.0.1', 'port' => '6383'))
                     ->will($this->returnValue($slave2));
 
-
         $masterKO->expects($this->once())
                ->method('executeCommand')
                ->with($cmdInfo)
@@ -1021,7 +1021,7 @@ repl_backlog_histlen:12978
         $slave1->expects($this->once())
                ->method('executeCommand')
                ->with($cmdInfo)
-               ->will($this->returnValue("
+               ->will($this->returnValue('
 # Replication
 role:slave
 master_host:127.0.0.1
@@ -1038,12 +1038,12 @@ repl_backlog_active:0
 repl_backlog_size:1048576
 repl_backlog_first_byte_offset:0
 repl_backlog_histlen:0
-"));
+'));
 
         $master->expects($this->once())
                ->method('executeCommand')
                ->with($cmdInfo)
-               ->will($this->returnValue("
+               ->will($this->returnValue('
 # Replication
 role:master
 connected_slaves:2
@@ -1054,7 +1054,7 @@ repl_backlog_active:1
 repl_backlog_size:1048576
 repl_backlog_first_byte_offset:2
 repl_backlog_histlen:12978
-"));
+'));
 
         $replication = new MasterSlaveReplication();
         $replication->setConnectionFactory($connFactory);
@@ -1105,7 +1105,6 @@ repl_backlog_histlen:12978
                     ->with(array('host' => '127.0.0.1', 'port' => '6382'))
                     ->will($this->returnValue($slave1));
 
-
         $slaveKO->expects($this->once())
                 ->method('executeCommand')
                 ->with($cmdExists)
@@ -1119,7 +1118,7 @@ repl_backlog_histlen:12978
         $master->expects($this->once())
                ->method('executeCommand')
                ->with($cmdInfo)
-               ->will($this->returnValue("
+               ->will($this->returnValue('
 # Replication
 role:master
 connected_slaves:2
@@ -1129,7 +1128,7 @@ repl_backlog_active:1
 repl_backlog_size:1048576
 repl_backlog_first_byte_offset:2
 repl_backlog_histlen:12978
-"));
+'));
 
         $replication = new MasterSlaveReplication();
         $replication->setConnectionFactory($connFactory);

+ 5 - 5
tests/Predis/Connection/Aggregate/RedisClusterTest.php

@@ -507,7 +507,7 @@ class RedisClusterTest extends PredisTestCase
                         'GET', array('node:1001')
                     ))
                     ->will($this->throwException(
-                        new Connection\ConnectionException($connection1, "Unknown connection error [127.0.0.1:6382]")
+                        new Connection\ConnectionException($connection1, 'Unknown connection error [127.0.0.1:6382]')
                     ));
 
         $connection2 = $this->getMockConnection('tcp://127.0.0.1:6382');
@@ -786,11 +786,11 @@ class RedisClusterTest extends PredisTestCase
     {
         $response = array(
             array(12288, 13311, array('10.1.0.51', 6387), array('10.1.0.52', 6387)),
-            array(3072 ,  4095, array('10.1.0.52', 6392), array('10.1.0.51', 6392)),
-            array(6144 ,  7167, array('', 6384), array('10.1.0.52', 6384)),
+            array(3072,  4095, array('10.1.0.52', 6392), array('10.1.0.51', 6392)),
+            array(6144,  7167, array('', 6384), array('10.1.0.52', 6384)),
             array(14336, 15359, array('10.1.0.51', 6388), array('10.1.0.52', 6388)),
             array(15360, 16383, array('10.1.0.52', 6398), array('10.1.0.51', 6398)),
-            array(1024 ,  2047, array('10.1.0.52', 6391), array('10.1.0.51', 6391)),
+            array(1024,  2047, array('10.1.0.52', 6391), array('10.1.0.51', 6391)),
             array(11264, 12287, array('10.1.0.52', 6396), array('10.1.0.51', 6396)),
             array(5120,  6143, array('10.1.0.52', 6393), array('10.1.0.51', 6393)),
             array(0,  1023, array('10.1.0.51', 6381), array('10.1.0.52', 6381)),
@@ -829,7 +829,7 @@ class RedisClusterTest extends PredisTestCase
         $cmdGET = Command\RawCommand::create('GET', 'node:1001');
         $rspMOVED = new Response\Error('MOVED 1970 127.0.0.1:6380');
         $rspSlotsArray = array(
-            array(0   ,  8191, array('127.0.0.1', 6379)),
+            array(0,  8191, array('127.0.0.1', 6379)),
             array(8192, 16383, array('127.0.0.1', 6380)),
         );
 

+ 76 - 76
tests/Predis/Connection/Aggregate/SentinelReplicationTest.php

@@ -111,18 +111,18 @@ class SentinelReplicationTest extends PredisTestCase
                   ->will($this->returnValue(
                       array(
                           array(
-                              "name", "127.0.0.1:5382",
-                              "ip", "127.0.0.1",
-                              "port", "5382",
-                              "runid", "a113aa7a0d4870a85bb22b4b605fd26eb93ed40e",
-                              "flags", "sentinel",
+                              'name', '127.0.0.1:5382',
+                              'ip', '127.0.0.1',
+                              'port', '5382',
+                              'runid', 'a113aa7a0d4870a85bb22b4b605fd26eb93ed40e',
+                              'flags', 'sentinel',
                           ),
                           array(
-                              "name", "127.0.0.1:5383",
-                              "ip", "127.0.0.1",
-                              "port", "5383",
-                              "runid", "f53b52d281be5cdd4873700c94846af8dbe47209",
-                              "flags", "sentinel",
+                              'name', '127.0.0.1:5383',
+                              'ip', '127.0.0.1',
+                              'port', '5383',
+                              'runid', 'f53b52d281be5cdd4873700c94846af8dbe47209',
+                              'flags', 'sentinel',
                           ),
                       )
                   ));
@@ -157,7 +157,7 @@ class SentinelReplicationTest extends PredisTestCase
                       'SENTINEL', array('sentinels', 'svc')
                   ))
                   ->will($this->throwException(
-                     new Connection\ConnectionException($sentinel1, "Unknown connection error [127.0.0.1:5381]")
+                     new Connection\ConnectionException($sentinel1, 'Unknown connection error [127.0.0.1:5381]')
                   ));
 
         $sentinel2 = $this->getMockSentinelConnection('tcp://127.0.0.1:5382?alias=sentinel2');
@@ -169,11 +169,11 @@ class SentinelReplicationTest extends PredisTestCase
                   ->will($this->returnValue(
                       array(
                           array(
-                              "name", "127.0.0.1:5383",
-                              "ip", "127.0.0.1",
-                              "port", "5383",
-                              "runid", "f53b52d281be5cdd4873700c94846af8dbe47209",
-                              "flags", "sentinel",
+                              'name', '127.0.0.1:5383',
+                              'ip', '127.0.0.1',
+                              'port', '5383',
+                              'runid', 'f53b52d281be5cdd4873700c94846af8dbe47209',
+                              'flags', 'sentinel',
                           ),
                       )
                   ));
@@ -209,7 +209,7 @@ class SentinelReplicationTest extends PredisTestCase
                       'SENTINEL', array('sentinels', 'svc')
                   ))
                   ->will($this->throwException(
-                     new Connection\ConnectionException($sentinel1, "Unknown connection error [127.0.0.1:5381]")
+                     new Connection\ConnectionException($sentinel1, 'Unknown connection error [127.0.0.1:5381]')
                   ));
 
         $replication = $this->getReplicationConnection('svc', array($sentinel1));
@@ -234,11 +234,11 @@ class SentinelReplicationTest extends PredisTestCase
                       // SENTINEL sentinels svc
                       array(
                           array(
-                              "name", "127.0.0.1:5382",
-                              "ip", "127.0.0.1",
-                              "port", "5382",
-                              "runid", "a113aa7a0d4870a85bb22b4b605fd26eb93ed40e",
-                              "flags", "sentinel",
+                              'name', '127.0.0.1:5382',
+                              'ip', '127.0.0.1',
+                              'port', '5382',
+                              'runid', 'a113aa7a0d4870a85bb22b4b605fd26eb93ed40e',
+                              'flags', 'sentinel',
                           ),
                       ),
 
@@ -248,22 +248,22 @@ class SentinelReplicationTest extends PredisTestCase
                       // SENTINEL slaves svc
                       array(
                           array(
-                              "name", "127.0.0.1:6382",
-                              "ip", "127.0.0.1",
-                              "port", "6382",
-                              "runid", "112cdebd22924a7d962be496f3a1c4c7c9bad93f",
-                              "flags", "slave",
-                              "master-host", "127.0.0.1",
-                              "master-port", "6381"
+                              'name', '127.0.0.1:6382',
+                              'ip', '127.0.0.1',
+                              'port', '6382',
+                              'runid', '112cdebd22924a7d962be496f3a1c4c7c9bad93f',
+                              'flags', 'slave',
+                              'master-host', '127.0.0.1',
+                              'master-port', '6381',
                           ),
                           array(
-                              "name", "127.0.0.1:6383",
-                              "ip", "127.0.0.1",
-                              "port", "6383",
-                              "runid", "1c0bf1291797fbc5608c07a17da394147dc62817",
-                              "flags", "slave",
-                              "master-host", "127.0.0.1",
-                              "master-port", "6381"
+                              'name', '127.0.0.1:6383',
+                              'ip', '127.0.0.1',
+                              'port', '6383',
+                              'runid', '1c0bf1291797fbc5608c07a17da394147dc62817',
+                              'flags', 'slave',
+                              'master-host', '127.0.0.1',
+                              'master-port', '6381',
                           ),
                       )
                   ));
@@ -333,7 +333,7 @@ class SentinelReplicationTest extends PredisTestCase
                       'SENTINEL', array('get-master-addr-by-name', 'svc')
                   ))
                   ->will($this->throwException(
-                      new Connection\ConnectionException($sentinel1, "Unknown connection error [127.0.0.1:5381]")
+                      new Connection\ConnectionException($sentinel1, 'Unknown connection error [127.0.0.1:5381]')
                   ));
 
         $replication = $this->getReplicationConnection('svc', array($sentinel1));
@@ -355,22 +355,22 @@ class SentinelReplicationTest extends PredisTestCase
                   ->will($this->returnValue(
                       array(
                           array(
-                              "name", "127.0.0.1:6382",
-                              "ip", "127.0.0.1",
-                              "port", "6382",
-                              "runid", "112cdebd22924a7d962be496f3a1c4c7c9bad93f",
-                              "flags", "slave",
-                              "master-host", "127.0.0.1",
-                              "master-port", "6381"
+                              'name', '127.0.0.1:6382',
+                              'ip', '127.0.0.1',
+                              'port', '6382',
+                              'runid', '112cdebd22924a7d962be496f3a1c4c7c9bad93f',
+                              'flags', 'slave',
+                              'master-host', '127.0.0.1',
+                              'master-port', '6381',
                           ),
                           array(
-                              "name", "127.0.0.1:6383",
-                              "ip", "127.0.0.1",
-                              "port", "6383",
-                              "runid", "1c0bf1291797fbc5608c07a17da394147dc62817",
-                              "flags", "slave",
-                              "master-host", "127.0.0.1",
-                              "master-port", "6381"
+                              'name', '127.0.0.1:6383',
+                              'ip', '127.0.0.1',
+                              'port', '6383',
+                              'runid', '1c0bf1291797fbc5608c07a17da394147dc62817',
+                              'flags', 'slave',
+                              'master-host', '127.0.0.1',
+                              'master-port', '6381',
                           ),
                       )
                   ));
@@ -397,7 +397,7 @@ class SentinelReplicationTest extends PredisTestCase
                       'SENTINEL', array('slaves', 'svc')
                   ))
                   ->will($this->throwException(
-                      new Connection\ConnectionException($sentinel1, "Unknown connection error [127.0.0.1:5381]")
+                      new Connection\ConnectionException($sentinel1, 'Unknown connection error [127.0.0.1:5381]')
                   ));
 
         $replication = $this->getReplicationConnection('svc', array($sentinel1));
@@ -453,13 +453,13 @@ class SentinelReplicationTest extends PredisTestCase
                   ->will($this->returnValue(
                       array(
                           array(
-                              "name", "127.0.0.1:6382",
-                              "ip", "127.0.0.1",
-                              "port", "6382",
-                              "runid", "112cdebd22924a7d962be496f3a1c4c7c9bad93f",
-                              "flags", "slave",
-                              "master-host", "127.0.0.1",
-                              "master-port", "6381",
+                              'name', '127.0.0.1:6382',
+                              'ip', '127.0.0.1',
+                              'port', '6382',
+                              'runid', '112cdebd22924a7d962be496f3a1c4c7c9bad93f',
+                              'flags', 'slave',
+                              'master-host', '127.0.0.1',
+                              'master-port', '6381',
                           ),
                       )
                   ));
@@ -667,7 +667,7 @@ class SentinelReplicationTest extends PredisTestCase
                ->method('executeCommand')
                ->with($this->isRedisCommand('ROLE'))
                ->will($this->returnValue(array(
-                   "master", 3129659, array( array("127.0.0.1", 6382, 3129242) ),
+                   'master', 3129659, array(array('127.0.0.1', 6382, 3129242)),
                )));
 
         $slave1 = $this->getMockConnection('tcp://127.0.0.1:6382?alias=slave1');
@@ -704,7 +704,7 @@ class SentinelReplicationTest extends PredisTestCase
                ->method('executeCommand')
                ->with($this->isRedisCommand('ROLE'))
                ->will($this->returnValue(array(
-                  "slave", "127.0.0.1", 9000, "connected", 3167038
+                  'slave', '127.0.0.1', 9000, 'connected', 3167038,
                )));
 
         $replication = $this->getReplicationConnection('svc', array($sentinel1));
@@ -736,7 +736,7 @@ class SentinelReplicationTest extends PredisTestCase
                ->method('executeCommand')
                ->with($this->isRedisCommand('ROLE'))
                ->will($this->returnValue(array(
-                   "master", 3129659, array( array("127.0.0.1", 6382, 3129242) ),
+                   'master', 3129659, array(array('127.0.0.1', 6382, 3129242)),
                )));
 
         $slave1 = $this->getMockConnection('tcp://127.0.0.1:6382?alias=slave1');
@@ -747,7 +747,7 @@ class SentinelReplicationTest extends PredisTestCase
                ->method('executeCommand')
                ->with($this->isRedisCommand('ROLE'))
                ->will($this->returnValue(array(
-                  "slave", "127.0.0.1", 9000, "connected", 3167038
+                  'slave', '127.0.0.1', 9000, 'connected', 3167038,
                )));
 
         $replication = $this->getReplicationConnection('svc', array($sentinel1));
@@ -785,7 +785,7 @@ class SentinelReplicationTest extends PredisTestCase
                ->method('executeCommand')
                ->with($this->isRedisCommand('ROLE'))
                ->will($this->returnValue(array(
-                   "slave", "127.0.0.1", 9000, "connected", 3167038
+                   'slave', '127.0.0.1', 9000, 'connected', 3167038,
                )));
 
         $replication = $this->getReplicationConnection('svc', array($sentinel1));
@@ -849,13 +849,13 @@ class SentinelReplicationTest extends PredisTestCase
                   ->will($this->returnValue(
                       array(
                           array(
-                              "name", "127.0.0.1:6383",
-                              "ip", "127.0.0.1",
-                              "port", "6383",
-                              "runid", "1c0bf1291797fbc5608c07a17da394147dc62817",
-                              "flags", "slave",
-                              "master-host", "127.0.0.1",
-                              "master-port", "6381"
+                              'name', '127.0.0.1:6383',
+                              'ip', '127.0.0.1',
+                              'port', '6383',
+                              'runid', '1c0bf1291797fbc5608c07a17da394147dc62817',
+                              'flags', 'slave',
+                              'master-host', '127.0.0.1',
+                              'master-port', '6381',
                           ),
                       )
                   ));
@@ -873,7 +873,7 @@ class SentinelReplicationTest extends PredisTestCase
                ->method('executeCommand')
                ->with($this->isRedisCommand('GET', array('key')))
                ->will($this->throwException(
-                  new Connection\ConnectionException($slave1, "Unknown connection error [127.0.0.1:6382]")
+                  new Connection\ConnectionException($slave1, 'Unknown connection error [127.0.0.1:6382]')
                ));
 
         $slave2 = $this->getMockConnection('tcp://127.0.0.1:6383?alias=slave2');
@@ -928,7 +928,7 @@ class SentinelReplicationTest extends PredisTestCase
                   ->method('executeCommand')
                   ->with($this->isRedisCommand('DEL', array('key')))
                   ->will($this->throwException(
-                      new Connection\ConnectionException($masterOld, "Unknown connection error [127.0.0.1:6381]")
+                      new Connection\ConnectionException($masterOld, 'Unknown connection error [127.0.0.1:6381]')
                   ));
 
         $masterNew = $this->getMockConnection('tcp://127.0.0.1:6391?alias=master');
@@ -982,7 +982,7 @@ class SentinelReplicationTest extends PredisTestCase
                   ->method('executeCommand')
                   ->with($this->isRedisCommand('DEL', array('key')))
                   ->will($this->throwException(
-                      new Connection\ConnectionException($masterOld, "Unknown connection error [127.0.0.1:6381]")
+                      new Connection\ConnectionException($masterOld, 'Unknown connection error [127.0.0.1:6381]')
                   ));
 
         $replication = $this->getReplicationConnection('svc', array($sentinel1));
@@ -1008,7 +1008,7 @@ class SentinelReplicationTest extends PredisTestCase
                       'SENTINEL', array('get-master-addr-by-name', 'svc')
                   ))
                   ->will($this->throwException(
-                      new Connection\ConnectionException($sentinel1, "Unknown connection error [127.0.0.1:5381]")
+                      new Connection\ConnectionException($sentinel1, 'Unknown connection error [127.0.0.1:5381]')
                   ));
 
         $master = $this->getMockConnection('tcp://127.0.0.1:6381?alias=master');
@@ -1019,7 +1019,7 @@ class SentinelReplicationTest extends PredisTestCase
                ->method('executeCommand')
                ->with($this->isRedisCommand('DEL', array('key')))
                ->will($this->throwException(
-                   new Connection\ConnectionException($master, "Unknown connection error [127.0.0.1:6381]")
+                   new Connection\ConnectionException($master, 'Unknown connection error [127.0.0.1:6381]')
                ));
 
         $replication = $this->getReplicationConnection('svc', array($sentinel1));

+ 1 - 1
tests/Predis/Connection/CompositeStreamConnectionTest.php

@@ -38,7 +38,7 @@ class CompositeStreamConnectionTest extends PredisConnectionTestCase
         $connection->method('executeCommand')
                    ->with($cmdSelect)
                    ->will($this->returnValue(
-                       new ErrorResponse("ERR invalid DB index")
+                       new ErrorResponse('ERR invalid DB index')
                    ));
 
         $connection->method('createResource');

+ 1 - 1
tests/Predis/Connection/PhpiredisSocketConnectionTest.php

@@ -63,7 +63,7 @@ class PhpiredisSocketConnectionTest extends PredisConnectionTestCase
         $connection->method('executeCommand')
                    ->with($cmdSelect)
                    ->will($this->returnValue(
-                       new ErrorResponse("ERR invalid DB index")
+                       new ErrorResponse('ERR invalid DB index')
                    ));
 
         $connection->method('createResource');

+ 1 - 1
tests/Predis/Connection/PhpiredisStreamConnectionTest.php

@@ -63,7 +63,7 @@ class PhpiredisStreamConnectionTest extends PredisConnectionTestCase
         $connection->method('executeCommand')
                    ->with($cmdSelect)
                    ->will($this->returnValue(
-                       new ErrorResponse("ERR invalid DB index")
+                       new ErrorResponse('ERR invalid DB index')
                    ));
 
         $connection->method('createResource');

+ 1 - 1
tests/Predis/Connection/StreamConnectionTest.php

@@ -38,7 +38,7 @@ class StreamConnectionTest extends PredisConnectionTestCase
         $connection->method('executeCommand')
                    ->with($cmdSelect)
                    ->will($this->returnValue(
-                       new ErrorResponse("ERR invalid DB index")
+                       new ErrorResponse('ERR invalid DB index')
                    ));
 
         $connection->method('createResource');

+ 0 - 1
tests/Predis/Protocol/Text/RequestSerializerTest.php

@@ -83,5 +83,4 @@ class RequestSerializerTest extends PredisTestCase
 
         $this->assertSame("*3\r\n$3\r\nDEL\r\n$5\r\nkey:1\r\n$5\r\nkey:2\r\n", $result);
     }
-
 }