@@ -253,7 +253,7 @@ discard block |
||
253 | 253 | return $ret; |
254 | 254 | } |
255 | 255 | |
256 | - collect(explode(',', $id))->filter()->each(function ($id) { |
|
256 | + collect(explode(',', $id))->filter()->each(function($id) { |
|
257 | 257 | $builder = $this->model()->newQuery(); |
258 | 258 | |
259 | 259 | if ($this->isSoftDeletes) { |
@@ -306,9 +306,9 @@ discard block |
||
306 | 306 | |
307 | 307 | $data = $model->toArray(); |
308 | 308 | |
309 | - $this->fields()->filter(function ($field) { |
|
309 | + $this->fields()->filter(function($field) { |
|
310 | 310 | return $field instanceof Field\File; |
311 | - })->each(function (Field\File $file) use ($data) { |
|
311 | + })->each(function(Field\File $file) use ($data) { |
|
312 | 312 | $file->setOriginal($data); |
313 | 313 | |
314 | 314 | $file->destroy(); |
@@ -333,7 +333,7 @@ discard block |
||
333 | 333 | return $response; |
334 | 334 | } |
335 | 335 | |
336 | - DB::transaction(function () { |
|
336 | + DB::transaction(function() { |
|
337 | 337 | $inserts = $this->prepareInsert($this->updates); |
338 | 338 | |
339 | 339 | foreach ($inserts as $column => $value) { |
@@ -537,7 +537,7 @@ discard block |
||
537 | 537 | return $response; |
538 | 538 | } |
539 | 539 | |
540 | - DB::transaction(function () { |
|
540 | + DB::transaction(function() { |
|
541 | 541 | $updates = $this->prepareUpdate($this->updates); |
542 | 542 | |
543 | 543 | foreach ($updates as $column => $value) { |
@@ -987,7 +987,7 @@ discard block |
||
987 | 987 | protected function getFieldByColumn($column) |
988 | 988 | { |
989 | 989 | return $this->fields()->first( |
990 | - function (Field $field) use ($column) { |
|
990 | + function(Field $field) use ($column) { |
|
991 | 991 | if (is_array($field->column())) { |
992 | 992 | return in_array($column, $field->column()); |
993 | 993 | } |
@@ -1006,7 +1006,7 @@ discard block |
||
1006 | 1006 | { |
1007 | 1007 | $values = $this->model->toArray(); |
1008 | 1008 | |
1009 | - $this->fields()->each(function (Field $field) use ($values) { |
|
1009 | + $this->fields()->each(function(Field $field) use ($values) { |
|
1010 | 1010 | $field->setOriginal($values); |
1011 | 1011 | }); |
1012 | 1012 | } |
@@ -1020,7 +1020,7 @@ discard block |
||
1020 | 1020 | { |
1021 | 1021 | $relations = $this->getRelations(); |
1022 | 1022 | |
1023 | - $this->fields()->each(function (Field $field) use ($relations) { |
|
1023 | + $this->fields()->each(function(Field $field) use ($relations) { |
|
1024 | 1024 | if ($field->getSnakeAttributes()) { |
1025 | 1025 | return; |
1026 | 1026 | } |
@@ -1062,7 +1062,7 @@ discard block |
||
1062 | 1062 | |
1063 | 1063 | $data = $this->model->toArray(); |
1064 | 1064 | |
1065 | - $this->fields()->each(function (Field $field) use ($data) { |
|
1065 | + $this->fields()->each(function(Field $field) use ($data) { |
|
1066 | 1066 | if (!in_array($field->column(), $this->ignored, true)) { |
1067 | 1067 | $field->fill($data); |
1068 | 1068 | } |
@@ -1193,7 +1193,7 @@ discard block |
||
1193 | 1193 | */ |
1194 | 1194 | public function setWidth($fieldWidth = 8, $labelWidth = 2): self |
1195 | 1195 | { |
1196 | - $this->fields()->each(function ($field) use ($fieldWidth, $labelWidth) { |
|
1196 | + $this->fields()->each(function($field) use ($fieldWidth, $labelWidth) { |
|
1197 | 1197 | /* @var Field $field */ |
1198 | 1198 | $field->setWidth($fieldWidth, $labelWidth); |
1199 | 1199 | }); |