@@ -1515,7 +1515,7 @@ protected function addDateBasedWhere($type, $column, $operator, $value, $boolean
1515
1515
*/
1516
1516
public function whereNested (Closure $ callback , $ boolean = 'and ' )
1517
1517
{
1518
- call_user_func ( $ callback, $ query = $ this ->forNestedWhere ());
1518
+ $ callback( $ query = $ this ->forNestedWhere ());
1519
1519
1520
1520
return $ this ->addNestedWhereQuery ($ query , $ boolean );
1521
1521
}
@@ -1566,7 +1566,7 @@ protected function whereSub($column, $operator, Closure $callback, $boolean)
1566
1566
// Once we have the query instance we can simply execute it so it can add all
1567
1567
// of the sub-select's conditions to itself, and then we can cache it off
1568
1568
// in the array of where clauses for the "main" parent query instance.
1569
- call_user_func ( $ callback, $ query = $ this ->forSubQuery ());
1569
+ $ callback( $ query = $ this ->forSubQuery ());
1570
1570
1571
1571
$ this ->wheres [] = compact (
1572
1572
'type ' , 'column ' , 'operator ' , 'query ' , 'boolean '
@@ -1592,7 +1592,7 @@ public function whereExists(Closure $callback, $boolean = 'and', $not = false)
1592
1592
// Similar to the sub-select clause, we will create a new query instance so
1593
1593
// the developer may cleanly specify the entire exists query and we will
1594
1594
// compile the whole thing in the grammar and insert it into the SQL.
1595
- call_user_func ( $ callback, $ query );
1595
+ $ callback( $ query );
1596
1596
1597
1597
return $ this ->addWhereExistsQuery ($ query , $ boolean , $ not );
1598
1598
}
@@ -1991,7 +1991,7 @@ public function orHaving($column, $operator = null, $value = null)
1991
1991
*/
1992
1992
public function havingNested (Closure $ callback , $ boolean = 'and ' )
1993
1993
{
1994
- call_user_func ( $ callback, $ query = $ this ->forNestedWhere ());
1994
+ $ callback( $ query = $ this ->forNestedWhere ());
1995
1995
1996
1996
return $ this ->addNestedHavingQuery ($ query , $ boolean );
1997
1997
}
@@ -2367,7 +2367,7 @@ protected function removeExistingOrdersFor($column)
2367
2367
public function union ($ query , $ all = false )
2368
2368
{
2369
2369
if ($ query instanceof Closure) {
2370
- call_user_func ( $ query, $ query = $ this ->newQuery ());
2370
+ $ query( $ query = $ this ->newQuery ());
2371
2371
}
2372
2372
2373
2373
$ this ->unions [] = compact ('query ' , 'all ' );
0 commit comments