@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | * @param string $relation |
104 | 104 | * @param Model $model |
105 | 105 | */ |
106 | - public function __construct($relation, $model = null,$key = null) |
|
106 | + public function __construct($relation, $model = null, $key = null) |
|
107 | 107 | { |
108 | 108 | $this->relationName = $relation; |
109 | 109 | |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | $values = $this->original[$key]; |
245 | 245 | } |
246 | 246 | |
247 | - $this->fields->each(function (Field $field) use ($values) { |
|
247 | + $this->fields->each(function(Field $field) use ($values) { |
|
248 | 248 | $field->setOriginal($values); |
249 | 249 | }); |
250 | 250 | } |
@@ -282,9 +282,9 @@ discard block |
||
282 | 282 | * |
283 | 283 | * @return NestedForm |
284 | 284 | */ |
285 | - protected function buildNestedForm($column, \Closure $builder,$key = null,$model = null) |
|
285 | + protected function buildNestedForm($column, \Closure $builder, $key = null, $model = null) |
|
286 | 286 | { |
287 | - $form = new Form\NestedForm($column, $model,$key); |
|
287 | + $form = new Form\NestedForm($column, $model, $key); |
|
288 | 288 | |
289 | 289 | $form->setForm($this->form); |
290 | 290 | |
@@ -383,7 +383,7 @@ discard block |
||
383 | 383 | } |
384 | 384 | $model = $relation->getRelated()->replicate()->forceFill($data); |
385 | 385 | |
386 | - $forms[$key] = $this->buildNestedForm($this->column, $this->builder,$key, $model) |
|
386 | + $forms[$key] = $this->buildNestedForm($this->column, $this->builder, $key, $model) |
|
387 | 387 | ->fill($data); |
388 | 388 | } |
389 | 389 | } else { |
@@ -392,7 +392,7 @@ discard block |
||
392 | 392 | |
393 | 393 | $model = $relation->getRelated()->replicate()->forceFill($data); |
394 | 394 | |
395 | - $forms[$key] = $this->buildNestedForm($this->column, $this->builder,null, $model) |
|
395 | + $forms[$key] = $this->buildNestedForm($this->column, $this->builder, null, $model) |
|
396 | 396 | ->fill($data); |
397 | 397 | } |
398 | 398 | } |
@@ -645,7 +645,7 @@ discard block |
||
645 | 645 | } |
646 | 646 | |
647 | 647 | /* Build row elements */ |
648 | - $template = array_reduce($fields, function ($all, $field) { |
|
648 | + $template = array_reduce($fields, function($all, $field) { |
|
649 | 649 | $all .= "<td>{$field}</td>"; |
650 | 650 | |
651 | 651 | return $all; |
@@ -68,9 +68,9 @@ discard block |
||
68 | 68 | |
69 | 69 | $prepare = $form->prepare($input); |
70 | 70 | |
71 | - return collect($prepare)->reject(function ($item) { |
|
71 | + return collect($prepare)->reject(function($item) { |
|
72 | 72 | return $item[NestedForm::REMOVE_FLAG_NAME] == 1; |
73 | - })->map(function ($item) { |
|
73 | + })->map(function($item) { |
|
74 | 74 | unset($item[NestedForm::REMOVE_FLAG_NAME]); |
75 | 75 | |
76 | 76 | return $item; |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | return 'id'; |
87 | 87 | } |
88 | 88 | |
89 | - protected function buildNestedForm($column, \Closure $builder, $key = null,$model = null) |
|
89 | + protected function buildNestedForm($column, \Closure $builder, $key = null, $model = null) |
|
90 | 90 | { |
91 | 91 | $form = new NestedForm($column); |
92 | 92 |