@@ -37,7 +37,7 @@ |
||
37 | 37 | 'title' => $this->message, |
38 | 38 | ]; |
39 | 39 | |
40 | - $data = collect($data)->map(function ($val, $key) { |
|
40 | + $data = collect($data)->map(function($val, $key) { |
|
41 | 41 | return "data-{$key}=\"{$val}\""; |
42 | 42 | })->implode(' '); |
43 | 43 |
@@ -77,7 +77,7 @@ |
||
77 | 77 | { |
78 | 78 | $value = $this->getFilterValue([]); |
79 | 79 | |
80 | - $lists = collect($this->options)->map(function ($label, $key) use ($value) { |
|
80 | + $lists = collect($this->options)->map(function($label, $key) use ($value) { |
|
81 | 81 | $checked = in_array($key, $value) ? 'checked' : ''; |
82 | 82 | |
83 | 83 | return <<<HTML |
@@ -115,7 +115,7 @@ |
||
115 | 115 | */ |
116 | 116 | public function renderHeader() |
117 | 117 | { |
118 | - return collect($this->headers)->map(function ($item) { |
|
118 | + return collect($this->headers)->map(function($item) { |
|
119 | 119 | if ($item instanceof Renderable) { |
120 | 120 | return $item->render(); |
121 | 121 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | $this->value = $this->value->toArray(); |
14 | 14 | } |
15 | 15 | |
16 | - return collect((array) $this->value)->filter()->map(function ($value) use ($server) { |
|
16 | + return collect((array) $this->value)->filter()->map(function($value) use ($server) { |
|
17 | 17 | if (empty($value)) { |
18 | 18 | return ''; |
19 | 19 | } |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | $this->search = $search; |
42 | 42 | } |
43 | 43 | |
44 | - return tap(new Tools\QuickSearch(), function ($search) { |
|
44 | + return tap(new Tools\QuickSearch(), function($search) { |
|
45 | 45 | $this->tools->append($search); |
46 | 46 | }); |
47 | 47 | } |
@@ -125,14 +125,14 @@ discard block |
||
125 | 125 | */ |
126 | 126 | protected function parseQueryBindings(array $queries) |
127 | 127 | { |
128 | - $columnMap = $this->columns->mapWithKeys(function (Column $column) { |
|
128 | + $columnMap = $this->columns->mapWithKeys(function(Column $column) { |
|
129 | 129 | $label = $column->getLabel(); |
130 | 130 | $name = $column->getName(); |
131 | 131 | |
132 | 132 | return [$label => $name, $name => $name]; |
133 | 133 | }); |
134 | 134 | |
135 | - return collect($queries)->map(function ($query) use ($columnMap) { |
|
135 | + return collect($queries)->map(function($query) use ($columnMap) { |
|
136 | 136 | $segments = explode(':', $query, 2); |
137 | 137 | |
138 | 138 | if (count($segments) != 2) { |
@@ -169,7 +169,7 @@ |
||
169 | 169 | |
170 | 170 | $action = $size[2] ?? 'resize'; |
171 | 171 | // Resize image with aspect ratio |
172 | - $image->$action($size[0], $size[1], function (Constraint $constraint) { |
|
172 | + $image->$action($size[0], $size[1], function(Constraint $constraint) { |
|
173 | 173 | $constraint->aspectRatio(); |
174 | 174 | })->resizeCanvas($size[0], $size[1], 'center', false, '#ffffff'); |
175 | 175 |
@@ -87,7 +87,7 @@ |
||
87 | 87 | */ |
88 | 88 | public function render() |
89 | 89 | { |
90 | - $columns = $this->getVisibleColumns()->map(function (Column $column) { |
|
90 | + $columns = $this->getVisibleColumns()->map(function(Column $column) { |
|
91 | 91 | $name = $column->getName(); |
92 | 92 | |
93 | 93 | $total = ''; |
@@ -78,7 +78,7 @@ |
||
78 | 78 | { |
79 | 79 | $this->grid->setView($this->view); |
80 | 80 | |
81 | - return function (Grid $grid) { |
|
81 | + return function(Grid $grid) { |
|
82 | 82 | if ($this->head > 0) { |
83 | 83 | $this->left = $grid->visibleColumns()->slice(0, $this->head); |
84 | 84 | } |
@@ -370,7 +370,7 @@ discard block |
||
370 | 370 | $column = new Column($column, $label); |
371 | 371 | $column->setGrid($this); |
372 | 372 | |
373 | - return tap($column, function ($value) { |
|
373 | + return tap($column, function($value) { |
|
374 | 374 | $this->columns->push($value); |
375 | 375 | }); |
376 | 376 | } |
@@ -434,7 +434,7 @@ discard block |
||
434 | 434 | $column = new Column($column, $label); |
435 | 435 | $column->setGrid($this); |
436 | 436 | |
437 | - return tap($column, function ($value) { |
|
437 | + return tap($column, function($value) { |
|
438 | 438 | $this->columns->prepend($value); |
439 | 439 | }); |
440 | 440 | } |
@@ -544,7 +544,7 @@ discard block |
||
544 | 544 | */ |
545 | 545 | public function batchActions(Closure $closure) |
546 | 546 | { |
547 | - $this->tools(function (Tools $tools) use ($closure) { |
|
547 | + $this->tools(function(Tools $tools) use ($closure) { |
|
548 | 548 | $tools->batch($closure); |
549 | 549 | }); |
550 | 550 | |
@@ -640,7 +640,7 @@ discard block |
||
640 | 640 | |
641 | 641 | $data = $collection->toArray(); |
642 | 642 | |
643 | - $this->columns->map(function (Column $column) use (&$data) { |
|
643 | + $this->columns->map(function(Column $column) use (&$data) { |
|
644 | 644 | $data = $column->fill($data); |
645 | 645 | |
646 | 646 | $this->columnNames[] = $column->getName(); |
@@ -660,7 +660,7 @@ discard block |
||
660 | 660 | */ |
661 | 661 | protected function buildRows(array $data) |
662 | 662 | { |
663 | - $this->rows = collect($data)->map(function ($model, $number) { |
|
663 | + $this->rows = collect($data)->map(function($model, $number) { |
|
664 | 664 | return new Row($number, $model, $this->keyName); |
665 | 665 | }); |
666 | 666 |