mirror of
https://github.com/predis/predis.git
synced 2026-08-30 20:21:31 +00:00
Remove a few more unnecessary strict comparisons.
This commit is contained in:
@@ -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){
|
||||
if ($this->initCmds) {
|
||||
$this->sendInitializationCommands();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user