mirror of
https://github.com/predis/predis.git
synced 2026-08-24 16:29:27 +00:00
Minor code style change.
This commit is contained in:
+15
-15
@@ -432,25 +432,25 @@ abstract class Command {
|
||||
if (isset($this->_hash)) {
|
||||
return $this->_hash;
|
||||
}
|
||||
else {
|
||||
if (isset($this->_arguments[0])) {
|
||||
// TODO: should we throw an exception if the command does
|
||||
// not support sharding?
|
||||
$key = $this->_arguments[0];
|
||||
|
||||
$start = strpos($key, '{');
|
||||
if ($start !== false) {
|
||||
$end = strpos($key, '}', $start);
|
||||
if ($end !== false) {
|
||||
$key = substr($key, ++$start, $end - $start);
|
||||
}
|
||||
if (isset($this->_arguments[0])) {
|
||||
// TODO: should we throw an exception if the command does
|
||||
// not support sharding?
|
||||
$key = $this->_arguments[0];
|
||||
|
||||
$start = strpos($key, '{');
|
||||
if ($start !== false) {
|
||||
$end = strpos($key, '}', $start);
|
||||
if ($end !== false) {
|
||||
$key = substr($key, ++$start, $end - $start);
|
||||
}
|
||||
|
||||
$this->_hash = $distributor->generateKey($key);
|
||||
return $this->_hash;
|
||||
}
|
||||
|
||||
$this->_hash = $distributor->generateKey($key);
|
||||
return $this->_hash;
|
||||
}
|
||||
return null;
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function closesConnection() {
|
||||
|
||||
Reference in New Issue
Block a user