@@ -341,7 +341,7 @@ class PredisClusterHashStrategy implements CommandHashStrategyInterface
*/
protected function checkSameHashForKeys(Array $keys)
{
- if (($count = count($keys)) === 0) {
+ if (!$count = count($keys)) {
return false;
}
@@ -296,7 +296,7 @@ class PhpiredisConnection extends AbstractConnection
$this->connectWithTimeout($this->parameters);
- if (count($this->initCmds) > 0) {
+ if ($this->initCmds) {
$this->sendInitializationCommands();
@@ -141,7 +141,7 @@ class StreamConnection extends AbstractConnection
parent::connect();
- if (count($this->initCmds) > 0){
@@ -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)) {
@@ -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);