Completed
Pull Request — master (#3769)
by Sandy
03:12 queued 11s
created
src/Grid/Model.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -348,9 +348,9 @@  discard block
 block discarded – undo
348 348
 
349 349
         $this->setSort();
350 350
 
351
-        $this->queries->reject(function ($query) {
351
+        $this->queries->reject(function($query) {
352 352
             return $query['method'] == 'paginate';
353
-        })->each(function ($query) {
353
+        })->each(function($query) {
354 354
             $this->model = $this->model->{$query['method']}(...$query['arguments']);
355 355
         });
356 356
 
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
         $this->setSort();
402 402
         $this->setPaginate();
403 403
 
404
-        $this->queries->unique()->each(function ($query) {
404
+        $this->queries->unique()->each(function($query) {
405 405
             $this->model = call_user_func_array([$this->model, $query['method']], $query['arguments']);
406 406
         });
407 407
 
@@ -431,9 +431,9 @@  discard block
 block discarded – undo
431 431
 
432 432
         $queryBuilder = $this->originalModel;
433 433
 
434
-        $this->queries->reject(function ($query) {
434
+        $this->queries->reject(function($query) {
435 435
             return in_array($query['method'], ['get', 'paginate']);
436
-        })->each(function ($query) use (&$queryBuilder) {
436
+        })->each(function($query) use (&$queryBuilder) {
437 437
             $queryBuilder = $queryBuilder->{$query['method']}(...$query['arguments']);
438 438
         });
439 439
 
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
     {
468 468
         $paginate = $this->findQueryByMethod('paginate');
469 469
 
470
-        $this->queries = $this->queries->reject(function ($query) {
470
+        $this->queries = $this->queries->reject(function($query) {
471 471
             return $query['method'] == 'paginate';
472 472
         });
473 473
 
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
      */
526 526
     protected function findQueryByMethod($method)
527 527
     {
528
-        return $this->queries->last(function ($query) use ($method) {
528
+        return $this->queries->last(function($query) use ($method) {
529 529
             return $query['method'] == $method;
530 530
         });
531 531
     }
@@ -580,7 +580,7 @@  discard block
 block discarded – undo
580 580
     {
581 581
         list($relationName, $relationColumn) = explode('.', $column);
582 582
 
583
-        if ($this->queries->contains(function ($query) use ($relationName) {
583
+        if ($this->queries->contains(function($query) use ($relationName) {
584 584
             return $query['method'] == 'with' && in_array($relationName, $query['arguments']);
585 585
         })) {
586 586
             $relation = $this->model->$relationName();
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
      */
615 615
     public function resetOrderBy()
616 616
     {
617
-        $this->queries = $this->queries->reject(function ($query) {
617
+        $this->queries = $this->queries->reject(function($query) {
618 618
             return $query['method'] == 'orderBy' || $query['method'] == 'orderByDesc';
619 619
         });
620 620
     }
Please login to merge, or discard this patch.