Browse Source

Run php-cs-fixer.

Daniele Alessandri 9 years ago
parent
commit
1f1c9cf1a4

+ 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)
-        );
+        ;
     }
 
     /**

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

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

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

@@ -673,11 +673,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)),
@@ -716,7 +716,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)),
         );