Completed
Push — master ( 6bdf21...a19671 )
by Song
03:15 queued 17s
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
     }
@@ -547,7 +547,7 @@  discard block
 block discarded – undo
547 547
         }
548 548
 
549 549
         $columnNameContainsDots = Str::contains($columnName, '.');
550
-        $isRelation = $this->queries->contains(function ($query) use ($columnName) {
550
+        $isRelation = $this->queries->contains(function($query) use ($columnName) {
551 551
             return $query['method'] === 'with' && in_array($columnName, $query['arguments'], true);
552 552
         });
553 553
         if ($columnNameContainsDots === true && $isRelation) {
@@ -593,7 +593,7 @@  discard block
 block discarded – undo
593 593
     {
594 594
         list($relationName, $relationColumn) = explode('.', $column);
595 595
 
596
-        if ($this->queries->contains(function ($query) use ($relationName) {
596
+        if ($this->queries->contains(function($query) use ($relationName) {
597 597
             return $query['method'] == 'with' && in_array($relationName, $query['arguments']);
598 598
         })) {
599 599
             $relation = $this->model->$relationName();
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
      */
628 628
     public function resetOrderBy()
629 629
     {
630
-        $this->queries = $this->queries->reject(function ($query) {
630
+        $this->queries = $this->queries->reject(function($query) {
631 631
             return $query['method'] == 'orderBy' || $query['method'] == 'orderByDesc';
632 632
         });
633 633
     }
Please login to merge, or discard this patch.