@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | /** |
358 | 358 | * Get name of this column. |
359 | 359 | * |
360 | - * @return mixed |
|
360 | + * @return string |
|
361 | 361 | */ |
362 | 362 | public function getName() |
363 | 363 | { |
@@ -395,7 +395,7 @@ discard block |
||
395 | 395 | /** |
396 | 396 | * Get label of the column. |
397 | 397 | * |
398 | - * @return mixed |
|
398 | + * @return string |
|
399 | 399 | */ |
400 | 400 | public function getLabel() |
401 | 401 | { |
@@ -900,7 +900,6 @@ discard block |
||
900 | 900 | /** |
901 | 901 | * Grid inline date picker. |
902 | 902 | * |
903 | - * @param string $format |
|
904 | 903 | * |
905 | 904 | * @return $this |
906 | 905 | */ |
@@ -912,7 +911,6 @@ discard block |
||
912 | 911 | /** |
913 | 912 | * Grid inline time picker. |
914 | 913 | * |
915 | - * @param string $format |
|
916 | 914 | * |
917 | 915 | * @return $this |
918 | 916 | */ |
@@ -490,7 +490,7 @@ discard block |
||
490 | 490 | $name = $this->getName(); |
491 | 491 | $query = request()->query(); |
492 | 492 | |
493 | - $this->prefix(function ($_, $original) use ($name, $query) { |
|
493 | + $this->prefix(function($_, $original) use ($name, $query) { |
|
494 | 494 | Arr::set($query, $name, $original); |
495 | 495 | |
496 | 496 | $url = request()->fullUrlWithQuery($query); |
@@ -541,7 +541,7 @@ discard block |
||
541 | 541 | |
542 | 542 | $column = $this; |
543 | 543 | |
544 | - return $this->display(function ($value) use ($grid, $column, $abstract, $arguments) { |
|
544 | + return $this->display(function($value) use ($grid, $column, $abstract, $arguments) { |
|
545 | 545 | /** @var AbstractDisplayer $displayer */ |
546 | 546 | $displayer = new $abstract($value, $grid, $column, $this); |
547 | 547 | |
@@ -559,7 +559,7 @@ discard block |
||
559 | 559 | */ |
560 | 560 | public function using(array $values, $default = null) |
561 | 561 | { |
562 | - return $this->display(function ($value) use ($values, $default) { |
|
562 | + return $this->display(function($value) use ($values, $default) { |
|
563 | 563 | if (is_null($value)) { |
564 | 564 | return $default; |
565 | 565 | } |
@@ -577,7 +577,7 @@ discard block |
||
577 | 577 | */ |
578 | 578 | public function replace(array $replacements) |
579 | 579 | { |
580 | - return $this->display(function ($value) use ($replacements) { |
|
580 | + return $this->display(function($value) use ($replacements) { |
|
581 | 581 | if (isset($replacements[$value])) { |
582 | 582 | return $replacements[$value]; |
583 | 583 | } |
@@ -595,13 +595,13 @@ discard block |
||
595 | 595 | public function repeat($input, $seperator = '') |
596 | 596 | { |
597 | 597 | if (is_string($input)) { |
598 | - $input = function () use ($input) { |
|
598 | + $input = function() use ($input) { |
|
599 | 599 | return $input; |
600 | 600 | }; |
601 | 601 | } |
602 | 602 | |
603 | 603 | if ($input instanceof Closure) { |
604 | - return $this->display(function ($value) use ($input, $seperator) { |
|
604 | + return $this->display(function($value) use ($input, $seperator) { |
|
605 | 605 | return join($seperator, array_fill(0, (int) $value, $input->call($this, [$value]))); |
606 | 606 | }); |
607 | 607 | } |
@@ -618,7 +618,7 @@ discard block |
||
618 | 618 | */ |
619 | 619 | public function view($view) |
620 | 620 | { |
621 | - return $this->display(function ($value) use ($view) { |
|
621 | + return $this->display(function($value) use ($view) { |
|
622 | 622 | $model = $this; |
623 | 623 | |
624 | 624 | return view($view, compact('model', 'value'))->render(); |
@@ -658,7 +658,7 @@ discard block |
||
658 | 658 | */ |
659 | 659 | public function filesize() |
660 | 660 | { |
661 | - return $this->display(function ($value) { |
|
661 | + return $this->display(function($value) { |
|
662 | 662 | return file_size($value); |
663 | 663 | }); |
664 | 664 | } |
@@ -672,7 +672,7 @@ discard block |
||
672 | 672 | */ |
673 | 673 | public function gravatar($size = 30) |
674 | 674 | { |
675 | - return $this->display(function ($value) use ($size) { |
|
675 | + return $this->display(function($value) use ($size) { |
|
676 | 676 | $src = sprintf( |
677 | 677 | 'https://www.gravatar.com/avatar/%s?s=%d', |
678 | 678 | md5(strtolower($value)), |
@@ -693,7 +693,7 @@ discard block |
||
693 | 693 | */ |
694 | 694 | public function loading($values = [], $others = []) |
695 | 695 | { |
696 | - return $this->display(function ($value) use ($values, $others) { |
|
696 | + return $this->display(function($value) use ($values, $others) { |
|
697 | 697 | $values = (array) $values; |
698 | 698 | |
699 | 699 | if (in_array($value, $values)) { |
@@ -714,7 +714,7 @@ discard block |
||
714 | 714 | */ |
715 | 715 | public function icon(array $setting, $default = '') |
716 | 716 | { |
717 | - return $this->display(function ($value) use ($setting, $default) { |
|
717 | + return $this->display(function($value) use ($setting, $default) { |
|
718 | 718 | $fa = ''; |
719 | 719 | |
720 | 720 | if (isset($setting[$value])) { |
@@ -740,7 +740,7 @@ discard block |
||
740 | 740 | Carbon::setLocale($locale); |
741 | 741 | } |
742 | 742 | |
743 | - return $this->display(function ($value) { |
|
743 | + return $this->display(function($value) { |
|
744 | 744 | return Carbon::parse($value)->diffForHumans(); |
745 | 745 | }); |
746 | 746 | } |
@@ -769,7 +769,7 @@ discard block |
||
769 | 769 | */ |
770 | 770 | public function bool(array $map = [], $default = false) |
771 | 771 | { |
772 | - return $this->display(function ($value) use ($map, $default) { |
|
772 | + return $this->display(function($value) use ($map, $default) { |
|
773 | 773 | $bool = empty($map) ? boolval($value) : Arr::get($map, $value, $default); |
774 | 774 | |
775 | 775 | return $bool ? '<i class="fa fa-check text-green"></i>' : '<i class="fa fa-close text-red"></i>'; |
@@ -784,7 +784,7 @@ discard block |
||
784 | 784 | */ |
785 | 785 | public function default($default = '-') |
786 | 786 | { |
787 | - return $this->display(function ($value) use ($default) { |
|
787 | + return $this->display(function($value) use ($default) { |
|
788 | 788 | return $value ?: $default; |
789 | 789 | }); |
790 | 790 | } |
@@ -804,7 +804,7 @@ discard block |
||
804 | 804 | |
805 | 805 | $grid = $this->grid; |
806 | 806 | |
807 | - return $this->display(function ($_, $column) use ($action, $grid) { |
|
807 | + return $this->display(function($_, $column) use ($action, $grid) { |
|
808 | 808 | /** @var RowAction $action */ |
809 | 809 | $action = new $action(); |
810 | 810 | |
@@ -826,7 +826,7 @@ discard block |
||
826 | 826 | */ |
827 | 827 | public function dot($options = [], $default = '') |
828 | 828 | { |
829 | - return $this->prefix(function ($_, $original) use ($options, $default) { |
|
829 | + return $this->prefix(function($_, $original) use ($options, $default) { |
|
830 | 830 | if (is_null($original)) { |
831 | 831 | $style = $default; |
832 | 832 | } else { |
@@ -1037,7 +1037,7 @@ discard block |
||
1037 | 1037 | $grid = $this->grid; |
1038 | 1038 | $column = $this; |
1039 | 1039 | |
1040 | - $this->display(function ($value) use ($grid, $column, $class) { |
|
1040 | + $this->display(function($value) use ($grid, $column, $class) { |
|
1041 | 1041 | /** @var AbstractDisplayer $definition */ |
1042 | 1042 | $definition = new $class($value, $grid, $column, $this); |
1043 | 1043 | |
@@ -1055,7 +1055,7 @@ discard block |
||
1055 | 1055 | protected function htmlEntityEncode($item) |
1056 | 1056 | { |
1057 | 1057 | if (is_array($item)) { |
1058 | - array_walk_recursive($item, function (&$value) { |
|
1058 | + array_walk_recursive($item, function(&$value) { |
|
1059 | 1059 | $value = htmlentities($value); |
1060 | 1060 | }); |
1061 | 1061 | } else { |
@@ -1092,7 +1092,7 @@ discard block |
||
1092 | 1092 | */ |
1093 | 1093 | protected function callSupportDisplayer($abstract, $arguments) |
1094 | 1094 | { |
1095 | - return $this->display(function ($value) use ($abstract, $arguments) { |
|
1095 | + return $this->display(function($value) use ($abstract, $arguments) { |
|
1096 | 1096 | if (is_array($value) || $value instanceof Arrayable) { |
1097 | 1097 | return call_user_func_array([collect($value), $abstract], $arguments); |
1098 | 1098 | } |
@@ -1116,7 +1116,7 @@ discard block |
||
1116 | 1116 | protected function callBuiltinDisplayer($abstract, $arguments) |
1117 | 1117 | { |
1118 | 1118 | if ($abstract instanceof Closure) { |
1119 | - return $this->display(function ($value) use ($abstract, $arguments) { |
|
1119 | + return $this->display(function($value) use ($abstract, $arguments) { |
|
1120 | 1120 | return $abstract->call($this, ...array_merge([$value], $arguments)); |
1121 | 1121 | }); |
1122 | 1122 | } |
@@ -1125,7 +1125,7 @@ discard block |
||
1125 | 1125 | $grid = $this->grid; |
1126 | 1126 | $column = $this; |
1127 | 1127 | |
1128 | - return $this->display(function ($value) use ($abstract, $grid, $column, $arguments) { |
|
1128 | + return $this->display(function($value) use ($abstract, $grid, $column, $arguments) { |
|
1129 | 1129 | /** @var AbstractDisplayer $displayer */ |
1130 | 1130 | $displayer = new $abstract($value, $grid, $column, $this); |
1131 | 1131 |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | |
326 | 326 | libxml_use_internal_errors(true); |
327 | 327 | |
328 | - $dom->loadHTML('<?xml encoding="utf-8" ?>' . $str); |
|
328 | + $dom->loadHTML('<?xml encoding="utf-8" ?>'.$str); |
|
329 | 329 | |
330 | 330 | libxml_use_internal_errors(false); |
331 | 331 | |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | } |
345 | 345 | |
346 | 346 | if ($child instanceof \DOMElement && $child->tagName == 'script') { |
347 | - static::script(';(function () {' . $child->nodeValue . '})();'); |
|
347 | + static::script(';(function () {'.$child->nodeValue.'})();'); |
|
348 | 348 | } |
349 | 349 | |
350 | 350 | if ($child instanceof \DOMElement && $child->tagName == 'template') { |
@@ -102,7 +102,7 @@ |
||
102 | 102 | */ |
103 | 103 | protected function addActionScripts() |
104 | 104 | { |
105 | - $this->actions->each(function ($action) { |
|
105 | + $this->actions->each(function($action) { |
|
106 | 106 | $action->setGrid($this->grid); |
107 | 107 | |
108 | 108 | if (method_exists($action, 'script')) { |
@@ -22,7 +22,7 @@ |
||
22 | 22 | 'scopes' => $filter->getScopes(), |
23 | 23 | 'label' => $label, |
24 | 24 | 'cancel' => $filter->urlWithoutScopes(), |
25 | - 'btn_class' => uniqid() . '-filter-btn', |
|
25 | + 'btn_class' => uniqid().'-filter-btn', |
|
26 | 26 | 'expand' => $filter->expand, |
27 | 27 | 'filter_id' => $filter->getFilterID(), |
28 | 28 | ]); |
@@ -33,9 +33,9 @@ discard block |
||
33 | 33 | */ |
34 | 34 | protected function getGridColumns() |
35 | 35 | { |
36 | - return $this->grid->columns()->reject(function ($column) { |
|
36 | + return $this->grid->columns()->reject(function($column) { |
|
37 | 37 | return in_array($column->getName(), static::$ignored); |
38 | - })->map(function ($column) { |
|
38 | + })->map(function($column) { |
|
39 | 39 | return [$column->getName() => $column->getLabel()]; |
40 | 40 | })->collapse(); |
41 | 41 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | */ |
48 | 48 | public static function ignore($name) |
49 | 49 | { |
50 | - static::$ignored = array_merge(static::$ignored, (array)$name); |
|
50 | + static::$ignored = array_merge(static::$ignored, (array) $name); |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | /** |