@@ -251,7 +251,7 @@ discard block |
||
| 251 | 251 | return $ret; |
| 252 | 252 | } |
| 253 | 253 | |
| 254 | - collect(explode(',', $id))->filter()->each(function ($id) { |
|
| 254 | + collect(explode(',', $id))->filter()->each(function($id) { |
|
| 255 | 255 | $builder = $this->model()->newQuery(); |
| 256 | 256 | |
| 257 | 257 | if ($this->isSoftDeletes) { |
@@ -304,9 +304,9 @@ discard block |
||
| 304 | 304 | |
| 305 | 305 | $data = $model->toArray(); |
| 306 | 306 | |
| 307 | - $this->fields()->filter(function ($field) { |
|
| 307 | + $this->fields()->filter(function($field) { |
|
| 308 | 308 | return $field instanceof Field\File; |
| 309 | - })->each(function (Field\File $file) use ($data) { |
|
| 309 | + })->each(function(Field\File $file) use ($data) { |
|
| 310 | 310 | $file->setOriginal($data); |
| 311 | 311 | |
| 312 | 312 | $file->destroy(); |
@@ -331,7 +331,7 @@ discard block |
||
| 331 | 331 | return $response; |
| 332 | 332 | } |
| 333 | 333 | |
| 334 | - DB::transaction(function () { |
|
| 334 | + DB::transaction(function() { |
|
| 335 | 335 | $inserts = $this->prepareInsert($this->updates); |
| 336 | 336 | |
| 337 | 337 | foreach ($inserts as $column => $value) { |
@@ -533,7 +533,7 @@ discard block |
||
| 533 | 533 | return $response; |
| 534 | 534 | } |
| 535 | 535 | |
| 536 | - DB::transaction(function () { |
|
| 536 | + DB::transaction(function() { |
|
| 537 | 537 | $updates = $this->prepareUpdate($this->updates); |
| 538 | 538 | |
| 539 | 539 | foreach ($updates as $column => $value) { |
@@ -985,7 +985,7 @@ discard block |
||
| 985 | 985 | protected function getFieldByColumn($column) |
| 986 | 986 | { |
| 987 | 987 | return $this->fields()->first( |
| 988 | - function (Field $field) use ($column) { |
|
| 988 | + function(Field $field) use ($column) { |
|
| 989 | 989 | if (is_array($field->column())) { |
| 990 | 990 | return in_array($column, $field->column()); |
| 991 | 991 | } |
@@ -1004,7 +1004,7 @@ discard block |
||
| 1004 | 1004 | { |
| 1005 | 1005 | $values = $this->model->toArray(); |
| 1006 | 1006 | |
| 1007 | - $this->fields()->each(function (Field $field) use ($values) { |
|
| 1007 | + $this->fields()->each(function(Field $field) use ($values) { |
|
| 1008 | 1008 | $field->setOriginal($values); |
| 1009 | 1009 | }); |
| 1010 | 1010 | } |
@@ -1032,7 +1032,7 @@ discard block |
||
| 1032 | 1032 | |
| 1033 | 1033 | $data = $this->model->toArray(); |
| 1034 | 1034 | |
| 1035 | - $this->fields()->each(function (Field $field) use ($data) { |
|
| 1035 | + $this->fields()->each(function(Field $field) use ($data) { |
|
| 1036 | 1036 | if (!in_array($field->column(), $this->ignored, true)) { |
| 1037 | 1037 | $field->fill($data); |
| 1038 | 1038 | } |
@@ -1162,7 +1162,7 @@ discard block |
||
| 1162 | 1162 | */ |
| 1163 | 1163 | public function setWidth($fieldWidth = 8, $labelWidth = 2): self |
| 1164 | 1164 | { |
| 1165 | - $this->fields()->each(function ($field) use ($fieldWidth, $labelWidth) { |
|
| 1165 | + $this->fields()->each(function($field) use ($fieldWidth, $labelWidth) { |
|
| 1166 | 1166 | /* @var Field $field */ |
| 1167 | 1167 | $field->setWidth($fieldWidth, $labelWidth); |
| 1168 | 1168 | }); |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | { |
| 53 | 53 | return collect(Arr::dot($from)) |
| 54 | 54 | ->keys() |
| 55 | - ->reject(function ($key) use ($to) { |
|
| 55 | + ->reject(function($key) use ($to) { |
|
| 56 | 56 | return Arr::has($to, $key); |
| 57 | 57 | }); |
| 58 | 58 | } |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | $this->line(''); |
| 67 | 67 | $this->comment("{$title}:"); |
| 68 | 68 | |
| 69 | - $diff->each(function ($key) use ($error) { |
|
| 69 | + $diff->each(function($key) use ($error) { |
|
| 70 | 70 | if ($error) { |
| 71 | 71 | $this->error(" {$key}"); |
| 72 | 72 | } else { |
@@ -102,9 +102,9 @@ discard block |
||
| 102 | 102 | */ |
| 103 | 103 | protected function applyCascadeConditions() |
| 104 | 104 | { |
| 105 | - if( $this->form ) { |
|
| 105 | + if ($this->form) { |
|
| 106 | 106 | $this->form->fields() |
| 107 | - ->filter(function (Form\Field $field) { |
|
| 107 | + ->filter(function(Form\Field $field) { |
|
| 108 | 108 | return $field instanceof CascadeGroup |
| 109 | 109 | && $field->dependsOn($this) |
| 110 | 110 | && $this->hitsCondition($field); |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | return; |
| 163 | 163 | } |
| 164 | 164 | |
| 165 | - $cascadeGroups = collect($this->conditions)->map(function ($condition) { |
|
| 165 | + $cascadeGroups = collect($this->conditions)->map(function($condition) { |
|
| 166 | 166 | return [ |
| 167 | 167 | 'class' => $this->getCascadeClass($condition['value']), |
| 168 | 168 | 'operator' => $condition['operator'], |
@@ -48,7 +48,7 @@ |
||
| 48 | 48 | $this->value = json_encode($this->value, JSON_PRETTY_PRINT); |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - $this->mountPicker(function ($btn) { |
|
| 51 | + $this->mountPicker(function($btn) { |
|
| 52 | 52 | $this->addPickBtn($btn); |
| 53 | 53 | }); |
| 54 | 54 | |
@@ -125,7 +125,7 @@ |
||
| 125 | 125 | $value = explode($this->separator, $value); |
| 126 | 126 | } |
| 127 | 127 | |
| 128 | - return collect(Arr::wrap($value))->map(function ($item) use ($field) { |
|
| 128 | + return collect(Arr::wrap($value))->map(function($item) use ($field) { |
|
| 129 | 129 | return [ |
| 130 | 130 | 'url' => $this->field->objectUrl($item), |
| 131 | 131 | 'value' => $item, |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | $title = $this->trans('title'); |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - $html = ''; |
|
| 41 | + $html = ''; |
|
| 42 | 42 | |
| 43 | 43 | if ($async = is_subclass_of($callback, Renderable::class)) { |
| 44 | 44 | $this->renderable = $callback; |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | 'html' => $html, |
| 55 | 55 | 'key' => $this->getKey(), |
| 56 | 56 | 'value' => $this->value, |
| 57 | - 'name' => $this->getKey() . '-' . str_replace('.', '_', $this->getColumn()->getName()), |
|
| 57 | + 'name' => $this->getKey().'-'.str_replace('.', '_', $this->getColumn()->getName()), |
|
| 58 | 58 | ]); |
| 59 | 59 | } |
| 60 | 60 | } |
@@ -102,7 +102,7 @@ |
||
| 102 | 102 | */ |
| 103 | 103 | protected function addActionScripts() |
| 104 | 104 | { |
| 105 | - $this->actions->each(function ($action) { |
|
| 105 | + $this->actions->each(function($action) { |
|
| 106 | 106 | $action->setGrid($this->grid); |
| 107 | 107 | |
| 108 | 108 | if (method_exists($action, 'script')) { |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | 'scopes' => $filter->getScopes(), |
| 23 | 23 | 'label' => $label, |
| 24 | 24 | 'cancel' => $filter->urlWithoutScopes(), |
| 25 | - 'btn_class' => uniqid() . '-filter-btn', |
|
| 25 | + 'btn_class' => uniqid().'-filter-btn', |
|
| 26 | 26 | 'expand' => $filter->expand, |
| 27 | 27 | 'filter_id' => $filter->getFilterID(), |
| 28 | 28 | ]); |
@@ -33,9 +33,9 @@ discard block |
||
| 33 | 33 | */ |
| 34 | 34 | protected function getGridColumns() |
| 35 | 35 | { |
| 36 | - return $this->grid->columns()->reject(function ($column) { |
|
| 36 | + return $this->grid->columns()->reject(function($column) { |
|
| 37 | 37 | return in_array($column->getName(), static::$ignored); |
| 38 | - })->map(function ($column) { |
|
| 38 | + })->map(function($column) { |
|
| 39 | 39 | return [$column->getName() => $column->getLabel()]; |
| 40 | 40 | })->collapse(); |
| 41 | 41 | } |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | */ |
| 48 | 48 | public static function ignore($name) |
| 49 | 49 | { |
| 50 | - static::$ignored = array_merge(static::$ignored, (array)$name); |
|
| 50 | + static::$ignored = array_merge(static::$ignored, (array) $name); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | /** |