Skip to content

Commit

Permalink
tweak formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Mar 1, 2017
1 parent b93acdd commit e09b9eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
7 changes: 2 additions & 5 deletions src/Illuminate/Database/Query/Grammars/MySqlGrammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,8 @@ protected function compileDeleteWithJoins($query, $table, $where)
{
$joins = ' '.$this->compileJoins($query, $query->joins);

$alias = $table;

if (strpos(strtolower($table), ' as ') !== false) {
$alias = explode(' as ', $table)[1];
}
$alias = strpos(strtolower($table), ' as ') !== false
? explode(' as ', $table)[1] : $table;

return trim("delete {$alias} from {$table}{$joins} {$where}");
}
Expand Down
7 changes: 2 additions & 5 deletions src/Illuminate/Database/Query/Grammars/SqlServerGrammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,8 @@ protected function compileDeleteWithJoins(Builder $query, $table, $where)
{
$joins = ' '.$this->compileJoins($query, $query->joins);

$alias = $table;

if (strpos(strtolower($table), ' as ') !== false) {
$alias = explode(' as ', $table)[1];
}
$alias = strpos(strtolower($table), ' as ') !== false
? explode(' as ', $table)[1] : $table;

return trim("delete {$alias} from {$table}{$joins} {$where}");
}
Expand Down

0 comments on commit e09b9eb

Please sign in to comment.