Completed
Push — master ( 72ffec...dc232d )
by Song
02:20
created
src/Grid/Column/CheckFilter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
     {
78 78
         $value = $this->getFilterValue([]);
79 79
 
80
-        $lists = collect($this->options)->map(function ($label, $key) use ($value) {
80
+        $lists = collect($this->options)->map(function($label, $key) use ($value) {
81 81
             $checked = in_array($key, $value) ? 'checked' : '';
82 82
 
83 83
             return <<<HTML
Please login to merge, or discard this patch.
src/Grid/Column/HasHeader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
      */
116 116
     public function renderHeader()
117 117
     {
118
-        return collect($this->headers)->map(function ($item) {
118
+        return collect($this->headers)->map(function($item) {
119 119
             if ($item instanceof Renderable) {
120 120
                 return $item->render();
121 121
             }
Please login to merge, or discard this patch.
src/Grid/Displayers/Downloadable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
             $this->value = $this->value->toArray();
14 14
         }
15 15
 
16
-        return collect((array) $this->value)->filter()->map(function ($value) use ($server) {
16
+        return collect((array) $this->value)->filter()->map(function($value) use ($server) {
17 17
             if (empty($value)) {
18 18
                 return '';
19 19
             }
Please login to merge, or discard this patch.
src/Grid/Concerns/HasQuickSearch.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
             $this->search = $search;
42 42
         }
43 43
 
44
-        return tap(new Tools\QuickSearch(), function ($search) {
44
+        return tap(new Tools\QuickSearch(), function($search) {
45 45
             $this->tools->append($search);
46 46
         });
47 47
     }
@@ -125,14 +125,14 @@  discard block
 block discarded – undo
125 125
      */
126 126
     protected function parseQueryBindings(array $queries)
127 127
     {
128
-        $columnMap = $this->columns->mapWithKeys(function (Column $column) {
128
+        $columnMap = $this->columns->mapWithKeys(function(Column $column) {
129 129
             $label = $column->getLabel();
130 130
             $name = $column->getName();
131 131
 
132 132
             return [$label => $name, $name => $name];
133 133
         });
134 134
 
135
-        return collect($queries)->map(function ($query) use ($columnMap) {
135
+        return collect($queries)->map(function($query) use ($columnMap) {
136 136
             $segments = explode(':', $query, 2);
137 137
 
138 138
             if (count($segments) != 2) {
Please login to merge, or discard this patch.
src/Form/Field/ImageField.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@
 block discarded – undo
169 169
             
170 170
             $action = $size[2] ?? 'resize';
171 171
             // Resize image with aspect ratio
172
-            $image->$action($size[0], $size[1], function (Constraint $constraint) {
172
+            $image->$action($size[0], $size[1], function(Constraint $constraint) {
173 173
                 $constraint->aspectRatio();
174 174
             })->resizeCanvas($size[0], $size[1], 'center', false, '#ffffff');
175 175
 
Please login to merge, or discard this patch.
src/Grid/Tools/TotalRow.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
      */
88 88
     public function render()
89 89
     {
90
-        $columns = $this->getVisibleColumns()->map(function (Column $column) {
90
+        $columns = $this->getVisibleColumns()->map(function(Column $column) {
91 91
             $name = $column->getName();
92 92
 
93 93
             $total = '';
Please login to merge, or discard this patch.
src/Grid/Tools/FixColumns.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
     {
79 79
         $this->grid->setView($this->view);
80 80
 
81
-        return function (Grid $grid) {
81
+        return function(Grid $grid) {
82 82
             if ($this->head > 0) {
83 83
                 $this->left = $grid->visibleColumns()->slice(0, $this->head);
84 84
             }
Please login to merge, or discard this patch.
src/Grid/Filter.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
      */
287 287
     protected function removeFilterByID($id)
288 288
     {
289
-        $this->filters = array_filter($this->filters, function (AbstractFilter $filter) use ($id) {
289
+        $this->filters = array_filter($this->filters, function(AbstractFilter $filter) use ($id) {
290 290
             return $filter->getId() != $id;
291 291
         });
292 292
     }
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
     {
301 301
         $inputs = Arr::dot(Input::all());
302 302
 
303
-        $inputs = array_filter($inputs, function ($input) {
303
+        $inputs = array_filter($inputs, function($input) {
304 304
             return $input !== '' && !is_null($input);
305 305
         });
306 306
 
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
             }
329 329
         }
330 330
 
331
-        return tap(array_filter($conditions), function ($conditions) {
331
+        return tap(array_filter($conditions), function($conditions) {
332 332
             if (!empty($conditions)) {
333 333
                 $this->expand();
334 334
             }
@@ -346,9 +346,9 @@  discard block
 block discarded – undo
346 346
             return $inputs;
347 347
         }
348 348
 
349
-        $inputs = collect($inputs)->filter(function ($input, $key) {
349
+        $inputs = collect($inputs)->filter(function($input, $key) {
350 350
             return Str::startsWith($key, "{$this->name}_");
351
-        })->mapWithKeys(function ($val, $key) {
351
+        })->mapWithKeys(function($val, $key) {
352 352
             $key = str_replace("{$this->name}_", '', $key);
353 353
 
354 354
             return [$key => $val];
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
      */
419 419
     public function scope($key, $label = '')
420 420
     {
421
-        return tap(new Scope($key, $label), function (Scope $scope) {
421
+        return tap(new Scope($key, $label), function(Scope $scope) {
422 422
             return $this->scopes->push($scope);
423 423
         });
424 424
     }
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
     {
443 443
         $key = request(Scope::QUERY_NAME);
444 444
 
445
-        return $this->scopes->first(function ($scope) use ($key) {
445
+        return $this->scopes->first(function($scope) use ($key) {
446 446
             return $scope->key == $key;
447 447
         });
448 448
     }
@@ -567,9 +567,9 @@  discard block
 block discarded – undo
567 567
 
568 568
         $columns->push($pageKey);
569 569
 
570
-        $groupNames = collect($this->filters)->filter(function ($filter) {
570
+        $groupNames = collect($this->filters)->filter(function($filter) {
571 571
             return $filter instanceof Filter\Group;
572
-        })->map(function (AbstractFilter $filter) {
572
+        })->map(function(AbstractFilter $filter) {
573 573
             return "{$filter->getId()}_group";
574 574
         });
575 575
 
Please login to merge, or discard this patch.
src/Grid.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
         $column = new Column($column, $label);
358 358
         $column->setGrid($this);
359 359
 
360
-        return tap($column, function ($value) {
360
+        return tap($column, function($value) {
361 361
             $this->columns->push($value);
362 362
         });
363 363
     }
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
         $column = new Column($column, $label);
422 422
         $column->setGrid($this);
423 423
 
424
-        return tap($column, function ($value) {
424
+        return tap($column, function($value) {
425 425
             $this->columns->prepend($value);
426 426
         });
427 427
     }
@@ -554,7 +554,7 @@  discard block
 block discarded – undo
554 554
 
555 555
         $data = $collection->toArray();
556 556
 
557
-        $this->columns->map(function (Column $column) use (&$data) {
557
+        $this->columns->map(function(Column $column) use (&$data) {
558 558
             $data = $column->fill($data);
559 559
 
560 560
             $this->columnNames[] = $column->getName();
@@ -574,7 +574,7 @@  discard block
 block discarded – undo
574 574
      */
575 575
     protected function buildRows(array $data)
576 576
     {
577
-        $this->rows = collect($data)->map(function ($model, $number) {
577
+        $this->rows = collect($data)->map(function($model, $number) {
578 578
             return new Row($number, $model, $this->keyName);
579 579
         });
580 580
 
Please login to merge, or discard this patch.