cleaning up code.

Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
This commit is contained in:
Taylor Otwell 2012-02-27 09:28:21 -06:00
parent d87b01ad6c
commit 621fee09be
1 changed files with 5 additions and 3 deletions

View File

@ -172,11 +172,13 @@ protected function execute($sql, $bindings = array())
// Since expressions are injected into the query as strings, we need to
// remove them from the array of bindings. After we have removed them,
// we'll reset the array so there aren't gaps in the keys.
$bindings = array_values(array_filter($bindings, function($binding)
// we'll reset the array so there are not gaps within the keys.
$bindings = array_filter($bindings, function($binding)
{
return ! $binding instanceof Expression;
}));
});
$bindings = array_values($bindings);
$sql = $this->grammar()->shortcut($sql, $bindings);