@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | $show = $this->grid->visibleColumnNames(); |
| 48 | 48 | |
| 49 | - $lists = $this->getGridColumns()->map(function ($label, $key) use ($show) { |
|
| 49 | + $lists = $this->getGridColumns()->map(function($label, $key) use ($show) { |
|
| 50 | 50 | if (empty($show)) { |
| 51 | 51 | $checked = 'checked'; |
| 52 | 52 | } else { |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | */ |
| 99 | 99 | protected function getGridColumns() |
| 100 | 100 | { |
| 101 | - return $this->grid->columns()->map(function (Grid\Column $column) { |
|
| 101 | + return $this->grid->columns()->map(function(Grid\Column $column) { |
|
| 102 | 102 | $name = $column->getName(); |
| 103 | 103 | |
| 104 | 104 | if ($this->isColumnIgnored($name)) { |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | $this->value = $this->value->toArray(); |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | - return collect((array) $this->value)->map(function ($item) use ($style) { |
|
| 16 | + return collect((array) $this->value)->map(function($item) use ($style) { |
|
| 17 | 17 | |
| 18 | 18 | if (is_array($style)) { |
| 19 | 19 | $style = Arr::get($style, $this->getColumn()->getOriginal(), 'success'); |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | $this->value = $this->value->toArray(); |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | - return collect((array) $this->value)->map(function ($name) use ($style) { |
|
| 16 | + return collect((array) $this->value)->map(function($name) use ($style) { |
|
| 17 | 17 | |
| 18 | 18 | if (is_array($style)) { |
| 19 | 19 | $style = Arr::get($style, $this->getColumn()->getOriginal(), 'red'); |
@@ -419,7 +419,7 @@ discard block |
||
| 419 | 419 | |
| 420 | 420 | $column = $this; |
| 421 | 421 | |
| 422 | - return $this->display(function ($value) use ($grid, $column, $abstract, $arguments) { |
|
| 422 | + return $this->display(function($value) use ($grid, $column, $abstract, $arguments) { |
|
| 423 | 423 | /** @var AbstractDisplayer $displayer */ |
| 424 | 424 | $displayer = new $abstract($value, $grid, $column, $this); |
| 425 | 425 | |
@@ -437,7 +437,7 @@ discard block |
||
| 437 | 437 | */ |
| 438 | 438 | public function using(array $values, $default = null) |
| 439 | 439 | { |
| 440 | - return $this->display(function ($value) use ($values, $default) { |
|
| 440 | + return $this->display(function($value) use ($values, $default) { |
|
| 441 | 441 | if (is_null($value)) { |
| 442 | 442 | return $default; |
| 443 | 443 | } |
@@ -455,7 +455,7 @@ discard block |
||
| 455 | 455 | */ |
| 456 | 456 | public function replace(array $replacements) |
| 457 | 457 | { |
| 458 | - return $this->display(function ($value) use ($replacements) { |
|
| 458 | + return $this->display(function($value) use ($replacements) { |
|
| 459 | 459 | if (isset($replacements[$value])) { |
| 460 | 460 | return $replacements[$value]; |
| 461 | 461 | } |
@@ -473,7 +473,7 @@ discard block |
||
| 473 | 473 | */ |
| 474 | 474 | public function view($view) |
| 475 | 475 | { |
| 476 | - return $this->display(function ($value) use ($view) { |
|
| 476 | + return $this->display(function($value) use ($view) { |
|
| 477 | 477 | $model = $this; |
| 478 | 478 | |
| 479 | 479 | return view($view, compact('model', 'value'))->render(); |
@@ -513,7 +513,7 @@ discard block |
||
| 513 | 513 | */ |
| 514 | 514 | public function filesize() |
| 515 | 515 | { |
| 516 | - return $this->display(function ($value) { |
|
| 516 | + return $this->display(function($value) { |
|
| 517 | 517 | return file_size($value); |
| 518 | 518 | }); |
| 519 | 519 | } |
@@ -527,7 +527,7 @@ discard block |
||
| 527 | 527 | */ |
| 528 | 528 | public function gravatar($size = 30) |
| 529 | 529 | { |
| 530 | - return $this->display(function ($value) use ($size) { |
|
| 530 | + return $this->display(function($value) use ($size) { |
|
| 531 | 531 | $src = sprintf( |
| 532 | 532 | 'https://www.gravatar.com/avatar/%s?s=%d', |
| 533 | 533 | md5(strtolower($value)), |
@@ -548,7 +548,7 @@ discard block |
||
| 548 | 548 | */ |
| 549 | 549 | public function loading($values = [], $others = []) |
| 550 | 550 | { |
| 551 | - return $this->display(function ($value) use ($values, $others) { |
|
| 551 | + return $this->display(function($value) use ($values, $others) { |
|
| 552 | 552 | |
| 553 | 553 | $values = (array) $values; |
| 554 | 554 | |
@@ -570,7 +570,7 @@ discard block |
||
| 570 | 570 | */ |
| 571 | 571 | public function icon(array $setting, $default = '') |
| 572 | 572 | { |
| 573 | - return $this->display(function ($value) use ($setting, $default) { |
|
| 573 | + return $this->display(function($value) use ($setting, $default) { |
|
| 574 | 574 | |
| 575 | 575 | $fa = ''; |
| 576 | 576 | |
@@ -597,7 +597,7 @@ discard block |
||
| 597 | 597 | Carbon::setLocale($locale); |
| 598 | 598 | } |
| 599 | 599 | |
| 600 | - return $this->display(function ($value) { |
|
| 600 | + return $this->display(function($value) { |
|
| 601 | 601 | return Carbon::parse($value)->diffForHumans(); |
| 602 | 602 | }); |
| 603 | 603 | } |
@@ -718,7 +718,7 @@ discard block |
||
| 718 | 718 | $grid = $this->grid; |
| 719 | 719 | $column = $this; |
| 720 | 720 | |
| 721 | - $this->display(function ($value) use ($grid, $column, $class) { |
|
| 721 | + $this->display(function($value) use ($grid, $column, $class) { |
|
| 722 | 722 | /** @var AbstractDisplayer $definition */ |
| 723 | 723 | $definition = new $class($value, $grid, $column, $this); |
| 724 | 724 | |
@@ -736,7 +736,7 @@ discard block |
||
| 736 | 736 | protected function htmlEntityEncode($item) |
| 737 | 737 | { |
| 738 | 738 | if (is_array($item)) { |
| 739 | - array_walk_recursive($item, function (&$value) { |
|
| 739 | + array_walk_recursive($item, function(&$value) { |
|
| 740 | 740 | $value = htmlentities($value); |
| 741 | 741 | }); |
| 742 | 742 | } else { |
@@ -824,7 +824,7 @@ discard block |
||
| 824 | 824 | 'content' => $this->help, |
| 825 | 825 | ]; |
| 826 | 826 | |
| 827 | - $data = collect($data)->map(function ($val, $key) { |
|
| 827 | + $data = collect($data)->map(function($val, $key) { |
|
| 828 | 828 | return "data-{$key}=\"{$val}\""; |
| 829 | 829 | })->implode(' '); |
| 830 | 830 | |
@@ -862,7 +862,7 @@ discard block |
||
| 862 | 862 | */ |
| 863 | 863 | protected function callSupportDisplayer($abstract, $arguments) |
| 864 | 864 | { |
| 865 | - return $this->display(function ($value) use ($abstract, $arguments) { |
|
| 865 | + return $this->display(function($value) use ($abstract, $arguments) { |
|
| 866 | 866 | if (is_array($value) || $value instanceof Arrayable) { |
| 867 | 867 | return call_user_func_array([collect($value), $abstract], $arguments); |
| 868 | 868 | } |
@@ -886,7 +886,7 @@ discard block |
||
| 886 | 886 | protected function callBuiltinDisplayer($abstract, $arguments) |
| 887 | 887 | { |
| 888 | 888 | if ($abstract instanceof Closure) { |
| 889 | - return $this->display(function ($value) use ($abstract, $arguments) { |
|
| 889 | + return $this->display(function($value) use ($abstract, $arguments) { |
|
| 890 | 890 | return $abstract->call($this, ...array_merge([$value], $arguments)); |
| 891 | 891 | }); |
| 892 | 892 | } |
@@ -895,7 +895,7 @@ discard block |
||
| 895 | 895 | $grid = $this->grid; |
| 896 | 896 | $column = $this; |
| 897 | 897 | |
| 898 | - return $this->display(function ($value) use ($abstract, $grid, $column, $arguments) { |
|
| 898 | + return $this->display(function($value) use ($abstract, $grid, $column, $arguments) { |
|
| 899 | 899 | /** @var AbstractDisplayer $displayer */ |
| 900 | 900 | $displayer = new $abstract($value, $grid, $column, $this); |
| 901 | 901 | |