@@ -497,7 +497,7 @@ discard block |
||
497 | 497 | |
498 | 498 | $column = $this; |
499 | 499 | |
500 | - return $this->display(function ($value) use ($grid, $column, $abstract, $arguments) { |
|
500 | + return $this->display(function($value) use ($grid, $column, $abstract, $arguments) { |
|
501 | 501 | /** @var AbstractDisplayer $displayer */ |
502 | 502 | $displayer = new $abstract($value, $grid, $column, $this); |
503 | 503 | |
@@ -515,7 +515,7 @@ discard block |
||
515 | 515 | */ |
516 | 516 | public function using(array $values, $default = null) |
517 | 517 | { |
518 | - return $this->display(function ($value) use ($values, $default) { |
|
518 | + return $this->display(function($value) use ($values, $default) { |
|
519 | 519 | if (is_null($value)) { |
520 | 520 | return $default; |
521 | 521 | } |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | */ |
534 | 534 | public function replace(array $replacements) |
535 | 535 | { |
536 | - return $this->display(function ($value) use ($replacements) { |
|
536 | + return $this->display(function($value) use ($replacements) { |
|
537 | 537 | if (isset($replacements[$value])) { |
538 | 538 | return $replacements[$value]; |
539 | 539 | } |
@@ -551,7 +551,7 @@ discard block |
||
551 | 551 | */ |
552 | 552 | public function view($view) |
553 | 553 | { |
554 | - return $this->display(function ($value) use ($view) { |
|
554 | + return $this->display(function($value) use ($view) { |
|
555 | 555 | $model = $this; |
556 | 556 | |
557 | 557 | return view($view, compact('model', 'value'))->render(); |
@@ -591,7 +591,7 @@ discard block |
||
591 | 591 | */ |
592 | 592 | public function filesize() |
593 | 593 | { |
594 | - return $this->display(function ($value) { |
|
594 | + return $this->display(function($value) { |
|
595 | 595 | return file_size($value); |
596 | 596 | }); |
597 | 597 | } |
@@ -605,7 +605,7 @@ discard block |
||
605 | 605 | */ |
606 | 606 | public function gravatar($size = 30) |
607 | 607 | { |
608 | - return $this->display(function ($value) use ($size) { |
|
608 | + return $this->display(function($value) use ($size) { |
|
609 | 609 | $src = sprintf( |
610 | 610 | 'https://www.gravatar.com/avatar/%s?s=%d', |
611 | 611 | md5(strtolower($value)), |
@@ -626,7 +626,7 @@ discard block |
||
626 | 626 | */ |
627 | 627 | public function loading($values = [], $others = []) |
628 | 628 | { |
629 | - return $this->display(function ($value) use ($values, $others) { |
|
629 | + return $this->display(function($value) use ($values, $others) { |
|
630 | 630 | $values = (array) $values; |
631 | 631 | |
632 | 632 | if (in_array($value, $values)) { |
@@ -647,7 +647,7 @@ discard block |
||
647 | 647 | */ |
648 | 648 | public function icon(array $setting, $default = '') |
649 | 649 | { |
650 | - return $this->display(function ($value) use ($setting, $default) { |
|
650 | + return $this->display(function($value) use ($setting, $default) { |
|
651 | 651 | $fa = ''; |
652 | 652 | |
653 | 653 | if (isset($setting[$value])) { |
@@ -673,7 +673,7 @@ discard block |
||
673 | 673 | Carbon::setLocale($locale); |
674 | 674 | } |
675 | 675 | |
676 | - return $this->display(function ($value) { |
|
676 | + return $this->display(function($value) { |
|
677 | 677 | return Carbon::parse($value)->diffForHumans(); |
678 | 678 | }); |
679 | 679 | } |
@@ -687,7 +687,7 @@ discard block |
||
687 | 687 | */ |
688 | 688 | public function date($format) |
689 | 689 | { |
690 | - return $this->display(function ($value) use ($format) { |
|
690 | + return $this->display(function($value) use ($format) { |
|
691 | 691 | return date($format, strtotime($value)); |
692 | 692 | }); |
693 | 693 | } |
@@ -702,7 +702,7 @@ discard block |
||
702 | 702 | */ |
703 | 703 | public function bool(array $map = [], $default = false) |
704 | 704 | { |
705 | - return $this->display(function ($value) use ($map, $default) { |
|
705 | + return $this->display(function($value) use ($map, $default) { |
|
706 | 706 | $bool = empty($map) ? boolval($value) : Arr::get($map, $value, $default); |
707 | 707 | |
708 | 708 | return $bool ? '<i class="fa fa-check text-green"></i>' : '<i class="fa fa-close text-red"></i>'; |
@@ -724,7 +724,7 @@ discard block |
||
724 | 724 | |
725 | 725 | $grid = $this->grid; |
726 | 726 | |
727 | - return $this->display(function ($_, $column) use ($action, $grid) { |
|
727 | + return $this->display(function($_, $column) use ($action, $grid) { |
|
728 | 728 | /** @var RowAction $action */ |
729 | 729 | $action = new $action(); |
730 | 730 | |
@@ -746,7 +746,7 @@ discard block |
||
746 | 746 | */ |
747 | 747 | public function dot($options = [], $default = '') |
748 | 748 | { |
749 | - return $this->prefix(function ($_, $original) use ($options, $default) { |
|
749 | + return $this->prefix(function($_, $original) use ($options, $default) { |
|
750 | 750 | if (is_null($original)) { |
751 | 751 | $style = $default; |
752 | 752 | } else { |
@@ -873,7 +873,7 @@ discard block |
||
873 | 873 | $grid = $this->grid; |
874 | 874 | $column = $this; |
875 | 875 | |
876 | - $this->display(function ($value) use ($grid, $column, $class) { |
|
876 | + $this->display(function($value) use ($grid, $column, $class) { |
|
877 | 877 | /** @var AbstractDisplayer $definition */ |
878 | 878 | $definition = new $class($value, $grid, $column, $this); |
879 | 879 | |
@@ -891,7 +891,7 @@ discard block |
||
891 | 891 | protected function htmlEntityEncode($item) |
892 | 892 | { |
893 | 893 | if (is_array($item)) { |
894 | - array_walk_recursive($item, function (&$value) { |
|
894 | + array_walk_recursive($item, function(&$value) { |
|
895 | 895 | $value = htmlentities($value); |
896 | 896 | }); |
897 | 897 | } else { |
@@ -928,7 +928,7 @@ discard block |
||
928 | 928 | */ |
929 | 929 | protected function callSupportDisplayer($abstract, $arguments) |
930 | 930 | { |
931 | - return $this->display(function ($value) use ($abstract, $arguments) { |
|
931 | + return $this->display(function($value) use ($abstract, $arguments) { |
|
932 | 932 | if (is_array($value) || $value instanceof Arrayable) { |
933 | 933 | return call_user_func_array([collect($value), $abstract], $arguments); |
934 | 934 | } |
@@ -952,7 +952,7 @@ discard block |
||
952 | 952 | protected function callBuiltinDisplayer($abstract, $arguments) |
953 | 953 | { |
954 | 954 | if ($abstract instanceof Closure) { |
955 | - return $this->display(function ($value) use ($abstract, $arguments) { |
|
955 | + return $this->display(function($value) use ($abstract, $arguments) { |
|
956 | 956 | return $abstract->call($this, ...array_merge([$value], $arguments)); |
957 | 957 | }); |
958 | 958 | } |
@@ -961,7 +961,7 @@ discard block |
||
961 | 961 | $grid = $this->grid; |
962 | 962 | $column = $this; |
963 | 963 | |
964 | - return $this->display(function ($value) use ($abstract, $grid, $column, $arguments) { |
|
964 | + return $this->display(function($value) use ($abstract, $grid, $column, $arguments) { |
|
965 | 965 | /** @var AbstractDisplayer $displayer */ |
966 | 966 | $displayer = new $abstract($value, $grid, $column, $this); |
967 | 967 |