Completed
Push — master ( f21755...6fbb78 )
by Song
03:04
created
src/Grid/Filter.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
      */
272 272
     protected function removeFilterByID($id)
273 273
     {
274
-        $this->filters = array_filter($this->filters, function (AbstractFilter $filter) use ($id) {
274
+        $this->filters = array_filter($this->filters, function(AbstractFilter $filter) use ($id) {
275 275
             return $filter->getId() != $id;
276 276
         });
277 277
     }
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
     {
286 286
         $inputs = array_dot(Input::all());
287 287
 
288
-        $inputs = array_filter($inputs, function ($input) {
288
+        $inputs = array_filter($inputs, function($input) {
289 289
             return $input !== '' && !is_null($input);
290 290
         });
291 291
 
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
             }
314 314
         }
315 315
 
316
-        return tap(array_filter($conditions), function ($conditions) {
316
+        return tap(array_filter($conditions), function($conditions) {
317 317
             if (!empty($conditions)) {
318 318
                 $this->expand();
319 319
             }
@@ -331,9 +331,9 @@  discard block
 block discarded – undo
331 331
             return $inputs;
332 332
         }
333 333
 
334
-        $inputs = collect($inputs)->filter(function ($input, $key) {
334
+        $inputs = collect($inputs)->filter(function($input, $key) {
335 335
             return starts_with($key, "{$this->name}_");
336
-        })->mapWithKeys(function ($val, $key) {
336
+        })->mapWithKeys(function($val, $key) {
337 337
             $key = str_replace("{$this->name}_", '', $key);
338 338
 
339 339
             return [$key => $val];
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
      */
404 404
     public function scope($key, $label = '')
405 405
     {
406
-        return tap(new Scope($key, $label), function (Scope $scope) {
406
+        return tap(new Scope($key, $label), function(Scope $scope) {
407 407
             return $this->scopes->push($scope);
408 408
         });
409 409
     }
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
     {
428 428
         $key = request(Scope::QUERY_NAME);
429 429
 
430
-        return $this->scopes->first(function ($scope) use ($key) {
430
+        return $this->scopes->first(function($scope) use ($key) {
431 431
             return $scope->key == $key;
432 432
         });
433 433
     }
@@ -547,9 +547,9 @@  discard block
 block discarded – undo
547 547
 
548 548
         $columns->push($pageKey);
549 549
 
550
-        $groupNames = collect($this->filters)->filter(function ($filter) {
550
+        $groupNames = collect($this->filters)->filter(function($filter) {
551 551
             return $filter instanceof Group;
552
-        })->map(function (AbstractFilter $filter) {
552
+        })->map(function(AbstractFilter $filter) {
553 553
             return "{$filter->getId()}_group";
554 554
         });
555 555
 
@@ -581,17 +581,17 @@  discard block
 block discarded – undo
581 581
             $keys = $keys->toArray();
582 582
         }
583 583
 
584
-        $keys = (array)$keys;
584
+        $keys = (array) $keys;
585 585
 
586 586
         $request = request();
587 587
 
588 588
         $query = $request->query();
589 589
         array_forget($query, $keys);
590 590
 
591
-        $question = $request->getBaseUrl() . $request->getPathInfo() == '/' ? '/?' : '?';
591
+        $question = $request->getBaseUrl().$request->getPathInfo() == '/' ? '/?' : '?';
592 592
 
593 593
         return count($request->query()) > 0
594
-            ? $request->url() . $question . http_build_query($query)
594
+            ? $request->url().$question.http_build_query($query)
595 595
             : $request->fullUrl();
596 596
     }
597 597
 
@@ -602,7 +602,7 @@  discard block
 block discarded – undo
602 602
     public static function extend($name, $filterClass)
603 603
     {
604 604
         if (!is_subclass_of($filterClass, AbstractFilter::class)) {
605
-            throw new \InvalidArgumentException("The class [$filterClass] must be a type of " . AbstractFilter::class . '.');
605
+            throw new \InvalidArgumentException("The class [$filterClass] must be a type of ".AbstractFilter::class.'.');
606 606
         }
607 607
 
608 608
         static::$supports[$name] = $filterClass;
Please login to merge, or discard this patch.