@@ -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 ($value, $column) use ($action, $grid) { |
|
727 | + return $this->display(function($value, $column) use ($action, $grid) { |
|
728 | 728 | /** @var RowAction $action */ |
729 | 729 | $action = new $action(); |
730 | 730 | |
@@ -743,7 +743,7 @@ discard block |
||
743 | 743 | */ |
744 | 744 | public function dot($options = [], $default = '') |
745 | 745 | { |
746 | - return $this->prefix(function ($_, $original) use ($options, $default) { |
|
746 | + return $this->prefix(function($_, $original) use ($options, $default) { |
|
747 | 747 | if (is_null($original)) { |
748 | 748 | $style = $default; |
749 | 749 | } else { |
@@ -870,7 +870,7 @@ discard block |
||
870 | 870 | $grid = $this->grid; |
871 | 871 | $column = $this; |
872 | 872 | |
873 | - $this->display(function ($value) use ($grid, $column, $class) { |
|
873 | + $this->display(function($value) use ($grid, $column, $class) { |
|
874 | 874 | /** @var AbstractDisplayer $definition */ |
875 | 875 | $definition = new $class($value, $grid, $column, $this); |
876 | 876 | |
@@ -888,7 +888,7 @@ discard block |
||
888 | 888 | protected function htmlEntityEncode($item) |
889 | 889 | { |
890 | 890 | if (is_array($item)) { |
891 | - array_walk_recursive($item, function (&$value) { |
|
891 | + array_walk_recursive($item, function(&$value) { |
|
892 | 892 | $value = htmlentities($value); |
893 | 893 | }); |
894 | 894 | } else { |
@@ -925,7 +925,7 @@ discard block |
||
925 | 925 | */ |
926 | 926 | protected function callSupportDisplayer($abstract, $arguments) |
927 | 927 | { |
928 | - return $this->display(function ($value) use ($abstract, $arguments) { |
|
928 | + return $this->display(function($value) use ($abstract, $arguments) { |
|
929 | 929 | if (is_array($value) || $value instanceof Arrayable) { |
930 | 930 | return call_user_func_array([collect($value), $abstract], $arguments); |
931 | 931 | } |
@@ -949,7 +949,7 @@ discard block |
||
949 | 949 | protected function callBuiltinDisplayer($abstract, $arguments) |
950 | 950 | { |
951 | 951 | if ($abstract instanceof Closure) { |
952 | - return $this->display(function ($value) use ($abstract, $arguments) { |
|
952 | + return $this->display(function($value) use ($abstract, $arguments) { |
|
953 | 953 | return $abstract->call($this, ...array_merge([$value], $arguments)); |
954 | 954 | }); |
955 | 955 | } |
@@ -958,7 +958,7 @@ discard block |
||
958 | 958 | $grid = $this->grid; |
959 | 959 | $column = $this; |
960 | 960 | |
961 | - return $this->display(function ($value) use ($abstract, $grid, $column, $arguments) { |
|
961 | + return $this->display(function($value) use ($abstract, $grid, $column, $arguments) { |
|
962 | 962 | /** @var AbstractDisplayer $displayer */ |
963 | 963 | $displayer = new $abstract($value, $grid, $column, $this); |
964 | 964 |