@@ -112,7 +112,7 @@ |
||
| 112 | 112 | protected function startColumn() |
| 113 | 113 | { |
| 114 | 114 | // get class name using width array |
| 115 | - $classnName = collect($this->width)->map(function ($value, $key) { |
|
| 115 | + $classnName = collect($this->width)->map(function($value, $key) { |
|
| 116 | 116 | return "col-$key-$value"; |
| 117 | 117 | })->implode(' '); |
| 118 | 118 | |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | /** |
| 223 | 223 | * Field constructor. |
| 224 | 224 | * |
| 225 | - * @param $column |
|
| 225 | + * @param string $column |
|
| 226 | 226 | * @param array $arguments |
| 227 | 227 | */ |
| 228 | 228 | public function __construct($column, $arguments = []) |
@@ -556,7 +556,7 @@ discard block |
||
| 556 | 556 | /** |
| 557 | 557 | * Set or get value of the field. |
| 558 | 558 | * |
| 559 | - * @param null $value |
|
| 559 | + * @param string $value |
|
| 560 | 560 | * |
| 561 | 561 | * @return mixed |
| 562 | 562 | */ |
@@ -727,7 +727,7 @@ discard block |
||
| 727 | 727 | /** |
| 728 | 728 | * Add html attributes to elements. |
| 729 | 729 | * |
| 730 | - * @param array|string $attribute |
|
| 730 | + * @param string $attribute |
|
| 731 | 731 | * @param mixed $value |
| 732 | 732 | * |
| 733 | 733 | * @return $this |
@@ -1019,7 +1019,7 @@ discard block |
||
| 1019 | 1019 | } |
| 1020 | 1020 | |
| 1021 | 1021 | /** |
| 1022 | - * @param array $labelClass |
|
| 1022 | + * @param string[] $labelClass |
|
| 1023 | 1023 | * |
| 1024 | 1024 | * @return self |
| 1025 | 1025 | */ |
@@ -1072,7 +1072,7 @@ discard block |
||
| 1072 | 1072 | /** |
| 1073 | 1073 | * Set view of current field. |
| 1074 | 1074 | * |
| 1075 | - * @return string |
|
| 1075 | + * @return Field |
|
| 1076 | 1076 | */ |
| 1077 | 1077 | public function setView($view) |
| 1078 | 1078 | { |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | $this->setupScript($show, $columns); |
| 40 | 40 | |
| 41 | - $lists = $columns->map(function ($val, $key) use ($show) { |
|
| 41 | + $lists = $columns->map(function($val, $key) use ($show) { |
|
| 42 | 42 | if (empty($show)) { |
| 43 | 43 | $checked = 'checked'; |
| 44 | 44 | } else { |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | */ |
| 74 | 74 | protected function getGridColumns() |
| 75 | 75 | { |
| 76 | - return $this->grid->columns()->map(function (Grid\Column $column) { |
|
| 76 | + return $this->grid->columns()->map(function(Grid\Column $column) { |
|
| 77 | 77 | $name = $column->getName(); |
| 78 | 78 | |
| 79 | 79 | if (in_array($name, ['__row_selector__', '__actions__'])) { |
@@ -371,7 +371,7 @@ discard block |
||
| 371 | 371 | |
| 372 | 372 | array_push($visible, '__row_selector__', '__actions__'); |
| 373 | 373 | |
| 374 | - return $this->columns->filter(function (Column $column) use ($visible) { |
|
| 374 | + return $this->columns->filter(function(Column $column) use ($visible) { |
|
| 375 | 375 | return in_array($column->getName(), $visible); |
| 376 | 376 | }); |
| 377 | 377 | } |
@@ -391,7 +391,7 @@ discard block |
||
| 391 | 391 | |
| 392 | 392 | array_push($visible, '__row_selector__', '__actions__'); |
| 393 | 393 | |
| 394 | - return collect($this->columnNames)->filter(function ($column) use ($visible) { |
|
| 394 | + return collect($this->columnNames)->filter(function($column) use ($visible) { |
|
| 395 | 395 | return in_array($column, $visible); |
| 396 | 396 | }); |
| 397 | 397 | } |
@@ -409,7 +409,7 @@ discard block |
||
| 409 | 409 | $column = new Column($column, $label); |
| 410 | 410 | $column->setGrid($this); |
| 411 | 411 | |
| 412 | - return tap($column, function ($value) { |
|
| 412 | + return tap($column, function($value) { |
|
| 413 | 413 | $this->columns->push($value); |
| 414 | 414 | }); |
| 415 | 415 | } |
@@ -427,7 +427,7 @@ discard block |
||
| 427 | 427 | $column = new Column($column, $label); |
| 428 | 428 | $column->setGrid($this); |
| 429 | 429 | |
| 430 | - return tap($column, function ($value) { |
|
| 430 | + return tap($column, function($value) { |
|
| 431 | 431 | $this->columns->prepend($value); |
| 432 | 432 | }); |
| 433 | 433 | } |
@@ -584,7 +584,7 @@ discard block |
||
| 584 | 584 | |
| 585 | 585 | Column::setOriginalGridModels($collection); |
| 586 | 586 | |
| 587 | - $this->columns->map(function (Column $column) use (&$data) { |
|
| 587 | + $this->columns->map(function(Column $column) use (&$data) { |
|
| 588 | 588 | $data = $column->fill($data); |
| 589 | 589 | |
| 590 | 590 | $this->columnNames[] = $column->getName(); |
@@ -688,7 +688,7 @@ discard block |
||
| 688 | 688 | */ |
| 689 | 689 | protected function buildRows(array $data) |
| 690 | 690 | { |
| 691 | - $this->rows = collect($data)->map(function ($model, $number) { |
|
| 691 | + $this->rows = collect($data)->map(function($model, $number) { |
|
| 692 | 692 | return new Row($number, $model); |
| 693 | 693 | }); |
| 694 | 694 | |
@@ -276,7 +276,7 @@ discard block |
||
| 276 | 276 | * Get or set option for grid. |
| 277 | 277 | * |
| 278 | 278 | * @param string $key |
| 279 | - * @param mixed $value |
|
| 279 | + * @param boolean $value |
|
| 280 | 280 | * |
| 281 | 281 | * @return $this|mixed |
| 282 | 282 | */ |
@@ -466,7 +466,7 @@ discard block |
||
| 466 | 466 | /** |
| 467 | 467 | * Get the grid paginator. |
| 468 | 468 | * |
| 469 | - * @return mixed |
|
| 469 | + * @return Tools\Paginator |
|
| 470 | 470 | */ |
| 471 | 471 | public function paginator() |
| 472 | 472 | { |
@@ -518,7 +518,7 @@ discard block |
||
| 518 | 518 | /** |
| 519 | 519 | * Set grid action callback. |
| 520 | 520 | * |
| 521 | - * @param Closure|string $actions |
|
| 521 | + * @param Closure $actions |
|
| 522 | 522 | * |
| 523 | 523 | * @return $this |
| 524 | 524 | */ |
@@ -645,7 +645,7 @@ discard block |
||
| 645 | 645 | * |
| 646 | 646 | * @param bool $toArray |
| 647 | 647 | * |
| 648 | - * @return array|Collection|mixed |
|
| 648 | + * @return Collection |
|
| 649 | 649 | */ |
| 650 | 650 | public function processFilter($toArray = true) |
| 651 | 651 | { |
@@ -895,7 +895,7 @@ discard block |
||
| 895 | 895 | * |
| 896 | 896 | * @param Closure|null $closure |
| 897 | 897 | * |
| 898 | - * @return $this|Closure |
|
| 898 | + * @return callable |
|
| 899 | 899 | */ |
| 900 | 900 | public function header(Closure $closure = null) |
| 901 | 901 | { |
@@ -927,7 +927,7 @@ discard block |
||
| 927 | 927 | * |
| 928 | 928 | * @param Closure|null $closure |
| 929 | 929 | * |
| 930 | - * @return $this|Closure |
|
| 930 | + * @return callable |
|
| 931 | 931 | */ |
| 932 | 932 | public function footer(Closure $closure = null) |
| 933 | 933 | { |
@@ -85,7 +85,7 @@ discard block |
||
| 85 | 85 | */ |
| 86 | 86 | public function disableFilterButton(bool $disable = true) |
| 87 | 87 | { |
| 88 | - $this->tools = $this->tools->map(function (AbstractTool $tool) use ($disable) { |
|
| 88 | + $this->tools = $this->tools->map(function(AbstractTool $tool) use ($disable) { |
|
| 89 | 89 | if ($tool instanceof FilterButton) { |
| 90 | 90 | return $tool->disable($disable); |
| 91 | 91 | } |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | */ |
| 101 | 101 | public function disableRefreshButton(bool $disable = true) |
| 102 | 102 | { |
| 103 | - $this->tools = $this->tools->map(function (AbstractTool $tool) use ($disable) { |
|
| 103 | + $this->tools = $this->tools->map(function(AbstractTool $tool) use ($disable) { |
|
| 104 | 104 | if ($tool instanceof RefreshButton) { |
| 105 | 105 | return $tool->disable($disable); |
| 106 | 106 | } |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | */ |
| 116 | 116 | public function disableBatchActions(bool $disable = true) |
| 117 | 117 | { |
| 118 | - $this->tools = $this->tools->map(function ($tool) use ($disable) { |
|
| 118 | + $this->tools = $this->tools->map(function($tool) use ($disable) { |
|
| 119 | 119 | if ($tool instanceof BatchActions) { |
| 120 | 120 | return $tool->disable($disable); |
| 121 | 121 | } |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | */ |
| 129 | 129 | public function batch(\Closure $closure) |
| 130 | 130 | { |
| 131 | - call_user_func($closure, $this->tools->first(function ($tool) { |
|
| 131 | + call_user_func($closure, $this->tools->first(function($tool) { |
|
| 132 | 132 | return $tool instanceof BatchActions; |
| 133 | 133 | })); |
| 134 | 134 | } |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | */ |
| 141 | 141 | public function render() |
| 142 | 142 | { |
| 143 | - return $this->tools->map(function ($tool) { |
|
| 143 | + return $this->tools->map(function($tool) { |
|
| 144 | 144 | if ($tool instanceof AbstractTool) { |
| 145 | 145 | if (!$tool->allowed()) { |
| 146 | 146 | return ''; |