Completed
Push — master ( b6a9dc...91195a )
by Song
02:51
created
src/Grid/Model.php 1 patch
Spacing   +10 added lines, -10 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
 
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
         $this->setSort();
365 365
         $this->setPaginate();
366 366
 
367
-        $this->queries->unique()->each(function ($query) {
367
+        $this->queries->unique()->each(function($query) {
368 368
             $this->model = call_user_func_array([$this->model, $query['method']], $query['arguments']);
369 369
         });
370 370
 
@@ -394,9 +394,9 @@  discard block
 block discarded – undo
394 394
 
395 395
         $queryBuilder = $this->originalModel;
396 396
 
397
-        $this->queries->reject(function ($query) {
397
+        $this->queries->reject(function($query) {
398 398
             return in_array($query['method'], ['get', 'paginate']);
399
-        })->each(function ($query) use (&$queryBuilder) {
399
+        })->each(function($query) use (&$queryBuilder) {
400 400
             $queryBuilder = $queryBuilder->{$query['method']}(...$query['arguments']);
401 401
         });
402 402
 
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
     {
431 431
         $paginate = $this->findQueryByMethod('paginate');
432 432
 
433
-        $this->queries = $this->queries->reject(function ($query) {
433
+        $this->queries = $this->queries->reject(function($query) {
434 434
             return $query['method'] == 'paginate';
435 435
         });
436 436
 
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
      */
489 489
     protected function findQueryByMethod($method)
490 490
     {
491
-        return $this->queries->first(function ($query) use ($method) {
491
+        return $this->queries->first(function($query) use ($method) {
492 492
             return $query['method'] == $method;
493 493
         });
494 494
     }
@@ -532,14 +532,14 @@  discard block
 block discarded – undo
532 532
     {
533 533
         list($relationName, $relationColumn) = explode('.', $column);
534 534
 
535
-        if ($this->queries->contains(function ($query) use ($relationName) {
535
+        if ($this->queries->contains(function($query) use ($relationName) {
536 536
             return $query['method'] == 'with' && in_array($relationName, $query['arguments']);
537 537
         })) {
538 538
             $relation = $this->model->$relationName();
539 539
 	
540 540
 	        $this->queries->push([
541 541
 		        'method'    => 'select',
542
-		        'arguments' => [$this->model->getTable() . ".*"],
542
+		        'arguments' => [$this->model->getTable().".*"],
543 543
 	        ]);
544 544
 	        
545 545
             $this->queries->push([
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
      */
567 567
     public function resetOrderBy()
568 568
     {
569
-        $this->queries = $this->queries->reject(function ($query) {
569
+        $this->queries = $this->queries->reject(function($query) {
570 570
             return $query['method'] == 'orderBy' || $query['method'] == 'orderByDesc';
571 571
         });
572 572
     }
Please login to merge, or discard this patch.