Commit 60132596 authored by Gabriel Caruso's avatar Gabriel Caruso

Clean elses

parent 73b2ad52
...@@ -32,9 +32,9 @@ class Connection extends \Doctrine\DBAL\Driver\PDOConnection ...@@ -32,9 +32,9 @@ class Connection extends \Doctrine\DBAL\Driver\PDOConnection
if (\PDO::PARAM_BOOL === $type) { if (\PDO::PARAM_BOOL === $type) {
if ($value) { if ($value) {
return 'true'; return 'true';
} else {
return 'false';
} }
return 'false';
} }
return parent::quote($value, $type); return parent::quote($value, $type);
......
...@@ -103,9 +103,9 @@ class DB2Connection implements Connection, ServerInfoAwareConnection ...@@ -103,9 +103,9 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
$input = db2_escape_string($input); $input = db2_escape_string($input);
if ($type == \PDO::PARAM_INT) { if ($type == \PDO::PARAM_INT) {
return $input; return $input;
} else {
return "'".$input."'";
} }
return "'".$input."'";
} }
/** /**
......
...@@ -204,9 +204,9 @@ class QueryBuilder ...@@ -204,9 +204,9 @@ class QueryBuilder
{ {
if ($this->type == self::SELECT) { if ($this->type == self::SELECT) {
return $this->connection->executeQuery($this->getSQL(), $this->params, $this->paramTypes); return $this->connection->executeQuery($this->getSQL(), $this->params, $this->paramTypes);
} else {
return $this->connection->executeUpdate($this->getSQL(), $this->params, $this->paramTypes);
} }
return $this->connection->executeUpdate($this->getSQL(), $this->params, $this->paramTypes);
} }
/** /**
......
...@@ -194,9 +194,9 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager ...@@ -194,9 +194,9 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager
if ($table['schema_name'] == $firstSchema) { if ($table['schema_name'] == $firstSchema) {
return $table['table_name']; return $table['table_name'];
} else {
return $table['schema_name'] . "." . $table['table_name'];
} }
return $table['schema_name'] . "." . $table['table_name'];
} }
/** /**
......
...@@ -122,9 +122,9 @@ class Table extends AbstractAsset ...@@ -122,9 +122,9 @@ class Table extends AbstractAsset
{ {
if ($this->_schemaConfig instanceof SchemaConfig) { if ($this->_schemaConfig instanceof SchemaConfig) {
return $this->_schemaConfig->getMaxIdentifierLength(); return $this->_schemaConfig->getMaxIdentifierLength();
} else {
return 63;
} }
return 63;
} }
/** /**
......
...@@ -118,9 +118,9 @@ class Statement implements \IteratorAggregate, DriverStatement ...@@ -118,9 +118,9 @@ class Statement implements \IteratorAggregate, DriverStatement
} }
return $this->stmt->bindValue($name, $value, $bindingType); return $this->stmt->bindValue($name, $value, $bindingType);
} else {
return $this->stmt->bindValue($name, $value);
} }
return $this->stmt->bindValue($name, $value);
} }
/** /**
......
...@@ -62,9 +62,9 @@ class DbalFunctionalTestCase extends DbalTestCase ...@@ -62,9 +62,9 @@ class DbalFunctionalTestCase extends DbalTestCase
return get_class($p); return get_class($p);
} elseif (is_scalar($p)) { } elseif (is_scalar($p)) {
return "'".$p."'"; return "'".$p."'";
} else {
return var_export($p, true);
} }
return var_export($p, true);
}, $query['params'] ?: array()); }, $query['params'] ?: array());
$queries .= $i.". SQL: '".$query['sql']."' Params: ".implode(", ", $params).PHP_EOL; $queries .= $i.". SQL: '".$query['sql']."' Params: ".implode(", ", $params).PHP_EOL;
$i--; $i--;
......
...@@ -43,9 +43,9 @@ class DriverMock implements \Doctrine\DBAL\Driver ...@@ -43,9 +43,9 @@ class DriverMock implements \Doctrine\DBAL\Driver
{ {
if($this->_schemaManagerMock == null) { if($this->_schemaManagerMock == null) {
return new SchemaManagerMock($conn); return new SchemaManagerMock($conn);
} else {
return $this->_schemaManagerMock;
} }
return $this->_schemaManagerMock;
} }
/* MOCK API */ /* MOCK API */
...@@ -74,4 +74,4 @@ class DriverMock implements \Doctrine\DBAL\Driver ...@@ -74,4 +74,4 @@ class DriverMock implements \Doctrine\DBAL\Driver
{ {
return 0; return 0;
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment