Explorar o código

Removed the rather superfluous private method ConnectionCluster::getConnectionFromRing.

Daniele Alessandri %!s(int64=15) %!d(string=hai) anos
pai
achega
ca7f3e294c
Modificáronse 1 ficheiros con 1 adicións e 5 borrados
  1. 1 5
      lib/Predis.php

+ 1 - 5
lib/Predis.php

@@ -790,17 +790,13 @@ class ConnectionCluster implements IConnection, \IteratorAggregate {
         $this->_ring->add($connection);
     }
 
-    private function getConnectionFromRing(Command $command) {
-        return $this->_ring->get($command->getHash());
-    }
-
     private function getConnection(Command $command) {
         if ($command->canBeHashed() === false) {
             throw new ClientException(
                 sprintf("Cannot send '%s' commands to a cluster of connections.", $command->getCommandId())
             );
         }
-        return $this->getConnectionFromRing($command);
+        return $this->_ring->get($command->getHash());
     }
 
     public function getConnectionById($id = null) {