mirror of
https://github.com/predis/predis.git
synced 2026-08-25 08:19:35 +00:00
More code styling changes.
This commit is contained in:
@@ -31,15 +31,18 @@ class ClientConnectionFactory extends AbstractOption
|
||||
}
|
||||
if (is_array($value)) {
|
||||
$factory = $this->getDefault($options);
|
||||
|
||||
foreach ($value as $scheme => $initializer) {
|
||||
$factory->define($scheme, $initializer);
|
||||
}
|
||||
|
||||
return $factory;
|
||||
}
|
||||
if (is_string($value) && class_exists($value)) {
|
||||
if (!($factory = new $value()) && !$factory instanceof ConnectionFactoryInterface) {
|
||||
throw new \InvalidArgumentException("Class $value must be an instance of Predis\Connection\ConnectionFactoryInterface");
|
||||
}
|
||||
|
||||
return $factory;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user