Unverified Commit bcd2d97e authored by Marco Pivetta's avatar Marco Pivetta Committed by GitHub

Merge pull request #2937 from carusogabriel/clean-elses

Clean elses
parents 73b2ad52 60132596
......@@ -32,9 +32,9 @@ class Connection extends \Doctrine\DBAL\Driver\PDOConnection
if (\PDO::PARAM_BOOL === $type) {
if ($value) {
return 'true';
} else {
return 'false';
}
return 'false';
}
return parent::quote($value, $type);
......
......@@ -103,9 +103,9 @@ class DB2Connection implements Connection, ServerInfoAwareConnection
$input = db2_escape_string($input);
if ($type == \PDO::PARAM_INT) {
return $input;
} else {
return "'".$input."'";
}
return "'".$input."'";
}
/**
......
......@@ -204,9 +204,9 @@ class QueryBuilder
{
if ($this->type == self::SELECT) {
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
if ($table['schema_name'] == $firstSchema) {
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
{
if ($this->_schemaConfig instanceof SchemaConfig) {
return $this->_schemaConfig->getMaxIdentifierLength();
} else {
return 63;
}
return 63;
}
/**
......
......@@ -118,9 +118,9 @@ class Statement implements \IteratorAggregate, DriverStatement
}
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
return get_class($p);
} elseif (is_scalar($p)) {
return "'".$p."'";
} else {
return var_export($p, true);
}
return var_export($p, true);
}, $query['params'] ?: array());
$queries .= $i.". SQL: '".$query['sql']."' Params: ".implode(", ", $params).PHP_EOL;
$i--;
......
......@@ -43,9 +43,9 @@ class DriverMock implements \Doctrine\DBAL\Driver
{
if($this->_schemaManagerMock == null) {
return new SchemaManagerMock($conn);
} else {
return $this->_schemaManagerMock;
}
return $this->_schemaManagerMock;
}
/* MOCK API */
......@@ -74,4 +74,4 @@ class DriverMock implements \Doctrine\DBAL\Driver
{
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