@@ -492,7 +492,7 @@ discard block |
||
| 492 | 492 | $name = $this->getName(); |
| 493 | 493 | $query = request()->query(); |
| 494 | 494 | |
| 495 | - $this->prefix(function ($_, $original) use ($name, $query) { |
|
| 495 | + $this->prefix(function($_, $original) use ($name, $query) { |
|
| 496 | 496 | Arr::set($query, $name, $original); |
| 497 | 497 | |
| 498 | 498 | $url = request()->fullUrlWithQuery($query); |
@@ -543,7 +543,7 @@ discard block |
||
| 543 | 543 | |
| 544 | 544 | $column = $this; |
| 545 | 545 | |
| 546 | - return $this->display(function ($value) use ($grid, $column, $abstract, $arguments) { |
|
| 546 | + return $this->display(function($value) use ($grid, $column, $abstract, $arguments) { |
|
| 547 | 547 | /** @var AbstractDisplayer $displayer */ |
| 548 | 548 | $displayer = new $abstract($value, $grid, $column, $this); |
| 549 | 549 | |
@@ -561,7 +561,7 @@ discard block |
||
| 561 | 561 | */ |
| 562 | 562 | public function using(array $values, $default = null) |
| 563 | 563 | { |
| 564 | - return $this->display(function ($value) use ($values, $default) { |
|
| 564 | + return $this->display(function($value) use ($values, $default) { |
|
| 565 | 565 | if (is_null($value)) { |
| 566 | 566 | return $default; |
| 567 | 567 | } |
@@ -579,7 +579,7 @@ discard block |
||
| 579 | 579 | */ |
| 580 | 580 | public function replace(array $replacements) |
| 581 | 581 | { |
| 582 | - return $this->display(function ($value) use ($replacements) { |
|
| 582 | + return $this->display(function($value) use ($replacements) { |
|
| 583 | 583 | if (isset($replacements[$value])) { |
| 584 | 584 | return $replacements[$value]; |
| 585 | 585 | } |
@@ -597,13 +597,13 @@ discard block |
||
| 597 | 597 | public function repeat($input, $seperator = '') |
| 598 | 598 | { |
| 599 | 599 | if (is_string($input)) { |
| 600 | - $input = function () use ($input) { |
|
| 600 | + $input = function() use ($input) { |
|
| 601 | 601 | return $input; |
| 602 | 602 | }; |
| 603 | 603 | } |
| 604 | 604 | |
| 605 | 605 | if ($input instanceof Closure) { |
| 606 | - return $this->display(function ($value) use ($input, $seperator) { |
|
| 606 | + return $this->display(function($value) use ($input, $seperator) { |
|
| 607 | 607 | return join($seperator, array_fill(0, (int) $value, $input->call($this, [$value]))); |
| 608 | 608 | }); |
| 609 | 609 | } |
@@ -620,7 +620,7 @@ discard block |
||
| 620 | 620 | */ |
| 621 | 621 | public function view($view) |
| 622 | 622 | { |
| 623 | - return $this->display(function ($value) use ($view) { |
|
| 623 | + return $this->display(function($value) use ($view) { |
|
| 624 | 624 | $model = $this; |
| 625 | 625 | |
| 626 | 626 | return view($view, compact('model', 'value'))->render(); |
@@ -660,7 +660,7 @@ discard block |
||
| 660 | 660 | */ |
| 661 | 661 | public function filesize() |
| 662 | 662 | { |
| 663 | - return $this->display(function ($value) { |
|
| 663 | + return $this->display(function($value) { |
|
| 664 | 664 | return file_size($value); |
| 665 | 665 | }); |
| 666 | 666 | } |
@@ -674,7 +674,7 @@ discard block |
||
| 674 | 674 | */ |
| 675 | 675 | public function gravatar($size = 30) |
| 676 | 676 | { |
| 677 | - return $this->display(function ($value) use ($size) { |
|
| 677 | + return $this->display(function($value) use ($size) { |
|
| 678 | 678 | $src = sprintf( |
| 679 | 679 | 'https://www.gravatar.com/avatar/%s?s=%d', |
| 680 | 680 | md5(strtolower($value)), |
@@ -695,7 +695,7 @@ discard block |
||
| 695 | 695 | */ |
| 696 | 696 | public function loading($values = [], $others = []) |
| 697 | 697 | { |
| 698 | - return $this->display(function ($value) use ($values, $others) { |
|
| 698 | + return $this->display(function($value) use ($values, $others) { |
|
| 699 | 699 | $values = (array) $values; |
| 700 | 700 | |
| 701 | 701 | if (in_array($value, $values)) { |
@@ -716,7 +716,7 @@ discard block |
||
| 716 | 716 | */ |
| 717 | 717 | public function icon(array $setting, $default = '') |
| 718 | 718 | { |
| 719 | - return $this->display(function ($value) use ($setting, $default) { |
|
| 719 | + return $this->display(function($value) use ($setting, $default) { |
|
| 720 | 720 | $fa = ''; |
| 721 | 721 | |
| 722 | 722 | if (isset($setting[$value])) { |
@@ -742,7 +742,7 @@ discard block |
||
| 742 | 742 | Carbon::setLocale($locale); |
| 743 | 743 | } |
| 744 | 744 | |
| 745 | - return $this->display(function ($value) { |
|
| 745 | + return $this->display(function($value) { |
|
| 746 | 746 | return Carbon::parse($value)->diffForHumans(); |
| 747 | 747 | }); |
| 748 | 748 | } |
@@ -756,7 +756,7 @@ discard block |
||
| 756 | 756 | */ |
| 757 | 757 | public function date($format) |
| 758 | 758 | { |
| 759 | - return $this->display(function ($value) use ($format) { |
|
| 759 | + return $this->display(function($value) use ($format) { |
|
| 760 | 760 | return date($format, strtotime($value)); |
| 761 | 761 | }); |
| 762 | 762 | } |
@@ -771,7 +771,7 @@ discard block |
||
| 771 | 771 | */ |
| 772 | 772 | public function bool(array $map = [], $default = false) |
| 773 | 773 | { |
| 774 | - return $this->display(function ($value) use ($map, $default) { |
|
| 774 | + return $this->display(function($value) use ($map, $default) { |
|
| 775 | 775 | $bool = empty($map) ? boolval($value) : Arr::get($map, $value, $default); |
| 776 | 776 | |
| 777 | 777 | return $bool ? '<i class="fa fa-check text-green"></i>' : '<i class="fa fa-close text-red"></i>'; |
@@ -786,7 +786,7 @@ discard block |
||
| 786 | 786 | */ |
| 787 | 787 | public function default($default = '-') |
| 788 | 788 | { |
| 789 | - return $this->display(function ($value) use ($default) { |
|
| 789 | + return $this->display(function($value) use ($default) { |
|
| 790 | 790 | return $value ?: $default; |
| 791 | 791 | }); |
| 792 | 792 | } |
@@ -806,7 +806,7 @@ discard block |
||
| 806 | 806 | |
| 807 | 807 | $grid = $this->grid; |
| 808 | 808 | |
| 809 | - return $this->display(function ($_, $column) use ($action, $grid) { |
|
| 809 | + return $this->display(function($_, $column) use ($action, $grid) { |
|
| 810 | 810 | /** @var RowAction $action */ |
| 811 | 811 | $action = new $action(); |
| 812 | 812 | |
@@ -828,7 +828,7 @@ discard block |
||
| 828 | 828 | */ |
| 829 | 829 | public function dot($options = [], $default = '') |
| 830 | 830 | { |
| 831 | - return $this->prefix(function ($_, $original) use ($options, $default) { |
|
| 831 | + return $this->prefix(function($_, $original) use ($options, $default) { |
|
| 832 | 832 | if (is_null($original)) { |
| 833 | 833 | $style = $default; |
| 834 | 834 | } else { |
@@ -983,7 +983,7 @@ discard block |
||
| 983 | 983 | $grid = $this->grid; |
| 984 | 984 | $column = $this; |
| 985 | 985 | |
| 986 | - $this->display(function ($value) use ($grid, $column, $class) { |
|
| 986 | + $this->display(function($value) use ($grid, $column, $class) { |
|
| 987 | 987 | /** @var AbstractDisplayer $definition */ |
| 988 | 988 | $definition = new $class($value, $grid, $column, $this); |
| 989 | 989 | |
@@ -1001,7 +1001,7 @@ discard block |
||
| 1001 | 1001 | protected function htmlEntityEncode($item) |
| 1002 | 1002 | { |
| 1003 | 1003 | if (is_array($item)) { |
| 1004 | - array_walk_recursive($item, function (&$value) { |
|
| 1004 | + array_walk_recursive($item, function(&$value) { |
|
| 1005 | 1005 | $value = htmlentities($value); |
| 1006 | 1006 | }); |
| 1007 | 1007 | } else { |
@@ -1038,7 +1038,7 @@ discard block |
||
| 1038 | 1038 | */ |
| 1039 | 1039 | protected function callSupportDisplayer($abstract, $arguments) |
| 1040 | 1040 | { |
| 1041 | - return $this->display(function ($value) use ($abstract, $arguments) { |
|
| 1041 | + return $this->display(function($value) use ($abstract, $arguments) { |
|
| 1042 | 1042 | if (is_array($value) || $value instanceof Arrayable) { |
| 1043 | 1043 | return call_user_func_array([collect($value), $abstract], $arguments); |
| 1044 | 1044 | } |
@@ -1062,7 +1062,7 @@ discard block |
||
| 1062 | 1062 | protected function callBuiltinDisplayer($abstract, $arguments) |
| 1063 | 1063 | { |
| 1064 | 1064 | if ($abstract instanceof Closure) { |
| 1065 | - return $this->display(function ($value) use ($abstract, $arguments) { |
|
| 1065 | + return $this->display(function($value) use ($abstract, $arguments) { |
|
| 1066 | 1066 | return $abstract->call($this, ...array_merge([$value], $arguments)); |
| 1067 | 1067 | }); |
| 1068 | 1068 | } |
@@ -1071,7 +1071,7 @@ discard block |
||
| 1071 | 1071 | $grid = $this->grid; |
| 1072 | 1072 | $column = $this; |
| 1073 | 1073 | |
| 1074 | - return $this->display(function ($value) use ($abstract, $grid, $column, $arguments) { |
|
| 1074 | + return $this->display(function($value) use ($abstract, $grid, $column, $arguments) { |
|
| 1075 | 1075 | /** @var AbstractDisplayer $displayer */ |
| 1076 | 1076 | $displayer = new $abstract($value, $grid, $column, $this); |
| 1077 | 1077 | |