Completed
Pull Request — master (#5883)
by
unknown
28s
created
src/AdminServiceProvider.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -90,11 +90,11 @@  discard block
 block discarded – undo
90 90
 
91 91
         $this->compatibleBlade();
92 92
 
93
-        Blade::directive('box', function ($title) {
93
+        Blade::directive('box', function($title) {
94 94
             return "<?php \$box = new \Encore\Admin\Widgets\Box({$title}, '";
95 95
         });
96 96
 
97
-        Blade::directive('endbox', function ($expression) {
97
+        Blade::directive('endbox', function($expression) {
98 98
             return "'); echo \$box->render(); ?>";
99 99
         });
100 100
 
@@ -153,8 +153,8 @@  discard block
 block discarded – undo
153 153
      */
154 154
     protected function macroRouter()
155 155
     {
156
-        Router::macro('content', function ($uri, $content, $options = []) {
157
-            return $this->match(['GET', 'HEAD'], $uri, function (Content $layout) use ($content, $options) {
156
+        Router::macro('content', function($uri, $content, $options = []) {
157
+            return $this->match(['GET', 'HEAD'], $uri, function(Content $layout) use ($content, $options) {
158 158
                 return $layout
159 159
                     ->title(Arr::get($options, 'title', ' '))
160 160
                     ->description(Arr::get($options, 'desc', ' '))
@@ -162,8 +162,8 @@  discard block
 block discarded – undo
162 162
             });
163 163
         });
164 164
 
165
-        Router::macro('component', function ($uri, $component, $data = [], $options = []) {
166
-            return $this->match(['GET', 'HEAD'], $uri, function (Content $layout) use ($component, $data, $options) {
165
+        Router::macro('component', function($uri, $component, $data = [], $options = []) {
166
+            return $this->match(['GET', 'HEAD'], $uri, function(Content $layout) use ($component, $data, $options) {
167 167
                 return $layout
168 168
                     ->title(Arr::get($options, 'title', ' '))
169 169
                     ->description(Arr::get($options, 'desc', ' '))
Please login to merge, or discard this patch.
src/Show/Field.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
      */
190 190
     public function bool()
191 191
     {
192
-        return $this->as(function ($val) {
192
+        return $this->as(function($val) {
193 193
             return is_null($val) ? 'Undefined' : ($val ? 'Yes' : 'No');
194 194
         });
195 195
     }
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
      */
202 202
     public function check()
203 203
     {
204
-        return $this->unescape()->as(function ($val) {
204
+        return $this->unescape()->as(function($val) {
205 205
             return is_null($val) ? '<i class="fa fa-check text-gray"></i>' : ($val ? '<i class="fa fa-check text-green"></i>' : '<i class="fa fa-close text-red"></i>');
206 206
         });
207 207
     }
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 
244 244
     public static function _jsonParse()
245 245
     {
246
-        return function ($val) {
246
+        return function($val) {
247 247
             $json = json_decode($val, true);
248 248
             if (!$json || !is_array($json))
249 249
                 return e($val);
@@ -272,7 +272,7 @@  discard block
 block discarded – undo
272 272
      */
273 273
     public function using(array $values, $default = null)
274 274
     {
275
-        return $this->as(function ($value) use ($values, $default) {
275
+        return $this->as(function($value) use ($values, $default) {
276 276
             if (is_null($value)) {
277 277
                 return $default;
278 278
             }
@@ -292,8 +292,8 @@  discard block
 block discarded – undo
292 292
      */
293 293
     public function image($server = '', $width = 200, $height = 200)
294 294
     {
295
-        return $this->unescape()->as(function ($images) use ($server, $width, $height) {
296
-            return collect($images)->map(function ($path) use ($server, $width, $height) {
295
+        return $this->unescape()->as(function($images) use ($server, $width, $height) {
296
+            return collect($images)->map(function($path) use ($server, $width, $height) {
297 297
                 if (empty($path)) {
298 298
                     return '';
299 299
                 }
@@ -328,8 +328,8 @@  discard block
 block discarded – undo
328 328
      */
329 329
     public function carousel($width = 300, $height = 200, $server = '')
330 330
     {
331
-        return $this->unescape()->as(function ($images) use ($server, $width, $height) {
332
-            $items = collect($images)->map(function ($path) use ($server, $width, $height) {
331
+        return $this->unescape()->as(function($images) use ($server, $width, $height) {
332
+            $items = collect($images)->map(function($path) use ($server, $width, $height) {
333 333
                 if (empty($path)) {
334 334
                     return '';
335 335
                 }
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
     {
370 370
         $field = $this;
371 371
 
372
-        return $this->unescape()->as(function ($path) use ($server, $download, $field) {
372
+        return $this->unescape()->as(function($path) use ($server, $download, $field) {
373 373
             $name = basename($path);
374 374
 
375 375
             $field->border = false;
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
      */
424 424
     public function link($href = '', $target = '_blank')
425 425
     {
426
-        return $this->unescape()->as(function ($link) use ($href, $target) {
426
+        return $this->unescape()->as(function($link) use ($href, $target) {
427 427
             $href = $href ?: $link;
428 428
 
429 429
             return "<a href='$href' target='{$target}'>{$link}</a>";
@@ -439,12 +439,12 @@  discard block
 block discarded – undo
439 439
      */
440 440
     public function label($style = 'success')
441 441
     {
442
-        return $this->unescape()->as(function ($value) use ($style) {
442
+        return $this->unescape()->as(function($value) use ($style) {
443 443
             if ($value instanceof Arrayable) {
444 444
                 $value = $value->toArray();
445 445
             }
446 446
 
447
-            return collect((array) $value)->map(function ($name) use ($style) {
447
+            return collect((array) $value)->map(function($name) use ($style) {
448 448
                 return "<span class='label label-{$style}'>$name</span>";
449 449
             })->implode('&nbsp;');
450 450
         });
@@ -459,12 +459,12 @@  discard block
 block discarded – undo
459 459
      */
460 460
     public function badge($style = 'blue')
461 461
     {
462
-        return $this->unescape()->as(function ($value) use ($style) {
462
+        return $this->unescape()->as(function($value) use ($style) {
463 463
             if ($value instanceof Arrayable) {
464 464
                 $value = $value->toArray();
465 465
             }
466 466
 
467
-            return collect((array) $value)->map(function ($name) use ($style) {
467
+            return collect((array) $value)->map(function($name) use ($style) {
468 468
                 return "<span class='badge bg-{$style}'>$name</span>";
469 469
             })->implode('&nbsp;');
470 470
         });
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
      */
482 482
     public function number($decimals = 0, $decimal_seperator = '.', $thousands_seperator = ',')
483 483
     {
484
-        return $this->unescape()->as(function ($value) use ($decimals, $decimal_seperator, $thousands_seperator) {
484
+        return $this->unescape()->as(function($value) use ($decimals, $decimal_seperator, $thousands_seperator) {
485 485
             return number_format($value, $decimals, $decimal_seperator, $thousands_seperator);
486 486
         });
487 487
     }
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
     {
496 496
         $field = $this;
497 497
 
498
-        return $this->unescape()->as(function ($value) use ($field) {
498
+        return $this->unescape()->as(function($value) use ($field) {
499 499
             if (is_string($value)) {
500 500
                 $content = json_decode($value, true);
501 501
             } else {
@@ -519,7 +519,7 @@  discard block
 block discarded – undo
519 519
      */
520 520
     public function filesize()
521 521
     {
522
-        return $this->as(function ($value) {
522
+        return $this->as(function($value) {
523 523
             return file_size($value);
524 524
         });
525 525
     }
@@ -677,7 +677,7 @@  discard block
 block discarded – undo
677 677
 
678 678
         $field = $this;
679 679
 
680
-        return $this->as(function ($value) use ($extend, $field, $arguments) {
680
+        return $this->as(function($value) use ($extend, $field, $arguments) {
681 681
             if (!$extend->border) {
682 682
                 $field->border = false;
683 683
             }
@@ -736,7 +736,7 @@  discard block
 block discarded – undo
736 736
     public function render()
737 737
     {
738 738
         if ($this->showAs->isNotEmpty()) {
739
-            $this->showAs->each(function ($callable) {
739
+            $this->showAs->each(function($callable) {
740 740
                 $this->value = $callable->call(
741 741
                     $this->parent->getModel(),
742 742
                     $this->value
Please login to merge, or discard this patch.
src/Form/Field/Textarea.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
      */
43 43
     public function json(): self
44 44
     {
45
-        $this->customFormat = function ($val) {
45
+        $this->customFormat = function($val) {
46 46
             $json = json_decode($val);
47 47
             return !$val || json_last_error() !== JSON_ERROR_NONE
48 48
                 ? $val
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             $this->value = json_encode($this->value, JSON_PRETTY_PRINT);
66 66
         }
67 67
 
68
-        $this->mountPicker(function ($btn) {
68
+        $this->mountPicker(function($btn) {
69 69
             $this->addPickBtn($btn);
70 70
         });
71 71
 
Please login to merge, or discard this patch.
src/Listeners/AuthListener.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 
12 12
 class AuthListener
13 13
 {
14
-    public function handle(Authenticated|Failed $event): void
14
+    public function handle(Authenticated | Failed $event): void
15 15
     {
16 16
         if ($event instanceof Authenticated && !empty($event->user->is_blocked)) {
17 17
             $this->logout($event->user, true);
Please login to merge, or discard this patch.