@@ -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 | |
@@ -850,7 +850,7 @@ discard block |
||
850 | 850 | $grid = $this->grid; |
851 | 851 | $column = $this; |
852 | 852 | |
853 | - $this->display(function ($value) use ($grid, $column, $class) { |
|
853 | + $this->display(function($value) use ($grid, $column, $class) { |
|
854 | 854 | /** @var AbstractDisplayer $definition */ |
855 | 855 | $definition = new $class($value, $grid, $column, $this); |
856 | 856 | |
@@ -868,7 +868,7 @@ discard block |
||
868 | 868 | protected function htmlEntityEncode($item) |
869 | 869 | { |
870 | 870 | if (is_array($item)) { |
871 | - array_walk_recursive($item, function (&$value) { |
|
871 | + array_walk_recursive($item, function(&$value) { |
|
872 | 872 | $value = htmlentities($value); |
873 | 873 | }); |
874 | 874 | } else { |
@@ -905,7 +905,7 @@ discard block |
||
905 | 905 | */ |
906 | 906 | protected function callSupportDisplayer($abstract, $arguments) |
907 | 907 | { |
908 | - return $this->display(function ($value) use ($abstract, $arguments) { |
|
908 | + return $this->display(function($value) use ($abstract, $arguments) { |
|
909 | 909 | if (is_array($value) || $value instanceof Arrayable) { |
910 | 910 | return call_user_func_array([collect($value), $abstract], $arguments); |
911 | 911 | } |
@@ -929,7 +929,7 @@ discard block |
||
929 | 929 | protected function callBuiltinDisplayer($abstract, $arguments) |
930 | 930 | { |
931 | 931 | if ($abstract instanceof Closure) { |
932 | - return $this->display(function ($value) use ($abstract, $arguments) { |
|
932 | + return $this->display(function($value) use ($abstract, $arguments) { |
|
933 | 933 | return $abstract->call($this, ...array_merge([$value], $arguments)); |
934 | 934 | }); |
935 | 935 | } |
@@ -938,7 +938,7 @@ discard block |
||
938 | 938 | $grid = $this->grid; |
939 | 939 | $column = $this; |
940 | 940 | |
941 | - return $this->display(function ($value) use ($abstract, $grid, $column, $arguments) { |
|
941 | + return $this->display(function($value) use ($abstract, $grid, $column, $arguments) { |
|
942 | 942 | /** @var AbstractDisplayer $displayer */ |
943 | 943 | $displayer = new $abstract($value, $grid, $column, $this); |
944 | 944 |