@@ -157,16 +157,16 @@ discard block |
||
| 157 | 157 | call_user_func($this->callback, $this); |
| 158 | 158 | } |
| 159 | 159 | |
| 160 | - $response = function () { |
|
| 160 | + $response = function() { |
|
| 161 | 161 | $handle = fopen('php://output', 'w'); |
| 162 | 162 | $titles = []; |
| 163 | 163 | |
| 164 | - $this->chunk(function ($collection) use ($handle, &$titles) { |
|
| 164 | + $this->chunk(function($collection) use ($handle, &$titles) { |
|
| 165 | 165 | Column::setOriginalGridModels($collection); |
| 166 | 166 | |
| 167 | 167 | $original = $current = $collection->toArray(); |
| 168 | 168 | |
| 169 | - $this->grid->getColumns()->map(function (Column $column) use (&$current) { |
|
| 169 | + $this->grid->getColumns()->map(function(Column $column) use (&$current) { |
|
| 170 | 170 | $current = $column->fill($current); |
| 171 | 171 | $this->grid->columnNames[] = $column->getName(); |
| 172 | 172 | }); |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | protected function getVisiableTitles() |
| 196 | 196 | { |
| 197 | 197 | $titles = $this->grid->visibleColumns() |
| 198 | - ->mapWithKeys(function (Column $column) { |
|
| 198 | + ->mapWithKeys(function(Column $column) { |
|
| 199 | 199 | $columnName = $column->getName(); |
| 200 | 200 | $columnTitle = $column->getLabel(); |
| 201 | 201 | if (isset($this->titleCallbacks[$columnName])) { |
@@ -123,7 +123,7 @@ |
||
| 123 | 123 | /** |
| 124 | 124 | * @param null|\Closure $callback |
| 125 | 125 | * |
| 126 | - * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View|string |
|
| 126 | + * @return string|null |
|
| 127 | 127 | */ |
| 128 | 128 | public function display($callback = null) |
| 129 | 129 | { |
@@ -81,7 +81,7 @@ |
||
| 81 | 81 | 'rowName' => $this->grid->getGridRowName(), |
| 82 | 82 | ]); |
| 83 | 83 | |
| 84 | - return function (Grid $grid) { |
|
| 84 | + return function(Grid $grid) { |
|
| 85 | 85 | if ($this->head > 0) { |
| 86 | 86 | $this->left = $grid->visibleColumns()->slice(0, $this->head); |
| 87 | 87 | } |
@@ -83,11 +83,11 @@ discard block |
||
| 83 | 83 | |
| 84 | 84 | $this->compatibleBlade(); |
| 85 | 85 | |
| 86 | - Blade::directive('box', function ($title) { |
|
| 86 | + Blade::directive('box', function($title) { |
|
| 87 | 87 | return "<?php \$box = new \Encore\Admin\Widgets\Box({$title}, '"; |
| 88 | 88 | }); |
| 89 | 89 | |
| 90 | - Blade::directive('endbox', function ($expression) { |
|
| 90 | + Blade::directive('endbox', function($expression) { |
|
| 91 | 91 | return "'); echo \$box->render(); ?>"; |
| 92 | 92 | }); |
| 93 | 93 | } |
@@ -139,8 +139,8 @@ discard block |
||
| 139 | 139 | */ |
| 140 | 140 | protected function macroRouter() |
| 141 | 141 | { |
| 142 | - Router::macro('content', function ($uri, $content, $options = []) { |
|
| 143 | - return $this->match(['GET', 'HEAD'], $uri, function (Content $layout) use ($content, $options) { |
|
| 142 | + Router::macro('content', function($uri, $content, $options = []) { |
|
| 143 | + return $this->match(['GET', 'HEAD'], $uri, function(Content $layout) use ($content, $options) { |
|
| 144 | 144 | return $layout |
| 145 | 145 | ->title(Arr::get($options, 'title', ' ')) |
| 146 | 146 | ->description(Arr::get($options, 'desc', ' ')) |
@@ -148,8 +148,8 @@ discard block |
||
| 148 | 148 | }); |
| 149 | 149 | }); |
| 150 | 150 | |
| 151 | - Router::macro('component', function ($uri, $component, $data = [], $options = []) { |
|
| 152 | - return $this->match(['GET', 'HEAD'], $uri, function (Content $layout) use ($component, $data, $options) { |
|
| 151 | + Router::macro('component', function($uri, $component, $data = [], $options = []) { |
|
| 152 | + return $this->match(['GET', 'HEAD'], $uri, function(Content $layout) use ($component, $data, $options) { |
|
| 153 | 153 | return $layout |
| 154 | 154 | ->title(Arr::get($options, 'title', ' ')) |
| 155 | 155 | ->description(Arr::get($options, 'desc', ' ')) |