mirror of
https://github.com/predis/predis.git
synced 2026-08-30 12:15:03 +00:00
Remove useless default NULL value in method arguments.
This commit is contained in:
@@ -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
|
||||
/**
|
||||
* {@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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user