@@ -496,7 +496,7 @@ discard block |
||
| 496 | 496 | |
| 497 | 497 | $column = $this; |
| 498 | 498 | |
| 499 | - return $this->display(function ($value) use ($grid, $column, $abstract, $arguments) { |
|
| 499 | + return $this->display(function($value) use ($grid, $column, $abstract, $arguments) { |
|
| 500 | 500 | /** @var AbstractDisplayer $displayer */ |
| 501 | 501 | $displayer = new $abstract($value, $grid, $column, $this); |
| 502 | 502 | |
@@ -514,7 +514,7 @@ discard block |
||
| 514 | 514 | */ |
| 515 | 515 | public function using(array $values, $default = null) |
| 516 | 516 | { |
| 517 | - return $this->display(function ($value) use ($values, $default) { |
|
| 517 | + return $this->display(function($value) use ($values, $default) { |
|
| 518 | 518 | if (is_null($value)) { |
| 519 | 519 | return $default; |
| 520 | 520 | } |
@@ -532,7 +532,7 @@ discard block |
||
| 532 | 532 | */ |
| 533 | 533 | public function replace(array $replacements) |
| 534 | 534 | { |
| 535 | - return $this->display(function ($value) use ($replacements) { |
|
| 535 | + return $this->display(function($value) use ($replacements) { |
|
| 536 | 536 | if (isset($replacements[$value])) { |
| 537 | 537 | return $replacements[$value]; |
| 538 | 538 | } |
@@ -550,7 +550,7 @@ discard block |
||
| 550 | 550 | */ |
| 551 | 551 | public function view($view) |
| 552 | 552 | { |
| 553 | - return $this->display(function ($value) use ($view) { |
|
| 553 | + return $this->display(function($value) use ($view) { |
|
| 554 | 554 | $model = $this; |
| 555 | 555 | |
| 556 | 556 | return view($view, compact('model', 'value'))->render(); |
@@ -590,7 +590,7 @@ discard block |
||
| 590 | 590 | */ |
| 591 | 591 | public function filesize() |
| 592 | 592 | { |
| 593 | - return $this->display(function ($value) { |
|
| 593 | + return $this->display(function($value) { |
|
| 594 | 594 | return file_size($value); |
| 595 | 595 | }); |
| 596 | 596 | } |
@@ -604,7 +604,7 @@ discard block |
||
| 604 | 604 | */ |
| 605 | 605 | public function gravatar($size = 30) |
| 606 | 606 | { |
| 607 | - return $this->display(function ($value) use ($size) { |
|
| 607 | + return $this->display(function($value) use ($size) { |
|
| 608 | 608 | $src = sprintf( |
| 609 | 609 | 'https://www.gravatar.com/avatar/%s?s=%d', |
| 610 | 610 | md5(strtolower($value)), |
@@ -625,7 +625,7 @@ discard block |
||
| 625 | 625 | */ |
| 626 | 626 | public function loading($values = [], $others = []) |
| 627 | 627 | { |
| 628 | - return $this->display(function ($value) use ($values, $others) { |
|
| 628 | + return $this->display(function($value) use ($values, $others) { |
|
| 629 | 629 | $values = (array) $values; |
| 630 | 630 | |
| 631 | 631 | if (in_array($value, $values)) { |
@@ -646,7 +646,7 @@ discard block |
||
| 646 | 646 | */ |
| 647 | 647 | public function icon(array $setting, $default = '') |
| 648 | 648 | { |
| 649 | - return $this->display(function ($value) use ($setting, $default) { |
|
| 649 | + return $this->display(function($value) use ($setting, $default) { |
|
| 650 | 650 | $fa = ''; |
| 651 | 651 | |
| 652 | 652 | if (isset($setting[$value])) { |
@@ -672,7 +672,7 @@ discard block |
||
| 672 | 672 | Carbon::setLocale($locale); |
| 673 | 673 | } |
| 674 | 674 | |
| 675 | - return $this->display(function ($value) { |
|
| 675 | + return $this->display(function($value) { |
|
| 676 | 676 | return Carbon::parse($value)->diffForHumans(); |
| 677 | 677 | }); |
| 678 | 678 | } |
@@ -686,7 +686,7 @@ discard block |
||
| 686 | 686 | */ |
| 687 | 687 | public function date($format) |
| 688 | 688 | { |
| 689 | - return $this->display(function ($value) use ($format) { |
|
| 689 | + return $this->display(function($value) use ($format) { |
|
| 690 | 690 | return date($format, strtotime($value)); |
| 691 | 691 | }); |
| 692 | 692 | } |
@@ -700,7 +700,7 @@ discard block |
||
| 700 | 700 | */ |
| 701 | 701 | public function bool(array $map = []) |
| 702 | 702 | { |
| 703 | - return $this->display(function ($value) use ($map) { |
|
| 703 | + return $this->display(function($value) use ($map) { |
|
| 704 | 704 | $bool = empty($map) ? boolval($value) : $map[$value]; |
| 705 | 705 | |
| 706 | 706 | return $bool ? '<i class="fa fa-check text-green"></i>' : '<i class="fa fa-close text-red"></i>'; |
@@ -823,7 +823,7 @@ discard block |
||
| 823 | 823 | $grid = $this->grid; |
| 824 | 824 | $column = $this; |
| 825 | 825 | |
| 826 | - $this->display(function ($value) use ($grid, $column, $class) { |
|
| 826 | + $this->display(function($value) use ($grid, $column, $class) { |
|
| 827 | 827 | /** @var AbstractDisplayer $definition */ |
| 828 | 828 | $definition = new $class($value, $grid, $column, $this); |
| 829 | 829 | |
@@ -841,7 +841,7 @@ discard block |
||
| 841 | 841 | protected function htmlEntityEncode($item) |
| 842 | 842 | { |
| 843 | 843 | if (is_array($item)) { |
| 844 | - array_walk_recursive($item, function (&$value) { |
|
| 844 | + array_walk_recursive($item, function(&$value) { |
|
| 845 | 845 | $value = htmlentities($value); |
| 846 | 846 | }); |
| 847 | 847 | } else { |
@@ -878,7 +878,7 @@ discard block |
||
| 878 | 878 | */ |
| 879 | 879 | protected function callSupportDisplayer($abstract, $arguments) |
| 880 | 880 | { |
| 881 | - return $this->display(function ($value) use ($abstract, $arguments) { |
|
| 881 | + return $this->display(function($value) use ($abstract, $arguments) { |
|
| 882 | 882 | if (is_array($value) || $value instanceof Arrayable) { |
| 883 | 883 | return call_user_func_array([collect($value), $abstract], $arguments); |
| 884 | 884 | } |
@@ -902,7 +902,7 @@ discard block |
||
| 902 | 902 | protected function callBuiltinDisplayer($abstract, $arguments) |
| 903 | 903 | { |
| 904 | 904 | if ($abstract instanceof Closure) { |
| 905 | - return $this->display(function ($value) use ($abstract, $arguments) { |
|
| 905 | + return $this->display(function($value) use ($abstract, $arguments) { |
|
| 906 | 906 | return $abstract->call($this, ...array_merge([$value], $arguments)); |
| 907 | 907 | }); |
| 908 | 908 | } |
@@ -911,7 +911,7 @@ discard block |
||
| 911 | 911 | $grid = $this->grid; |
| 912 | 912 | $column = $this; |
| 913 | 913 | |
| 914 | - return $this->display(function ($value) use ($abstract, $grid, $column, $arguments) { |
|
| 914 | + return $this->display(function($value) use ($abstract, $grid, $column, $arguments) { |
|
| 915 | 915 | /** @var AbstractDisplayer $displayer */ |
| 916 | 916 | $displayer = new $abstract($value, $grid, $column, $this); |
| 917 | 917 | |