Completed
Pull Request — master (#3550)
by
unknown
02:27
created
src/Grid/Tools/ColumnSelector.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
         $show = $this->grid->visibleColumnNames();
48 48
 
49
-        $lists = $this->getGridColumns()->map(function ($label, $key) use ($show) {
49
+        $lists = $this->getGridColumns()->map(function($label, $key) use ($show) {
50 50
             if (empty($show)) {
51 51
                 $checked = 'checked';
52 52
             } else {
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      */
99 99
     protected function getGridColumns()
100 100
     {
101
-        return $this->grid->columns()->map(function (Grid\Column $column) {
101
+        return $this->grid->columns()->map(function(Grid\Column $column) {
102 102
             $name = $column->getName();
103 103
 
104 104
             if ($this->isColumnIgnored($name)) {
Please login to merge, or discard this patch.
src/Grid/Displayers/Label.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)->map(function ($item) use ($style) {
16
+        return collect((array) $this->value)->map(function($item) use ($style) {
17 17
             if (is_array($style)) {
18 18
                 $style = Arr::get($style, $this->getColumn()->getOriginal(), 'success');
19 19
             }
Please login to merge, or discard this patch.
src/Grid/Displayers/Badge.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)->map(function ($name) use ($style) {
16
+        return collect((array) $this->value)->map(function($name) use ($style) {
17 17
             if (is_array($style)) {
18 18
                 $style = Arr::get($style, $this->getColumn()->getOriginal(), 'red');
19 19
             }
Please login to merge, or discard this patch.
src/Grid/Displayers/Download.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/Column.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
 
420 420
         $column = $this;
421 421
 
422
-        return $this->display(function ($value) use ($grid, $column, $abstract, $arguments) {
422
+        return $this->display(function($value) use ($grid, $column, $abstract, $arguments) {
423 423
             /** @var AbstractDisplayer $displayer */
424 424
             $displayer = new $abstract($value, $grid, $column, $this);
425 425
 
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
      */
438 438
     public function using(array $values, $default = null)
439 439
     {
440
-        return $this->display(function ($value) use ($values, $default) {
440
+        return $this->display(function($value) use ($values, $default) {
441 441
             if (is_null($value)) {
442 442
                 return $default;
443 443
             }
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
      */
456 456
     public function replace(array $replacements)
457 457
     {
458
-        return $this->display(function ($value) use ($replacements) {
458
+        return $this->display(function($value) use ($replacements) {
459 459
             if (isset($replacements[$value])) {
460 460
                 return $replacements[$value];
461 461
             }
@@ -473,7 +473,7 @@  discard block
 block discarded – undo
473 473
      */
474 474
     public function view($view)
475 475
     {
476
-        return $this->display(function ($value) use ($view) {
476
+        return $this->display(function($value) use ($view) {
477 477
             $model = $this;
478 478
 
479 479
             return view($view, compact('model', 'value'))->render();
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
      */
514 514
     public function filesize()
515 515
     {
516
-        return $this->display(function ($value) {
516
+        return $this->display(function($value) {
517 517
             return file_size($value);
518 518
         });
519 519
     }
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
      */
528 528
     public function gravatar($size = 30)
529 529
     {
530
-        return $this->display(function ($value) use ($size) {
530
+        return $this->display(function($value) use ($size) {
531 531
             $src = sprintf(
532 532
                 'https://www.gravatar.com/avatar/%s?s=%d',
533 533
                 md5(strtolower($value)),
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
      */
549 549
     public function loading($values = [], $others = [])
550 550
     {
551
-        return $this->display(function ($value) use ($values, $others) {
551
+        return $this->display(function($value) use ($values, $others) {
552 552
             $values = (array) $values;
553 553
 
554 554
             if (in_array($value, $values)) {
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
      */
570 570
     public function icon(array $setting, $default = '')
571 571
     {
572
-        return $this->display(function ($value) use ($setting, $default) {
572
+        return $this->display(function($value) use ($setting, $default) {
573 573
             $fa = '';
574 574
 
575 575
             if (isset($setting[$value])) {
@@ -595,7 +595,7 @@  discard block
 block discarded – undo
595 595
             Carbon::setLocale($locale);
596 596
         }
597 597
 
598
-        return $this->display(function ($value) {
598
+        return $this->display(function($value) {
599 599
             return Carbon::parse($value)->diffForHumans();
600 600
         });
601 601
     }
@@ -716,7 +716,7 @@  discard block
 block discarded – undo
716 716
         $grid = $this->grid;
717 717
         $column = $this;
718 718
 
719
-        $this->display(function ($value) use ($grid, $column, $class) {
719
+        $this->display(function($value) use ($grid, $column, $class) {
720 720
             /** @var AbstractDisplayer $definition */
721 721
             $definition = new $class($value, $grid, $column, $this);
722 722
 
@@ -734,7 +734,7 @@  discard block
 block discarded – undo
734 734
     protected function htmlEntityEncode($item)
735 735
     {
736 736
         if (is_array($item)) {
737
-            array_walk_recursive($item, function (&$value) {
737
+            array_walk_recursive($item, function(&$value) {
738 738
                 $value = htmlentities($value);
739 739
             });
740 740
         } else {
@@ -822,7 +822,7 @@  discard block
 block discarded – undo
822 822
             'content'   => $this->help,
823 823
         ];
824 824
 
825
-        $data = collect($data)->map(function ($val, $key) {
825
+        $data = collect($data)->map(function($val, $key) {
826 826
             return "data-{$key}=\"{$val}\"";
827 827
         })->implode(' ');
828 828
 
@@ -860,7 +860,7 @@  discard block
 block discarded – undo
860 860
      */
861 861
     protected function callSupportDisplayer($abstract, $arguments)
862 862
     {
863
-        return $this->display(function ($value) use ($abstract, $arguments) {
863
+        return $this->display(function($value) use ($abstract, $arguments) {
864 864
             if (is_array($value) || $value instanceof Arrayable) {
865 865
                 return call_user_func_array([collect($value), $abstract], $arguments);
866 866
             }
@@ -884,7 +884,7 @@  discard block
 block discarded – undo
884 884
     protected function callBuiltinDisplayer($abstract, $arguments)
885 885
     {
886 886
         if ($abstract instanceof Closure) {
887
-            return $this->display(function ($value) use ($abstract, $arguments) {
887
+            return $this->display(function($value) use ($abstract, $arguments) {
888 888
                 return $abstract->call($this, ...array_merge([$value], $arguments));
889 889
             });
890 890
         }
@@ -893,7 +893,7 @@  discard block
 block discarded – undo
893 893
             $grid = $this->grid;
894 894
             $column = $this;
895 895
 
896
-            return $this->display(function ($value) use ($abstract, $grid, $column, $arguments) {
896
+            return $this->display(function($value) use ($abstract, $grid, $column, $arguments) {
897 897
                 /** @var AbstractDisplayer $displayer */
898 898
                 $displayer = new $abstract($value, $grid, $column, $this);
899 899
 
Please login to merge, or discard this patch.
src/Auth/Permission.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
         }
23 23
 
24 24
         if (is_array($permission)) {
25
-            collect($permission)->each(function ($permission) {
25
+            collect($permission)->each(function($permission) {
26 26
                 call_user_func([self::class, 'check'], $permission);
27 27
             });
28 28
 
Please login to merge, or discard this patch.
src/Console/PermissionCommand.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -137,19 +137,19 @@  discard block
 block discarded – undo
137 137
         $resource = Str::kebab(Str::camel($table));
138 138
         switch ($permission) {
139 139
             case 'create':
140
-                $http_path = '/' . $resource;
140
+                $http_path = '/'.$resource;
141 141
                 break;
142 142
             case 'edit':
143
-                $http_path = '/' . $resource . '/*';
143
+                $http_path = '/'.$resource.'/*';
144 144
                 break;
145 145
             case 'delete':
146
-                $http_path = '/' . $resource . '/*';
146
+                $http_path = '/'.$resource.'/*';
147 147
                 break;
148 148
             case 'index':
149
-                $http_path = '/' . $resource;
149
+                $http_path = '/'.$resource;
150 150
                 break;
151 151
             case 'view':
152
-                $http_path = '/' . $resource . '/*';
152
+                $http_path = '/'.$resource.'/*';
153 153
                 break;
154 154
             default:
155 155
                 $http_path = '';
@@ -160,11 +160,11 @@  discard block
 block discarded – undo
160 160
 
161 161
     private function generateSlug($table, $permission)
162 162
     {
163
-        return Str::kebab(Str::camel($table)) . '.' . $permission;
163
+        return Str::kebab(Str::camel($table)).'.'.$permission;
164 164
     }
165 165
 
166 166
     private function generateName($table, $permission_lang)
167 167
     {
168
-        return Str::upper(Str::kebab(Str::camel($table))) . $permission_lang;
168
+        return Str::upper(Str::kebab(Str::camel($table))).$permission_lang;
169 169
     }
170 170
 }
Please login to merge, or discard this patch.
src/Show/Field.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
      */
192 192
     public function using(array $values, $default = null)
193 193
     {
194
-        return $this->as(function ($value) use ($values, $default) {
194
+        return $this->as(function($value) use ($values, $default) {
195 195
             if (is_null($value)) {
196 196
                 return $default;
197 197
             }
@@ -211,8 +211,8 @@  discard block
 block discarded – undo
211 211
      */
212 212
     public function image($server = '', $width = 200, $height = 200)
213 213
     {
214
-        return $this->unescape()->as(function ($images) use ($server, $width, $height) {
215
-            return collect($images)->map(function ($path) use ($server, $width, $height) {
214
+        return $this->unescape()->as(function($images) use ($server, $width, $height) {
215
+            return collect($images)->map(function($path) use ($server, $width, $height) {
216 216
                 if (empty($path)) {
217 217
                     return '';
218 218
                 }
@@ -247,8 +247,8 @@  discard block
 block discarded – undo
247 247
      */
248 248
     public function carousel($width = 300, $height = 200, $server = '')
249 249
     {
250
-        return $this->unescape()->as(function ($images) use ($server, $width, $height) {
251
-            $items = collect($images)->map(function ($path) use ($server, $width, $height) {
250
+        return $this->unescape()->as(function($images) use ($server, $width, $height) {
251
+            $items = collect($images)->map(function($path) use ($server, $width, $height) {
252 252
                 if (empty($path)) {
253 253
                     return '';
254 254
                 }
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
     {
289 289
         $field = $this;
290 290
 
291
-        return $this->unescape()->as(function ($path) use ($server, $download, $field) {
291
+        return $this->unescape()->as(function($path) use ($server, $download, $field) {
292 292
             $name = basename($path);
293 293
 
294 294
             $field->border = false;
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
      */
343 343
     public function link($href = '', $target = '_blank')
344 344
     {
345
-        return $this->unescape()->as(function ($link) use ($href, $target) {
345
+        return $this->unescape()->as(function($link) use ($href, $target) {
346 346
             $href = $href ?: $link;
347 347
 
348 348
             return "<a href='$href' target='{$target}'>{$link}</a>";
@@ -358,12 +358,12 @@  discard block
 block discarded – undo
358 358
      */
359 359
     public function label($style = 'success')
360 360
     {
361
-        return $this->unescape()->as(function ($value) use ($style) {
361
+        return $this->unescape()->as(function($value) use ($style) {
362 362
             if ($value instanceof Arrayable) {
363 363
                 $value = $value->toArray();
364 364
             }
365 365
 
366
-            return collect((array) $value)->map(function ($name) use ($style) {
366
+            return collect((array) $value)->map(function($name) use ($style) {
367 367
                 return "<span class='label label-{$style}'>$name</span>";
368 368
             })->implode('&nbsp;');
369 369
         });
@@ -378,12 +378,12 @@  discard block
 block discarded – undo
378 378
      */
379 379
     public function badge($style = 'blue')
380 380
     {
381
-        return $this->unescape()->as(function ($value) use ($style) {
381
+        return $this->unescape()->as(function($value) use ($style) {
382 382
             if ($value instanceof Arrayable) {
383 383
                 $value = $value->toArray();
384 384
             }
385 385
 
386
-            return collect((array) $value)->map(function ($name) use ($style) {
386
+            return collect((array) $value)->map(function($name) use ($style) {
387 387
                 return "<span class='badge bg-{$style}'>$name</span>";
388 388
             })->implode('&nbsp;');
389 389
         });
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
     {
399 399
         $field = $this;
400 400
 
401
-        return $this->unescape()->as(function ($value) use ($field) {
401
+        return $this->unescape()->as(function($value) use ($field) {
402 402
             $content = json_decode($value ?: '', true);
403 403
 
404 404
             if (json_last_error() == 0) {
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
      */
419 419
     public function filesize()
420 420
     {
421
-        return $this->as(function ($value) {
421
+        return $this->as(function($value) {
422 422
             return file_size($value);
423 423
         });
424 424
     }
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
 
558 558
         $field = $this;
559 559
 
560
-        return $this->as(function ($value) use ($extend, $field, $arguments) {
560
+        return $this->as(function($value) use ($extend, $field, $arguments) {
561 561
             if (!$extend->border) {
562 562
                 $field->border = false;
563 563
             }
@@ -616,7 +616,7 @@  discard block
 block discarded – undo
616 616
     public function render()
617 617
     {
618 618
         if ($this->showAs->isNotEmpty()) {
619
-            $this->showAs->each(function ($callable) {
619
+            $this->showAs->each(function($callable) {
620 620
                 $this->value = $callable->call(
621 621
                     $this->parent->getModel(),
622 622
                     $this->value
Please login to merge, or discard this patch.