Completed
Pull Request — master (#4135)
by Alexander
02:44
created
src/Grid/Model.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -347,9 +347,9 @@  discard block
 block discarded – undo
347 347
 
348 348
         $this->setSort();
349 349
 
350
-        $this->queries->reject(function ($query) {
350
+        $this->queries->reject(function($query) {
351 351
             return $query['method'] == 'paginate';
352
-        })->each(function ($query) {
352
+        })->each(function($query) {
353 353
             $this->model = $this->model->{$query['method']}(...$query['arguments']);
354 354
         });
355 355
 
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
         $this->setSort();
401 401
         $this->setPaginate();
402 402
 
403
-        $this->queries->unique()->each(function ($query) {
403
+        $this->queries->unique()->each(function($query) {
404 404
             $this->model = call_user_func_array([$this->model, $query['method']], $query['arguments']);
405 405
         });
406 406
 
@@ -430,9 +430,9 @@  discard block
 block discarded – undo
430 430
 
431 431
         $queryBuilder = $this->originalModel;
432 432
 
433
-        $this->queries->reject(function ($query) {
433
+        $this->queries->reject(function($query) {
434 434
             return in_array($query['method'], ['get', 'paginate']);
435
-        })->each(function ($query) use (&$queryBuilder) {
435
+        })->each(function($query) use (&$queryBuilder) {
436 436
             $queryBuilder = $queryBuilder->{$query['method']}(...$query['arguments']);
437 437
         });
438 438
 
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
     {
467 467
         $paginate = $this->findQueryByMethod('paginate');
468 468
 
469
-        $this->queries = $this->queries->reject(function ($query) {
469
+        $this->queries = $this->queries->reject(function($query) {
470 470
             return $query['method'] == 'paginate';
471 471
         });
472 472
 
@@ -524,7 +524,7 @@  discard block
 block discarded – undo
524 524
      */
525 525
     protected function findQueryByMethod($method)
526 526
     {
527
-        return $this->queries->first(function ($query) use ($method) {
527
+        return $this->queries->first(function($query) use ($method) {
528 528
             return $query['method'] == $method;
529 529
         });
530 530
     }
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
 
549 549
         $columnNameContainsDots = Str::contains($columnName, '.');
550 550
         if ($columnNameContainsDots === true) {
551
-            $isRelation = $this->queries->contains(function ($query) use ($columnName) {
551
+            $isRelation = $this->queries->contains(function($query) use ($columnName) {
552 552
                 return $query['method'] === 'with' && in_array($columnName, $query['arguments'], true);
553 553
             });
554 554
             if ($isRelation === true) {
@@ -600,7 +600,7 @@  discard block
 block discarded – undo
600 600
     {
601 601
         list($relationName, $relationColumn) = explode('.', $column);
602 602
 
603
-        if ($this->queries->contains(function ($query) use ($relationName) {
603
+        if ($this->queries->contains(function($query) use ($relationName) {
604 604
             return $query['method'] == 'with' && in_array($relationName, $query['arguments']);
605 605
         })) {
606 606
             $relation = $this->model->$relationName();
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
      */
635 635
     public function resetOrderBy()
636 636
     {
637
-        $this->queries = $this->queries->reject(function ($query) {
637
+        $this->queries = $this->queries->reject(function($query) {
638 638
             return $query['method'] == 'orderBy' || $query['method'] == 'orderByDesc';
639 639
         });
640 640
     }
Please login to merge, or discard this patch.