Completed
Pull Request — master (#5661)
by
unknown
37s
created
src/Show/Field.php 1 patch
Spacing   +17 added lines, -17 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
         });
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
      */
402 402
     public function number($decimals = 0, $decimal_seperator = '.', $thousands_seperator = ',')
403 403
     {
404
-        return $this->unescape()->as(function ($value) use ($decimals, $decimal_seperator, $thousands_seperator) {
404
+        return $this->unescape()->as(function($value) use ($decimals, $decimal_seperator, $thousands_seperator) {
405 405
             return number_format($value, $decimals, $decimal_seperator, $thousands_seperator);
406 406
         });
407 407
     }
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
     {
416 416
         $field = $this;
417 417
 
418
-        return $this->unescape()->as(function ($value) use ($field) {
418
+        return $this->unescape()->as(function($value) use ($field) {
419 419
             if (is_string($value)) {
420 420
                 $content = json_decode($value, true);
421 421
             } else {
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
             if (json_last_error() == 0) {
426 426
                 $field->border = false;
427 427
 
428
-                return '<pre><code>'.json_encode($content, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE).'</code></pre>';
428
+                return '<pre><code>'.json_encode($content, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE).'</code></pre>';
429 429
             }
430 430
 
431 431
             return $value;
@@ -439,7 +439,7 @@  discard block
 block discarded – undo
439 439
      */
440 440
     public function filesize()
441 441
     {
442
-        return $this->as(function ($value) {
442
+        return $this->as(function($value) {
443 443
             return file_size($value);
444 444
         });
445 445
     }
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
 
598 598
         $field = $this;
599 599
 
600
-        return $this->as(function ($value) use ($extend, $field, $arguments) {
600
+        return $this->as(function($value) use ($extend, $field, $arguments) {
601 601
             if (!$extend->border) {
602 602
                 $field->border = false;
603 603
             }
@@ -656,7 +656,7 @@  discard block
 block discarded – undo
656 656
     public function render()
657 657
     {
658 658
         if ($this->showAs->isNotEmpty()) {
659
-            $this->showAs->each(function ($callable) {
659
+            $this->showAs->each(function($callable) {
660 660
                 $this->value = $callable->call(
661 661
                     $this->parent->getModel(),
662 662
                     $this->value
Please login to merge, or discard this patch.