@@ -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 | fwrite($handle, chr(0xEF).chr(0xBB).chr(0xBF)); //导出的CSV文件是无BOM编码UTF-8,而我们通常使用UTF-8编码格式都是有BOM的。所以添加BOM于CSV中 |
| 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])) { |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | } |
| 238 | 238 | $tmp = $fields; |
| 239 | 239 | $fields = []; |
| 240 | - foreach($tmp as $field) { |
|
| 240 | + foreach ($tmp as $field) { |
|
| 241 | 241 | $fields[] = strip_tags($field); |
| 242 | 242 | } |
| 243 | 243 | |