Completed
Pull Request — master (#2695)
by
unknown
23:03 queued 17s
created
src/Grid/Model.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -311,9 +311,9 @@  discard block
 block discarded – undo
311 311
 
312 312
         $this->setSort();
313 313
 
314
-        $this->queries->reject(function ($query) {
314
+        $this->queries->reject(function($query) {
315 315
             return $query['method'] == 'paginate';
316
-        })->each(function ($query) {
316
+        })->each(function($query) {
317 317
             $this->model = $this->model->{$query['method']}(...$query['arguments']);
318 318
         });
319 319
 
@@ -395,9 +395,9 @@  discard block
 block discarded – undo
395 395
 
396 396
         $queryBuilder = $this->originalModel;
397 397
 
398
-        $this->queries->reject(function ($query) {
398
+        $this->queries->reject(function($query) {
399 399
             return in_array($query['method'], ['get', 'paginate']);
400
-        })->each(function ($query) use (&$queryBuilder) {
400
+        })->each(function($query) use (&$queryBuilder) {
401 401
             $queryBuilder = $queryBuilder->{$query['method']}(...$query['arguments']);
402 402
         });
403 403
 
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
     {
432 432
         $paginate = $this->findQueryByMethod('paginate');
433 433
 
434
-        $this->queries = $this->queries->reject(function ($query) {
434
+        $this->queries = $this->queries->reject(function($query) {
435 435
             return $query['method'] == 'paginate';
436 436
         });
437 437
 
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
      */
490 490
     protected function findQueryByMethod($method)
491 491
     {
492
-        return $this->queries->first(function ($query) use ($method) {
492
+        return $this->queries->first(function($query) use ($method) {
493 493
             return $query['method'] == $method;
494 494
         });
495 495
     }
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
     {
534 534
         list($relationName, $relationColumn) = explode('.', $column);
535 535
 
536
-        if ($this->queries->contains(function ($query) use ($relationName) {
536
+        if ($this->queries->contains(function($query) use ($relationName) {
537 537
             return $query['method'] == 'with' && in_array($relationName, $query['arguments']);
538 538
         })) {
539 539
             $relation = $this->model->$relationName();
@@ -567,7 +567,7 @@  discard block
 block discarded – undo
567 567
      */
568 568
     public function resetOrderBy()
569 569
     {
570
-        $this->queries = $this->queries->reject(function ($query) {
570
+        $this->queries = $this->queries->reject(function($query) {
571 571
             return $query['method'] == 'orderBy' || $query['method'] == 'orderByDesc';
572 572
         });
573 573
     }
Please login to merge, or discard this patch.