More code styling changes.

This commit is contained in:
Daniele Alessandri
2012-07-27 12:23:25 +02:00
parent 6c732c737b
commit 55a3fd65a2
75 changed files with 260 additions and 232 deletions
@@ -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;
}