Commit 25c78b8c authored by Taylor Otwell's avatar Taylor Otwell

refactoring query compiler.

parent 5ca2e2b7
gitflow/*
gitflow @ be5dabf8
Subproject commit be5dabf88e98075b9bc936bfa7de0f54a21a0482
......@@ -31,9 +31,7 @@ class Compiler {
if ( ! is_null($query->$clause)) $sql[] = call_user_func(array($this, 'compile_'.$clause), $query->$clause);
}
foreach ($sql as $key => $value) { if (is_null($value) or (string) $value === '') unset($sql[$key]); }
return implode(' ', $sql);
return implode(' ', array_filter($sql, function($value) { return ! is_null($value) and (string) $value !== ''; }));
}
/**
......
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