From eae8fb8971358237ecc4cfaf32e2ca0e8146a273 Mon Sep 17 00:00:00 2001 From: Daniele Alessandri Date: Wed, 5 Jan 2011 12:50:33 +0100 Subject: [PATCH] Minor code style change. --- lib/Predis.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/Predis.php b/lib/Predis.php index aab33b3d..94753173 100644 --- a/lib/Predis.php +++ b/lib/Predis.php @@ -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() {