@@ -13,7 +13,7 @@ |
||
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 | } |
@@ -13,7 +13,7 @@ |
||
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 | } |
@@ -13,7 +13,7 @@ |
||
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 | } |
@@ -419,7 +419,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -22,7 +22,7 @@ |
||
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 |