Browse Source

Remove a few more unnecessary strict comparisons.

Daniele Alessandri 12 years ago
parent
commit
1c1b4096f6

+ 1 - 1
lib/Predis/Cluster/PredisClusterHashStrategy.php

@@ -341,7 +341,7 @@ class PredisClusterHashStrategy implements CommandHashStrategyInterface
      */
     protected function checkSameHashForKeys(Array $keys)
     {
-        if (($count = count($keys)) === 0) {
+        if (!$count = count($keys)) {
             return false;
         }
 

+ 1 - 1
lib/Predis/Connection/PhpiredisConnection.php

@@ -296,7 +296,7 @@ class PhpiredisConnection extends AbstractConnection
 
         $this->connectWithTimeout($this->parameters);
 
-        if (count($this->initCmds) > 0) {
+        if ($this->initCmds) {
             $this->sendInitializationCommands();
         }
     }

+ 1 - 1
lib/Predis/Connection/StreamConnection.php

@@ -141,7 +141,7 @@ class StreamConnection extends AbstractConnection
     {
         parent::connect();
 
-        if (count($this->initCmds) > 0){
+        if ($this->initCmds) {
             $this->sendInitializationCommands();
         }
     }

+ 1 - 1
lib/Predis/Profile/ServerProfile.php

@@ -130,7 +130,7 @@ abstract class ServerProfile implements ServerProfileInterface, CommandProcessin
     public function supportsCommands(Array $commands)
     {
         foreach ($commands as $command) {
-            if ($this->supportsCommand($command) === false) {
+            if (!$this->supportsCommand($command)) {
                 return false;
             }
         }

+ 1 - 1
lib/Predis/Protocol/Text/TextProtocol.php

@@ -98,7 +98,7 @@ class TextProtocol implements ProtocolInterface
                 if ($count === -1) {
                     return null;
                 }
-                if ($this->mbiterable == true) {
+                if ($this->mbiterable) {
                     return new MultiBulkResponseSimple($connection, $count);
                 }