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