Commit 49e9e9ce authored by Marco Pivetta's avatar Marco Pivetta

#722 - avoiding unneeded variable overwrites, using ternary experssions instead

parent 029730d2
......@@ -575,13 +575,11 @@ class Connection implements DriverConnection
{
$this->connect();
$query = 'DELETE FROM ' . $tableExpression . $this->getWhereSql($identifier);
if (is_string(key($types))) {
$types = $this->extractTypeValues($identifier, $types);
}
return $this->executeUpdate($query, array_values($identifier), $types);
return $this->executeUpdate(
'DELETE FROM ' . $tableExpression . $this->getWhereSql($identifier),
array_values($identifier),
is_string(key($types)) ? $this->extractTypeValues($identifier, $types) : $types
);
}
/**
......
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