Completed
Pull Request — master (#3862)
by
unknown
02:45
created
src/Form.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
                 return $ret;
366 366
             }
367 367
 
368
-            collect(explode(',', $id))->filter()->each(function ($id) {
368
+            collect(explode(',', $id))->filter()->each(function($id) {
369 369
                 $builder = $this->model()->newQuery();
370 370
 
371 371
                 if ($this->isSoftDeletes) {
@@ -418,9 +418,9 @@  discard block
 block discarded – undo
418 418
 
419 419
         $data = $model->toArray();
420 420
 
421
-        $this->builder->fields()->filter(function ($field) {
421
+        $this->builder->fields()->filter(function($field) {
422 422
             return $field instanceof Field\File;
423
-        })->each(function (Field\File $file) use ($data) {
423
+        })->each(function(Field\File $file) use ($data) {
424 424
             $file->setOriginal($data);
425 425
 
426 426
             $file->destroy();
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
             return $response;
446 446
         }
447 447
 
448
-        DB::transaction(function () {
448
+        DB::transaction(function() {
449 449
             $inserts = $this->prepareInsert($this->updates);
450 450
 
451 451
             foreach ($inserts as $column => $value) {
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
             return $response;
615 615
         }
616 616
 
617
-        DB::transaction(function () {
617
+        DB::transaction(function() {
618 618
             $updates = $this->prepareUpdate($this->updates);
619 619
 
620 620
             foreach ($updates as $column => $value) {
@@ -1094,7 +1094,7 @@  discard block
 block discarded – undo
1094 1094
     protected function getFieldByColumn($column)
1095 1095
     {
1096 1096
         return $this->builder->fields()->first(
1097
-            function (Field $field) use ($column) {
1097
+            function(Field $field) use ($column) {
1098 1098
                 if (is_array($field->column())) {
1099 1099
                     return in_array($column, $field->column());
1100 1100
                 }
@@ -1115,7 +1115,7 @@  discard block
 block discarded – undo
1115 1115
 
1116 1116
         $values = $this->model->toArray();
1117 1117
 
1118
-        $this->builder->fields()->each(function (Field $field) use ($values) {
1118
+        $this->builder->fields()->each(function(Field $field) use ($values) {
1119 1119
             $field->setOriginal($values);
1120 1120
         });
1121 1121
     }
@@ -1148,7 +1148,7 @@  discard block
 block discarded – undo
1148 1148
         // resolve CamelCase Model relation method name
1149 1149
         $data = $this->solveCamelCaseModelRelationMethodNames($data, $relations);
1150 1150
 
1151
-        $this->builder->fields()->each(function (Field $field) use ($data) {
1151
+        $this->builder->fields()->each(function(Field $field) use ($data) {
1152 1152
             if (!in_array($field->column(), $this->ignored)) {
1153 1153
                 $field->fill($data);
1154 1154
             }
@@ -1292,7 +1292,7 @@  discard block
 block discarded – undo
1292 1292
      */
1293 1293
     public function setWidth($fieldWidth = 8, $labelWidth = 2)
1294 1294
     {
1295
-        $this->builder()->fields()->each(function ($field) use ($fieldWidth, $labelWidth) {
1295
+        $this->builder()->fields()->each(function($field) use ($fieldWidth, $labelWidth) {
1296 1296
             /* @var Field $field  */
1297 1297
             $field->setWidth($fieldWidth, $labelWidth);
1298 1298
         });
@@ -1705,12 +1705,12 @@  discard block
 block discarded – undo
1705 1705
      */
1706 1706
     protected function solveCamelCaseModelRelationMethodNames($data, $relations)
1707 1707
     {
1708
-        $relationsUnderScored = array_map(function ($s) {
1708
+        $relationsUnderScored = array_map(function($s) {
1709 1709
             return strtolower(preg_replace('/(?<!^)[A-Z]/', '_$0', $s));
1710 1710
         }, $relations);
1711 1711
         $relationsDict = array_combine($relations, $relationsUnderScored);
1712 1712
 
1713
-        function replaceKeys (array $input, array $relationsDict) {
1713
+        function replaceKeys(array $input, array $relationsDict) {
1714 1714
             $return = [];
1715 1715
             foreach ($input as $key => $value) {
1716 1716
                 if (is_array($value)) {
Please login to merge, or discard this patch.