@@ -55,7 +55,6 @@ |
||
55 | 55 | } |
56 | 56 | |
57 | 57 | /** |
58 | - * @param int $multiple |
|
59 | 58 | * |
60 | 59 | * @return string |
61 | 60 | */ |
@@ -27,7 +27,7 @@ |
||
27 | 27 | return Admin::component('admin::components.column-expand', [ |
28 | 28 | 'key' => $this->getKey(), |
29 | 29 | 'url' => $this->getLoadUrl(), |
30 | - 'name' => $this->column->getName() . '-' . $this->getKey(), |
|
30 | + 'name' => $this->column->getName().'-'.$this->getKey(), |
|
31 | 31 | 'html' => $html, |
32 | 32 | 'value' => $this->value, |
33 | 33 | 'async' => $async, |
@@ -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,7 +597,7 @@ discard block |
||
597 | 597 | */ |
598 | 598 | public function view($view) |
599 | 599 | { |
600 | - return $this->display(function ($value) use ($view) { |
|
600 | + return $this->display(function($value) use ($view) { |
|
601 | 601 | $model = $this; |
602 | 602 | |
603 | 603 | return view($view, compact('model', 'value'))->render(); |
@@ -637,7 +637,7 @@ discard block |
||
637 | 637 | */ |
638 | 638 | public function filesize() |
639 | 639 | { |
640 | - return $this->display(function ($value) { |
|
640 | + return $this->display(function($value) { |
|
641 | 641 | return file_size($value); |
642 | 642 | }); |
643 | 643 | } |
@@ -651,7 +651,7 @@ discard block |
||
651 | 651 | */ |
652 | 652 | public function gravatar($size = 30) |
653 | 653 | { |
654 | - return $this->display(function ($value) use ($size) { |
|
654 | + return $this->display(function($value) use ($size) { |
|
655 | 655 | $src = sprintf( |
656 | 656 | 'https://www.gravatar.com/avatar/%s?s=%d', |
657 | 657 | md5(strtolower($value)), |
@@ -672,7 +672,7 @@ discard block |
||
672 | 672 | */ |
673 | 673 | public function loading($values = [], $others = []) |
674 | 674 | { |
675 | - return $this->display(function ($value) use ($values, $others) { |
|
675 | + return $this->display(function($value) use ($values, $others) { |
|
676 | 676 | $values = (array) $values; |
677 | 677 | |
678 | 678 | if (in_array($value, $values)) { |
@@ -693,7 +693,7 @@ discard block |
||
693 | 693 | */ |
694 | 694 | public function icon(array $setting, $default = '') |
695 | 695 | { |
696 | - return $this->display(function ($value) use ($setting, $default) { |
|
696 | + return $this->display(function($value) use ($setting, $default) { |
|
697 | 697 | $fa = ''; |
698 | 698 | |
699 | 699 | if (isset($setting[$value])) { |
@@ -719,7 +719,7 @@ discard block |
||
719 | 719 | Carbon::setLocale($locale); |
720 | 720 | } |
721 | 721 | |
722 | - return $this->display(function ($value) { |
|
722 | + return $this->display(function($value) { |
|
723 | 723 | return Carbon::parse($value)->diffForHumans(); |
724 | 724 | }); |
725 | 725 | } |
@@ -733,7 +733,7 @@ discard block |
||
733 | 733 | */ |
734 | 734 | public function date($format) |
735 | 735 | { |
736 | - return $this->display(function ($value) use ($format) { |
|
736 | + return $this->display(function($value) use ($format) { |
|
737 | 737 | return date($format, strtotime($value)); |
738 | 738 | }); |
739 | 739 | } |
@@ -748,7 +748,7 @@ discard block |
||
748 | 748 | */ |
749 | 749 | public function bool(array $map = [], $default = false) |
750 | 750 | { |
751 | - return $this->display(function ($value) use ($map, $default) { |
|
751 | + return $this->display(function($value) use ($map, $default) { |
|
752 | 752 | $bool = empty($map) ? boolval($value) : Arr::get($map, $value, $default); |
753 | 753 | |
754 | 754 | return $bool ? '<i class="fa fa-check text-green"></i>' : '<i class="fa fa-close text-red"></i>'; |
@@ -763,7 +763,7 @@ discard block |
||
763 | 763 | */ |
764 | 764 | public function default($default = '-') |
765 | 765 | { |
766 | - return $this->display(function ($value) use ($default) { |
|
766 | + return $this->display(function($value) use ($default) { |
|
767 | 767 | return $value ?: $default; |
768 | 768 | }); |
769 | 769 | } |
@@ -783,7 +783,7 @@ discard block |
||
783 | 783 | |
784 | 784 | $grid = $this->grid; |
785 | 785 | |
786 | - return $this->display(function ($_, $column) use ($action, $grid) { |
|
786 | + return $this->display(function($_, $column) use ($action, $grid) { |
|
787 | 787 | /** @var RowAction $action */ |
788 | 788 | $action = new $action(); |
789 | 789 | |
@@ -805,7 +805,7 @@ discard block |
||
805 | 805 | */ |
806 | 806 | public function dot($options = [], $default = '') |
807 | 807 | { |
808 | - return $this->prefix(function ($_, $original) use ($options, $default) { |
|
808 | + return $this->prefix(function($_, $original) use ($options, $default) { |
|
809 | 809 | if (is_null($original)) { |
810 | 810 | $style = $default; |
811 | 811 | } else { |
@@ -960,7 +960,7 @@ discard block |
||
960 | 960 | $grid = $this->grid; |
961 | 961 | $column = $this; |
962 | 962 | |
963 | - $this->display(function ($value) use ($grid, $column, $class) { |
|
963 | + $this->display(function($value) use ($grid, $column, $class) { |
|
964 | 964 | /** @var AbstractDisplayer $definition */ |
965 | 965 | $definition = new $class($value, $grid, $column, $this); |
966 | 966 | |
@@ -978,7 +978,7 @@ discard block |
||
978 | 978 | protected function htmlEntityEncode($item) |
979 | 979 | { |
980 | 980 | if (is_array($item)) { |
981 | - array_walk_recursive($item, function (&$value) { |
|
981 | + array_walk_recursive($item, function(&$value) { |
|
982 | 982 | $value = htmlentities($value); |
983 | 983 | }); |
984 | 984 | } else { |
@@ -1015,7 +1015,7 @@ discard block |
||
1015 | 1015 | */ |
1016 | 1016 | protected function callSupportDisplayer($abstract, $arguments) |
1017 | 1017 | { |
1018 | - return $this->display(function ($value) use ($abstract, $arguments) { |
|
1018 | + return $this->display(function($value) use ($abstract, $arguments) { |
|
1019 | 1019 | if (is_array($value) || $value instanceof Arrayable) { |
1020 | 1020 | return call_user_func_array([collect($value), $abstract], $arguments); |
1021 | 1021 | } |
@@ -1039,7 +1039,7 @@ discard block |
||
1039 | 1039 | protected function callBuiltinDisplayer($abstract, $arguments) |
1040 | 1040 | { |
1041 | 1041 | if ($abstract instanceof Closure) { |
1042 | - return $this->display(function ($value) use ($abstract, $arguments) { |
|
1042 | + return $this->display(function($value) use ($abstract, $arguments) { |
|
1043 | 1043 | return $abstract->call($this, ...array_merge([$value], $arguments)); |
1044 | 1044 | }); |
1045 | 1045 | } |
@@ -1048,7 +1048,7 @@ discard block |
||
1048 | 1048 | $grid = $this->grid; |
1049 | 1049 | $column = $this; |
1050 | 1050 | |
1051 | - return $this->display(function ($value) use ($abstract, $grid, $column, $arguments) { |
|
1051 | + return $this->display(function($value) use ($abstract, $grid, $column, $arguments) { |
|
1052 | 1052 | /** @var AbstractDisplayer $displayer */ |
1053 | 1053 | $displayer = new $abstract($value, $grid, $column, $this); |
1054 | 1054 |