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
+4
View File
@@ -43,9 +43,11 @@ class ClientReplication extends AbstractOption
{
if (is_callable($value)) {
$connection = call_user_func($value, $options);
if (!$connection instanceof ReplicationConnectionInterface) {
throw new \InvalidArgumentException('Instance of Predis\Connection\ReplicationConnectionInterface expected');
}
return $connection;
}
@@ -53,9 +55,11 @@ class ClientReplication extends AbstractOption
if (!class_exists($value)) {
throw new \InvalidArgumentException("Class $value does not exist");
}
if (!($connection = new $value()) instanceof ReplicationConnectionInterface) {
throw new \InvalidArgumentException('Instance of Predis\Connection\ReplicationConnectionInterface expected');
}
return $connection;
}