Completed
Pull Request — master (#3215)
by Hiroyuki
02:22
created
src/Admin.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -213,10 +213,10 @@
 block discarded – undo
213 213
             'middleware' => config('admin.route.middleware'),
214 214
         ];
215 215
 
216
-        app('router')->group($attributes, function ($router) {
216
+        app('router')->group($attributes, function($router) {
217 217
 
218 218
             /* @var \Illuminate\Routing\Router $router */
219
-            $router->namespace('Encore\Admin\Controllers')->group(function ($router) {
219
+            $router->namespace('Encore\Admin\Controllers')->group(function($router) {
220 220
 
221 221
                 /* @var \Illuminate\Routing\Router $router */
222 222
                 $router->resource('auth/users', 'UserController');
Please login to merge, or discard this patch.
src/Grid/Displayers/Image.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 ($path) use ($server, $width, $height) {
16
+        return collect((array) $this->value)->filter()->map(function($path) use ($server, $width, $height) {
17 17
             if (url()->isValidUrl($path) || strpos($path, 'data:image') === 0) {
18 18
                 $src = $path;
19 19
             } elseif ($server) {
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
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
      */
260 260
     protected function removeFilterByID($id)
261 261
     {
262
-        $this->filters = array_filter($this->filters, function (AbstractFilter $filter) use ($id) {
262
+        $this->filters = array_filter($this->filters, function(AbstractFilter $filter) use ($id) {
263 263
             return $filter->getId() != $id;
264 264
         });
265 265
     }
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
     {
274 274
         $inputs = array_dot(Input::all());
275 275
 
276
-        $inputs = array_filter($inputs, function ($input) {
276
+        $inputs = array_filter($inputs, function($input) {
277 277
             return $input !== '' && !is_null($input);
278 278
         });
279 279
 
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
             }
302 302
         }
303 303
 
304
-        return tap(array_filter($conditions), function ($conditions) {
304
+        return tap(array_filter($conditions), function($conditions) {
305 305
             if (!empty($conditions)) {
306 306
                 $this->expand();
307 307
             }
@@ -319,9 +319,9 @@  discard block
 block discarded – undo
319 319
             return $inputs;
320 320
         }
321 321
 
322
-        $inputs = collect($inputs)->filter(function ($input, $key) {
322
+        $inputs = collect($inputs)->filter(function($input, $key) {
323 323
             return starts_with($key, "{$this->name}_");
324
-        })->mapWithKeys(function ($val, $key) {
324
+        })->mapWithKeys(function($val, $key) {
325 325
             $key = str_replace("{$this->name}_", '', $key);
326 326
 
327 327
             return [$key => $val];
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
      */
392 392
     public function scope($key, $label = '')
393 393
     {
394
-        return tap(new Scope($key, $label), function (Scope $scope) {
394
+        return tap(new Scope($key, $label), function(Scope $scope) {
395 395
             return $this->scopes->push($scope);
396 396
         });
397 397
     }
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
     {
416 416
         $key = request(Scope::QUERY_NAME);
417 417
 
418
-        return $this->scopes->first(function ($scope) use ($key) {
418
+        return $this->scopes->first(function($scope) use ($key) {
419 419
             return $scope->key == $key;
420 420
         });
421 421
     }
@@ -535,9 +535,9 @@  discard block
 block discarded – undo
535 535
 
536 536
         $columns->push($pageKey);
537 537
 
538
-        $groupNames = collect($this->filters)->filter(function ($filter) {
538
+        $groupNames = collect($this->filters)->filter(function($filter) {
539 539
             return $filter instanceof Group;
540
-        })->map(function (AbstractFilter $filter) {
540
+        })->map(function(AbstractFilter $filter) {
541 541
             return "{$filter->getId()}_group";
542 542
         });
543 543
 
Please login to merge, or discard this patch.
src/Grid/Displayers/Editable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -184,7 +184,7 @@
 block discarded – undo
184 184
             $attributes = array_merge($attributes, $this->attributes);
185 185
         }
186 186
 
187
-        $attributes = collect($attributes)->map(function ($attribute, $name) {
187
+        $attributes = collect($attributes)->map(function($attribute, $name) {
188 188
             return "$name='$attribute'";
189 189
         })->implode(' ');
190 190
 
Please login to merge, or discard this patch.
src/Console/ExportSeedCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
         $fields = \DB::getSchemaBuilder()->getColumnListing($table);
90 90
         $fields = array_diff($fields, $exceptFields);
91 91
 
92
-        $array = \DB::table($table)->get($fields)->map(function ($item) {
92
+        $array = \DB::table($table)->get($fields)->map(function($item) {
93 93
             return (array) $item;
94 94
         })->all();
95 95
 
Please login to merge, or discard this patch.
src/Form/Field/HasMany.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -640,7 +640,7 @@
 block discarded – undo
640 640
         }
641 641
 
642 642
         /* Build row elements */
643
-        $template = array_reduce($fields, function ($all, $field) {
643
+        $template = array_reduce($fields, function($all, $field) {
644 644
             $all .= "<td>{$field}</td>";
645 645
 
646 646
             return $all;
Please login to merge, or discard this patch.
src/Layout/Column.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@
 block discarded – undo
112 112
     protected function startColumn()
113 113
     {
114 114
         // get class name using width array
115
-        $classnName = collect($this->width)->map(function ($value, $key) {
115
+        $classnName = collect($this->width)->map(function($value, $key) {
116 116
             return "col-$key-$value";
117 117
         })->implode(' ');
118 118
 
Please login to merge, or discard this patch.
src/Grid/Tools/ColumnSelector.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
 
39 39
         $this->setupScript($show, $columns);
40 40
 
41
-        $lists = $columns->map(function ($val, $key) use ($show) {
41
+        $lists = $columns->map(function($val, $key) use ($show) {
42 42
             if (empty($show)) {
43 43
                 $checked = 'checked';
44 44
             } else {
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     protected function getGridColumns()
75 75
     {
76
-        return $this->grid->columns()->map(function (Grid\Column $column) {
76
+        return $this->grid->columns()->map(function(Grid\Column $column) {
77 77
             $name = $column->getName();
78 78
 
79 79
             if (in_array($name, ['__row_selector__', '__actions__'])) {
Please login to merge, or discard this patch.
src/Grid.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -371,7 +371,7 @@  discard block
 block discarded – undo
371 371
 
372 372
         array_push($visible, '__row_selector__', '__actions__');
373 373
 
374
-        return $this->columns->filter(function (Column $column) use ($visible) {
374
+        return $this->columns->filter(function(Column $column) use ($visible) {
375 375
             return in_array($column->getName(), $visible);
376 376
         });
377 377
     }
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
 
392 392
         array_push($visible, '__row_selector__', '__actions__');
393 393
 
394
-        return collect($this->columnNames)->filter(function ($column) use ($visible) {
394
+        return collect($this->columnNames)->filter(function($column) use ($visible) {
395 395
             return in_array($column, $visible);
396 396
         });
397 397
     }
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
         $column = new Column($column, $label);
410 410
         $column->setGrid($this);
411 411
 
412
-        return tap($column, function ($value) {
412
+        return tap($column, function($value) {
413 413
             $this->columns->push($value);
414 414
         });
415 415
     }
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
         $column = new Column($column, $label);
428 428
         $column->setGrid($this);
429 429
 
430
-        return tap($column, function ($value) {
430
+        return tap($column, function($value) {
431 431
             $this->columns->prepend($value);
432 432
         });
433 433
     }
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
 
585 585
         Column::setOriginalGridModels($collection);
586 586
 
587
-        $this->columns->map(function (Column $column) use (&$data) {
587
+        $this->columns->map(function(Column $column) use (&$data) {
588 588
             $data = $column->fill($data);
589 589
 
590 590
             $this->columnNames[] = $column->getName();
@@ -688,7 +688,7 @@  discard block
 block discarded – undo
688 688
      */
689 689
     protected function buildRows(array $data)
690 690
     {
691
-        $this->rows = collect($data)->map(function ($model, $number) {
691
+        $this->rows = collect($data)->map(function($model, $number) {
692 692
             return new Row($number, $model);
693 693
         });
694 694
 
Please login to merge, or discard this patch.
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
      * Get or set option for grid.
277 277
      *
278 278
      * @param string $key
279
-     * @param mixed  $value
279
+     * @param boolean  $value
280 280
      *
281 281
      * @return $this|mixed
282 282
      */
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
     /**
467 467
      * Get the grid paginator.
468 468
      *
469
-     * @return mixed
469
+     * @return Tools\Paginator
470 470
      */
471 471
     public function paginator()
472 472
     {
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
     /**
519 519
      * Set grid action callback.
520 520
      *
521
-     * @param Closure|string $actions
521
+     * @param Closure $actions
522 522
      *
523 523
      * @return $this
524 524
      */
@@ -645,7 +645,7 @@  discard block
 block discarded – undo
645 645
      *
646 646
      * @param bool $toArray
647 647
      *
648
-     * @return array|Collection|mixed
648
+     * @return Collection
649 649
      */
650 650
     public function processFilter($toArray = true)
651 651
     {
@@ -895,7 +895,7 @@  discard block
 block discarded – undo
895 895
      *
896 896
      * @param Closure|null $closure
897 897
      *
898
-     * @return $this|Closure
898
+     * @return callable
899 899
      */
900 900
     public function header(Closure $closure = null)
901 901
     {
@@ -927,7 +927,7 @@  discard block
 block discarded – undo
927 927
      *
928 928
      * @param Closure|null $closure
929 929
      *
930
-     * @return $this|Closure
930
+     * @return callable
931 931
      */
932 932
     public function footer(Closure $closure = null)
933 933
     {
Please login to merge, or discard this patch.