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
@@ -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 ' .