mirror of
https://github.com/predis/predis.git
synced 2026-09-01 05:03:28 +00:00
Minor change (mostly micro-optimization).
This commit is contained in:
@@ -311,7 +311,9 @@ class PredisClusterHashStrategy implements CommandHashStrategyInterface
|
||||
$hash = $command->getHash();
|
||||
|
||||
if (!isset($hash) && isset($this->commands[$cmdID = $command->getId()])) {
|
||||
if ($key = call_user_func($this->commands[$cmdID], $command)) {
|
||||
$key = call_user_func($this->commands[$cmdID], $command);
|
||||
|
||||
if (isset($key)) {
|
||||
$hash = $this->getKeyHash($key);
|
||||
$command->setHash($hash);
|
||||
}
|
||||
|
||||
@@ -263,7 +263,9 @@ class RedisClusterHashStrategy implements CommandHashStrategyInterface
|
||||
$hash = $command->getHash();
|
||||
|
||||
if (!isset($hash) && isset($this->commands[$cmdID = $command->getId()])) {
|
||||
if (null !== $key = call_user_func($this->commands[$cmdID], $command)) {
|
||||
$key = call_user_func($this->commands[$cmdID], $command);
|
||||
|
||||
if (isset($key)) {
|
||||
$hash = $this->hashGenerator->hash($key);
|
||||
$command->setHash($hash);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user