mirror of
https://github.com/predis/predis.git
synced 2026-08-28 11:09:49 +00:00
More code styling changes.
This commit is contained in:
@@ -97,11 +97,13 @@ class ConnectionFactory implements ConnectionFactoryInterface
|
||||
}
|
||||
|
||||
$scheme = $parameters->scheme;
|
||||
|
||||
if (!isset($this->schemes[$scheme])) {
|
||||
throw new \InvalidArgumentException("Unknown connection scheme: $scheme");
|
||||
}
|
||||
|
||||
$initializer = $this->schemes[$scheme];
|
||||
|
||||
if (!is_callable($initializer)) {
|
||||
$connection = new $initializer($parameters);
|
||||
$this->prepareConnection($connection, $profile ?: ServerProfile::getDefault());
|
||||
@@ -110,6 +112,7 @@ class ConnectionFactory implements ConnectionFactoryInterface
|
||||
}
|
||||
|
||||
$connection = call_user_func($initializer, $parameters, $profile);
|
||||
|
||||
if (!$connection instanceof SingleConnectionInterface) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Objects returned by connection initializers must implement ' .
|
||||
|
||||
Reference in New Issue
Block a user