@@ -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,10 +1020,10 @@ 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 | { |
| 1026 | - return ; |
|
| 1026 | + return; |
|
| 1027 | 1027 | } |
| 1028 | 1028 | |
| 1029 | 1029 | $column = $field->column(); |
@@ -1033,7 +1033,7 @@ discard block |
||
| 1033 | 1033 | list($relation) = explode('.', $column); |
| 1034 | 1034 | |
| 1035 | 1035 | if (!in_array($relation, $relations)) { |
| 1036 | - return ; |
|
| 1036 | + return; |
|
| 1037 | 1037 | } |
| 1038 | 1038 | |
| 1039 | 1039 | $field->setSnakeAttributes($this->model::$snakeAttributes); |
@@ -1063,7 +1063,7 @@ discard block |
||
| 1063 | 1063 | |
| 1064 | 1064 | $data = $this->model->toArray(); |
| 1065 | 1065 | |
| 1066 | - $this->fields()->each(function (Field $field) use ($data) { |
|
| 1066 | + $this->fields()->each(function(Field $field) use ($data) { |
|
| 1067 | 1067 | if (!in_array($field->column(), $this->ignored, true)) { |
| 1068 | 1068 | $field->fill($data); |
| 1069 | 1069 | } |
@@ -1194,7 +1194,7 @@ discard block |
||
| 1194 | 1194 | */ |
| 1195 | 1195 | public function setWidth($fieldWidth = 8, $labelWidth = 2): self |
| 1196 | 1196 | { |
| 1197 | - $this->fields()->each(function ($field) use ($fieldWidth, $labelWidth) { |
|
| 1197 | + $this->fields()->each(function($field) use ($fieldWidth, $labelWidth) { |
|
| 1198 | 1198 | /* @var Field $field */ |
| 1199 | 1199 | $field->setWidth($fieldWidth, $labelWidth); |
| 1200 | 1200 | }); |