Completed
Pull Request — master (#1528)
by
unknown
02:33
created
src/Form.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -305,9 +305,9 @@  discard block
 block discarded – undo
305 305
         $data = $this->model->with($this->getRelations())
306 306
             ->findOrFail($id)->toArray();
307 307
 
308
-        $this->builder->fields()->filter(function ($field) {
308
+        $this->builder->fields()->filter(function($field) {
309 309
             return $field instanceof Field\File;
310
-        })->each(function (File $file) use ($data) {
310
+        })->each(function(File $file) use ($data) {
311 311
             $file->setOriginal($data);
312 312
 
313 313
             $file->destroy();
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
             return $response;
333 333
         }
334 334
 
335
-        DB::transaction(function () {
335
+        DB::transaction(function() {
336 336
             $inserts = $this->prepareInsert($this->updates);
337 337
 
338 338
             foreach ($inserts as $column => $value) {
@@ -522,9 +522,9 @@  discard block
 block discarded – undo
522 522
 
523 523
         // Handle validation errors.
524 524
         if ($validationMessages = $this->validationMessages($data)) {
525
-            if(!$isEditable){
525
+            if (!$isEditable) {
526 526
                 return back()->withInput()->withErrors($validationMessages);
527
-            }else{
527
+            } else {
528 528
                 return response(['errors' => array_dot($validationMessages->getMessages())], 422);
529 529
             }
530 530
         }
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
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) {
@@ -929,7 +929,7 @@  discard block
 block discarded – undo
929 929
     protected function getFieldByColumn($column)
930 930
     {
931 931
         return $this->builder->fields()->first(
932
-            function (Field $field) use ($column) {
932
+            function(Field $field) use ($column) {
933 933
                 if (is_array($field->column())) {
934 934
                     return in_array($column, $field->column());
935 935
                 }
@@ -950,7 +950,7 @@  discard block
 block discarded – undo
950 950
 
951 951
         $values = $this->model->toArray();
952 952
 
953
-        $this->builder->fields()->each(function (Field $field) use ($values) {
953
+        $this->builder->fields()->each(function(Field $field) use ($values) {
954 954
             $field->setOriginal($values);
955 955
         });
956 956
     }
@@ -972,7 +972,7 @@  discard block
 block discarded – undo
972 972
 
973 973
         $data = $this->model->toArray();
974 974
 
975
-        $this->builder->fields()->each(function (Field $field) use ($data) {
975
+        $this->builder->fields()->each(function(Field $field) use ($data) {
976 976
             $field->fill($data);
977 977
         });
978 978
     }
@@ -1091,7 +1091,7 @@  discard block
 block discarded – undo
1091 1091
      */
1092 1092
     public function setWidth($fieldWidth = 8, $labelWidth = 2)
1093 1093
     {
1094
-        $this->builder()->fields()->each(function ($field) use ($fieldWidth, $labelWidth) {
1094
+        $this->builder()->fields()->each(function($field) use ($fieldWidth, $labelWidth) {
1095 1095
             /* @var Field $field  */
1096 1096
             $field->setWidth($fieldWidth, $labelWidth);
1097 1097
         });
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -524,7 +524,7 @@
 block discarded – undo
524 524
         if ($validationMessages = $this->validationMessages($data)) {
525 525
             if(!$isEditable){
526 526
                 return back()->withInput()->withErrors($validationMessages);
527
-            }else{
527
+            } else{
528 528
                 return response(['errors' => array_dot($validationMessages->getMessages())], 422);
529 529
             }
530 530
         }
Please login to merge, or discard this patch.