@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | * |
282 | 282 | * @param string $column |
283 | 283 | * |
284 | - * @return mixed|string |
|
284 | + * @return string |
|
285 | 285 | */ |
286 | 286 | protected function formatColumn($column = '') |
287 | 287 | { |
@@ -574,7 +574,7 @@ discard block |
||
574 | 574 | } |
575 | 575 | |
576 | 576 | /** |
577 | - * @param string|array|Closure $input |
|
577 | + * @param callable|null $input |
|
578 | 578 | * @param string|array $original |
579 | 579 | * |
580 | 580 | * @return array|Closure |
@@ -785,7 +785,7 @@ discard block |
||
785 | 785 | /** |
786 | 786 | * Set or get value of the field. |
787 | 787 | * |
788 | - * @param null $value |
|
788 | + * @param string $value |
|
789 | 789 | * |
790 | 790 | * @return mixed |
791 | 791 | */ |
@@ -956,7 +956,7 @@ discard block |
||
956 | 956 | /** |
957 | 957 | * Add html attributes to elements. |
958 | 958 | * |
959 | - * @param array|string $attribute |
|
959 | + * @param string $attribute |
|
960 | 960 | * @param mixed $value |
961 | 961 | * |
962 | 962 | * @return $this |
@@ -1334,7 +1334,7 @@ discard block |
||
1334 | 1334 | } |
1335 | 1335 | |
1336 | 1336 | /** |
1337 | - * @param array $labelClass |
|
1337 | + * @param string[] $labelClass |
|
1338 | 1338 | * |
1339 | 1339 | * @return self |
1340 | 1340 | */ |
@@ -1389,7 +1389,7 @@ discard block |
||
1389 | 1389 | * |
1390 | 1390 | * @param string $view |
1391 | 1391 | * |
1392 | - * @return string |
|
1392 | + * @return Field |
|
1393 | 1393 | */ |
1394 | 1394 | public function setView($view): string |
1395 | 1395 | { |
@@ -376,7 +376,7 @@ discard block |
||
376 | 376 | return $ret; |
377 | 377 | } |
378 | 378 | |
379 | - collect(explode(',', $id))->filter()->each(function ($id) { |
|
379 | + collect(explode(',', $id))->filter()->each(function($id) { |
|
380 | 380 | $builder = $this->model()->newQuery(); |
381 | 381 | |
382 | 382 | if ($this->isSoftDeletes) { |
@@ -429,9 +429,9 @@ discard block |
||
429 | 429 | |
430 | 430 | $data = $model->toArray(); |
431 | 431 | |
432 | - $this->builder->fields()->filter(function ($field) { |
|
432 | + $this->builder->fields()->filter(function($field) { |
|
433 | 433 | return $field instanceof Field\File; |
434 | - })->each(function (Field\File $file) use ($data) { |
|
434 | + })->each(function(Field\File $file) use ($data) { |
|
435 | 435 | $file->setOriginal($data); |
436 | 436 | |
437 | 437 | $file->destroy(); |
@@ -456,7 +456,7 @@ discard block |
||
456 | 456 | return $response; |
457 | 457 | } |
458 | 458 | |
459 | - DB::transaction(function () { |
|
459 | + DB::transaction(function() { |
|
460 | 460 | $inserts = $this->prepareInsert($this->updates); |
461 | 461 | |
462 | 462 | foreach ($inserts as $column => $value) { |
@@ -626,7 +626,7 @@ discard block |
||
626 | 626 | return $response; |
627 | 627 | } |
628 | 628 | |
629 | - DB::transaction(function () { |
|
629 | + DB::transaction(function() { |
|
630 | 630 | $updates = $this->prepareUpdate($this->updates); |
631 | 631 | |
632 | 632 | foreach ($updates as $column => $value) { |
@@ -1106,7 +1106,7 @@ discard block |
||
1106 | 1106 | protected function getFieldByColumn($column) |
1107 | 1107 | { |
1108 | 1108 | return $this->builder->fields()->first( |
1109 | - function (Field $field) use ($column) { |
|
1109 | + function(Field $field) use ($column) { |
|
1110 | 1110 | if (is_array($field->column())) { |
1111 | 1111 | return in_array($column, $field->column()); |
1112 | 1112 | } |
@@ -1127,7 +1127,7 @@ discard block |
||
1127 | 1127 | |
1128 | 1128 | $values = $this->model->toArray(); |
1129 | 1129 | |
1130 | - $this->builder->fields()->each(function (Field $field) use ($values) { |
|
1130 | + $this->builder->fields()->each(function(Field $field) use ($values) { |
|
1131 | 1131 | $field->setOriginal($values); |
1132 | 1132 | }); |
1133 | 1133 | } |
@@ -1157,7 +1157,7 @@ discard block |
||
1157 | 1157 | |
1158 | 1158 | $data = $this->model->toArray(); |
1159 | 1159 | |
1160 | - $this->builder->fields()->each(function (Field $field) use ($data) { |
|
1160 | + $this->builder->fields()->each(function(Field $field) use ($data) { |
|
1161 | 1161 | if (!in_array($field->column(), $this->ignored, true)) { |
1162 | 1162 | $field->fill($data); |
1163 | 1163 | } |
@@ -1301,7 +1301,7 @@ discard block |
||
1301 | 1301 | */ |
1302 | 1302 | public function setWidth($fieldWidth = 8, $labelWidth = 2): self |
1303 | 1303 | { |
1304 | - $this->builder()->fields()->each(function ($field) use ($fieldWidth, $labelWidth) { |
|
1304 | + $this->builder()->fields()->each(function($field) use ($fieldWidth, $labelWidth) { |
|
1305 | 1305 | /* @var Field $field */ |
1306 | 1306 | $field->setWidth($fieldWidth, $labelWidth); |
1307 | 1307 | }); |