@@ -143,11 +143,9 @@ class PredisCluster implements ClusterConnectionInterface, \IteratorAggregate, \
/**
* {@inheritdoc}
*/
- public function getConnectionById($id = null)
+ public function getConnectionById($connectionId)
{
- $alias = $id ?: 0;
-
- return isset($this->pool[$alias]) ? $this->pool[$alias] : null;
+ return isset($this->pool[$connectionId]) ? $this->pool[$connectionId] : null;
}
@@ -228,13 +228,9 @@ class RedisCluster implements ClusterConnectionInterface, \IteratorAggregate, \C
- if (!isset($id)) {
- throw new \InvalidArgumentException("A valid connection ID must be specified");
- }
- return isset($this->pool[$id]) ? $this->pool[$id] : null;