Completed
Push — master ( 45c58c...e0e174 )
by jxlwqq
16s queued 12s
created
src/Show/Field.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
      */
193 193
     public function using(array $values, $default = null)
194 194
     {
195
-        return $this->as(function ($value) use ($values, $default) {
195
+        return $this->as(function($value) use ($values, $default) {
196 196
             if (is_null($value)) {
197 197
                 return $default;
198 198
             }
@@ -212,8 +212,8 @@  discard block
 block discarded – undo
212 212
      */
213 213
     public function image($server = '', $width = 200, $height = 200)
214 214
     {
215
-        return $this->unescape()->as(function ($images) use ($server, $width, $height) {
216
-            return collect($images)->map(function ($path) use ($server, $width, $height) {
215
+        return $this->unescape()->as(function($images) use ($server, $width, $height) {
216
+            return collect($images)->map(function($path) use ($server, $width, $height) {
217 217
                 if (empty($path)) {
218 218
                     return '';
219 219
                 }
@@ -248,8 +248,8 @@  discard block
 block discarded – undo
248 248
      */
249 249
     public function carousel($width = 300, $height = 200, $server = '')
250 250
     {
251
-        return $this->unescape()->as(function ($images) use ($server, $width, $height) {
252
-            $items = collect($images)->map(function ($path) use ($server, $width, $height) {
251
+        return $this->unescape()->as(function($images) use ($server, $width, $height) {
252
+            $items = collect($images)->map(function($path) use ($server, $width, $height) {
253 253
                 if (empty($path)) {
254 254
                     return '';
255 255
                 }
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
     {
290 290
         $field = $this;
291 291
 
292
-        return $this->unescape()->as(function ($path) use ($server, $download, $field) {
292
+        return $this->unescape()->as(function($path) use ($server, $download, $field) {
293 293
             $name = basename($path);
294 294
 
295 295
             $field->border = false;
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
      */
344 344
     public function link($href = '', $target = '_blank')
345 345
     {
346
-        return $this->unescape()->as(function ($link) use ($href, $target) {
346
+        return $this->unescape()->as(function($link) use ($href, $target) {
347 347
             $href = $href ?: $link;
348 348
 
349 349
             return "<a href='$href' target='{$target}'>{$link}</a>";
@@ -359,12 +359,12 @@  discard block
 block discarded – undo
359 359
      */
360 360
     public function label($style = 'success')
361 361
     {
362
-        return $this->unescape()->as(function ($value) use ($style) {
362
+        return $this->unescape()->as(function($value) use ($style) {
363 363
             if ($value instanceof Arrayable) {
364 364
                 $value = $value->toArray();
365 365
             }
366 366
 
367
-            return collect((array) $value)->map(function ($name) use ($style) {
367
+            return collect((array) $value)->map(function($name) use ($style) {
368 368
                 return "<span class='label label-{$style}'>$name</span>";
369 369
             })->implode('&nbsp;');
370 370
         });
@@ -379,12 +379,12 @@  discard block
 block discarded – undo
379 379
      */
380 380
     public function badge($style = 'blue')
381 381
     {
382
-        return $this->unescape()->as(function ($value) use ($style) {
382
+        return $this->unescape()->as(function($value) use ($style) {
383 383
             if ($value instanceof Arrayable) {
384 384
                 $value = $value->toArray();
385 385
             }
386 386
 
387
-            return collect((array) $value)->map(function ($name) use ($style) {
387
+            return collect((array) $value)->map(function($name) use ($style) {
388 388
                 return "<span class='badge bg-{$style}'>$name</span>";
389 389
             })->implode('&nbsp;');
390 390
         });
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
      */
401 401
     public function number($decimals = 0, $decimal_seperator = '.', $thousands_seperator = ',')
402 402
     {
403
-        return $this->unescape()->as(function ($value) use ($decimals, $decimal_seperator, $thousands_seperator) {
403
+        return $this->unescape()->as(function($value) use ($decimals, $decimal_seperator, $thousands_seperator) {
404 404
             return number_format($value, $decimals, $decimal_seperator, $thousands_seperator);
405 405
         });
406 406
     }
@@ -414,7 +414,7 @@  discard block
 block discarded – undo
414 414
     {
415 415
         $field = $this;
416 416
 
417
-        return $this->unescape()->as(function ($value) use ($field) {
417
+        return $this->unescape()->as(function($value) use ($field) {
418 418
             if (is_string($value)) {
419 419
                 $content = json_decode($value, true);
420 420
             } else {
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
      */
439 439
     public function filesize()
440 440
     {
441
-        return $this->as(function ($value) {
441
+        return $this->as(function($value) {
442 442
             return file_size($value);
443 443
         });
444 444
     }
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
 
597 597
         $field = $this;
598 598
 
599
-        return $this->as(function ($value) use ($extend, $field, $arguments) {
599
+        return $this->as(function($value) use ($extend, $field, $arguments) {
600 600
             if (!$extend->border) {
601 601
                 $field->border = false;
602 602
             }
@@ -655,7 +655,7 @@  discard block
 block discarded – undo
655 655
     public function render()
656 656
     {
657 657
         if ($this->showAs->isNotEmpty()) {
658
-            $this->showAs->each(function ($callable) {
658
+            $this->showAs->each(function($callable) {
659 659
                 $this->value = $callable->call(
660 660
                     $this->parent->getModel(),
661 661
                     $this->value
Please login to merge, or discard this patch.