Remove useless default NULL value in method arguments.

This commit is contained in:
Daniele Alessandri
2012-08-24 11:55:19 +02:00
parent 6918de6e4b
commit be46ab813c
2 changed files with 4 additions and 10 deletions
+2 -4
View File
@@ -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;
}
/**
+2 -6
View File
@@ -228,13 +228,9 @@ class RedisCluster implements ClusterConnectionInterface, \IteratorAggregate, \C
/**
* {@inheritdoc}
*/
public function getConnectionById($id = null)
public function getConnectionById($connectionId)
{
if (!isset($id)) {
throw new \InvalidArgumentException("A valid connection ID must be specified");
}
return isset($this->pool[$id]) ? $this->pool[$id] : null;
return isset($this->pool[$connectionId]) ? $this->pool[$connectionId] : null;
}
/**