Completed
Pull Request — master (#1350)
by
unknown
03:06
created
src/Form/Builder.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
      */
260 260
     public function field($name)
261 261
     {
262
-        return $this->fields()->first(function (Field $field) use ($name) {
262
+        return $this->fields()->first(function(Field $field) use ($name) {
263 263
             return $field->column() == $name;
264 264
         });
265 265
     }
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
             $this->form->model()->getUpdatedAtColumn(),
503 503
         ];
504 504
 
505
-        $this->fields = $this->fields()->reject(function (Field $field) use ($reservedColumns) {
505
+        $this->fields = $this->fields()->reject(function(Field $field) use ($reservedColumns) {
506 506
             return in_array($field->column(), $reservedColumns);
507 507
         });
508 508
 
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
     {
529 529
         $rules = [];
530 530
         foreach ($this->fields() as $item) {
531
-            if(!empty($item->getRules())){
531
+            if (!empty($item->getRules())) {
532 532
                 $rules[$item->id] = $item->getRules();
533 533
             }
534 534
         }
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
     public function getRuleMessages()
545 545
     {
546 546
         $rules = [];
547
-        foreach ($this->fields() as $item ) {
547
+        foreach ($this->fields() as $item) {
548 548
             foreach ($item->validationMessages as $key => $value) {
549 549
                 $rules[$key] = $value;
550 550
             }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -366,7 +366,9 @@
 block discarded – undo
366 366
      */
367 367
     public function title()
368 368
     {
369
-        if ($this->Title != "") return $this->Title;
369
+        if ($this->Title != "") {
370
+            return $this->Title;
371
+        }
370 372
 
371 373
         if ($this->mode == static::MODE_CREATE) {
372 374
             return trans('admin.create');
Please login to merge, or discard this patch.
src/Form/Field.php 3 patches
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
     {
245 245
         $column = is_array($this->column) ? current($this->column) : $this->column;
246 246
 
247
-        $trans_key = 'validation.attributes.' . strtolower($column);
247
+        $trans_key = 'validation.attributes.'.strtolower($column);
248 248
         if (isset($arguments[0])) {
249 249
             $label = $arguments[0];
250 250
         } else if (Lang::has($trans_key)) {
@@ -619,9 +619,9 @@  discard block
 block discarded – undo
619 619
                 if (!array_key_exists($column, $input)) {
620 620
                     continue;
621 621
                 }
622
-                $input[$column . $key] = array_get($input, $column);
623
-                $rules[$column . $key] = $fieldRules;
624
-                $attributes[$column . $key] = $this->label . "[$column]";
622
+                $input[$column.$key] = array_get($input, $column);
623
+                $rules[$column.$key] = $fieldRules;
624
+                $attributes[$column.$key] = $this->label."[$column]";
625 625
             }
626 626
         }
627 627
 
@@ -659,7 +659,7 @@  discard block
 block discarded – undo
659 659
         if (is_array($attribute)) {
660 660
             $this->attributes = array_merge($this->attributes, $attribute);
661 661
         } else {
662
-            $this->attributes[$attribute] = (string)$value;
662
+            $this->attributes[$attribute] = (string) $value;
663 663
         }
664 664
 
665 665
         return $this;
@@ -696,7 +696,7 @@  discard block
 block discarded – undo
696 696
      */
697 697
     public function getPlaceholder()
698 698
     {
699
-        return $this->placeholder ?: trans('admin.input') . ' ' . $this->label;
699
+        return $this->placeholder ?: trans('admin.input').' '.$this->label;
700 700
     }
701 701
 
702 702
     /**
@@ -721,7 +721,7 @@  discard block
 block discarded – undo
721 721
         $html = [];
722 722
 
723 723
         foreach ($this->attributes as $name => $value) {
724
-            $html[] = $name . '="' . e($value) . '"';
724
+            $html[] = $name.'="'.e($value).'"';
725 725
         }
726 726
 
727 727
         return implode(' ', $html);
@@ -766,7 +766,7 @@  discard block
 block discarded – undo
766 766
      */
767 767
     public function setElementClass($class)
768 768
     {
769
-        $this->elementClass = (array)$class;
769
+        $this->elementClass = (array) $class;
770 770
 
771 771
         return $this;
772 772
     }
@@ -781,7 +781,7 @@  discard block
 block discarded – undo
781 781
         if (!$this->elementClass) {
782 782
             $name = $this->elementName ?: $this->formatName($this->column);
783 783
 
784
-            $this->elementClass = (array)str_replace([
784
+            $this->elementClass = (array) str_replace([
785 785
                 '[',
786 786
                 ']'
787 787
             ], '_', $name);
@@ -825,13 +825,13 @@  discard block
 block discarded – undo
825 825
             $classes = [];
826 826
 
827 827
             foreach ($elementClass as $index => $class) {
828
-                $classes[$index] = '.' . (is_array($class) ? implode('.', $class) : $class);
828
+                $classes[$index] = '.'.(is_array($class) ? implode('.', $class) : $class);
829 829
             }
830 830
 
831 831
             return $classes;
832 832
         }
833 833
 
834
-        return '.' . implode('.', $elementClass);
834
+        return '.'.implode('.', $elementClass);
835 835
     }
836 836
 
837 837
     /**
@@ -844,7 +844,7 @@  discard block
 block discarded – undo
844 844
     public function addElementClass($class)
845 845
     {
846 846
         if (is_array($class) || is_string($class)) {
847
-            $this->elementClass = array_merge($this->elementClass, (array)$class);
847
+            $this->elementClass = array_merge($this->elementClass, (array) $class);
848 848
 
849 849
             $this->elementClass = array_unique($this->elementClass);
850 850
         }
@@ -864,7 +864,7 @@  discard block
 block discarded – undo
864 864
         $delClass = [];
865 865
 
866 866
         if (is_string($class) || is_array($class)) {
867
-            $delClass = (array)$class;
867
+            $delClass = (array) $class;
868 868
         }
869 869
 
870 870
         foreach ($delClass as $del) {
@@ -911,7 +911,7 @@  discard block
 block discarded – undo
911 911
 
912 912
         $class = explode('\\', get_called_class());
913 913
 
914
-        return 'admin::form.' . strtolower(end($class));
914
+        return 'admin::form.'.strtolower(end($class));
915 915
     }
916 916
 
917 917
     /**
Please login to merge, or discard this patch.
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
     /**
408 408
      * Get or set rules.
409 409
      *
410
-     * @param null  $rules
410
+     * @param string  $rules
411 411
      * @param array $messages
412 412
      *
413 413
      * @return $this
@@ -650,7 +650,7 @@  discard block
 block discarded – undo
650 650
      * Add html attributes to elements.
651 651
      *
652 652
      * @param array|string $attribute
653
-     * @param mixed        $value
653
+     * @param boolean|string        $value
654 654
      *
655 655
      * @return $this
656 656
      */
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -906,7 +906,7 @@
 block discarded – undo
906 906
      */
907 907
     public function popover($title = null, $content)
908 908
     {
909
-      return  $this->attribute([
909
+        return  $this->attribute([
910 910
             'data-popover-title' => $title,
911 911
             'data-popover'       => $content,
912 912
         ]);
Please login to merge, or discard this patch.
src/Grid.php 4 patches
Doc Comments   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
      * Get or set option for grid.
230 230
      *
231 231
      * @param string $key
232
-     * @param mixed  $value
232
+     * @param boolean  $value
233 233
      *
234 234
      * @return $this|mixed
235 235
      */
@@ -286,6 +286,9 @@  discard block
 block discarded – undo
286 286
         return $column;
287 287
     }
288 288
 
289
+    /**
290
+     * @return string
291
+     */
289 292
     public function setLabel($label , $relationColumn)
290 293
     {
291 294
         $trans_key = 'validation.attributes.' . $relationColumn;
@@ -374,7 +377,7 @@  discard block
 block discarded – undo
374 377
     /**
375 378
      * Get the grid paginator.
376 379
      *
377
-     * @return mixed
380
+     * @return Tools\Paginator
378 381
      */
379 382
     public function paginator()
380 383
     {
@@ -750,7 +753,7 @@  discard block
 block discarded – undo
750 753
      *
751 754
      * @param Closure|null $closure
752 755
      *
753
-     * @return $this|Tools\Footer
756
+     * @return callable
754 757
      */
755 758
     public function footer(Closure $closure = null)
756 759
     {
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -290,14 +290,14 @@
 block discarded – undo
290 290
     {
291 291
         $trans_key = 'validation.attributes.' . $relationColumn;
292 292
         $trans_key_low = strtolower($trans_key);
293
-         if (empty($label) && Lang::has($trans_key)) {
294
-             $label = Lang::get($trans_key);
295
-         }
296
-         if (empty($label) && Lang::has($trans_key_low)) {
293
+            if (empty($label) && Lang::has($trans_key)) {
294
+                $label = Lang::get($trans_key);
295
+            }
296
+            if (empty($label) && Lang::has($trans_key_low)) {
297 297
             $label = Lang::get($trans_key_low);
298 298
         }else if (empty($label)) {
299
-             $label = ucfirst($relationColumn);
300
-         }
299
+                $label = ucfirst($relationColumn);
300
+            }
301 301
         return $label;
302 302
     }
303 303
 
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 
272 272
             $relation = $this->model()->eloquent()->$relationName();
273 273
 
274
-            $label = $this->setLabel($label,$relationColumn);
274
+            $label = $this->setLabel($label, $relationColumn);
275 275
 //            $label = empty($label) ? ucfirst($relationColumn) : $label;
276 276
             $name = snake_case($relationName).'.'.$relationColumn;
277 277
         }
@@ -286,16 +286,16 @@  discard block
 block discarded – undo
286 286
         return $column;
287 287
     }
288 288
 
289
-    public function setLabel($label , $relationColumn)
289
+    public function setLabel($label, $relationColumn)
290 290
     {
291
-        $trans_key = 'validation.attributes.' . $relationColumn;
291
+        $trans_key = 'validation.attributes.'.$relationColumn;
292 292
         $trans_key_low = strtolower($trans_key);
293 293
          if (empty($label) && Lang::has($trans_key)) {
294 294
              $label = Lang::get($trans_key);
295 295
          }
296 296
          if (empty($label) && Lang::has($trans_key_low)) {
297 297
             $label = Lang::get($trans_key_low);
298
-        }else if (empty($label)) {
298
+        } else if (empty($label)) {
299 299
              $label = ucfirst($relationColumn);
300 300
          }
301 301
         return $label;
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
         $callback = $this->actionsCallback;
455 455
         $column = $this->addColumn('__actions__', trans('admin.action'));
456 456
 
457
-        $column->display(function ($value) use ($grid, $column, $callback) {
457
+        $column->display(function($value) use ($grid, $column, $callback) {
458 458
             $actions = new Actions($value, $grid, $column, $this);
459 459
 
460 460
             return $actions->display($callback);
@@ -468,7 +468,7 @@  discard block
 block discarded – undo
468 468
      */
469 469
     public function disableRowSelector()
470 470
     {
471
-        $this->tools(function ($tools) {
471
+        $this->tools(function($tools) {
472 472
             /* @var Grid\Tools $tools */
473 473
             $tools->disableBatchActions();
474 474
         });
@@ -492,7 +492,7 @@  discard block
 block discarded – undo
492 492
         $column = new Column(Column::SELECT_COLUMN_NAME, ' ');
493 493
         $column->setGrid($this);
494 494
 
495
-        $column->display(function ($value) use ($grid, $column) {
495
+        $column->display(function($value) use ($grid, $column) {
496 496
             $actions = new RowSelector($value, $grid, $column, $this);
497 497
 
498 498
             return $actions->display();
@@ -519,7 +519,7 @@  discard block
 block discarded – undo
519 519
 
520 520
         Column::setOriginalGridData($data);
521 521
 
522
-        $this->columns->map(function (Column $column) use (&$data) {
522
+        $this->columns->map(function(Column $column) use (&$data) {
523 523
             $data = $column->fill($data);
524 524
 
525 525
             $this->columnNames[] = $column->getName();
@@ -597,7 +597,7 @@  discard block
 block discarded – undo
597 597
      */
598 598
     protected function buildRows(array $data)
599 599
     {
600
-        $this->rows = collect($data)->map(function ($model, $number) {
600
+        $this->rows = collect($data)->map(function($model, $number) {
601 601
             return new Row($number, $model);
602 602
         });
603 603
 
@@ -895,7 +895,7 @@  discard block
 block discarded – undo
895 895
     public function __call($method, $arguments)
896 896
     {
897 897
         $label = isset($arguments[0]) ? $arguments[0] : null;
898
-        $label = $this->setLabel($label,$method);
898
+        $label = $this->setLabel($label, $method);
899 899
 
900 900
         if ($this->model()->eloquent() instanceof MongodbModel) {
901 901
             return $this->addColumn($method, $label);
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -295,7 +295,7 @@
 block discarded – undo
295 295
          }
296 296
          if (empty($label) && Lang::has($trans_key_low)) {
297 297
             $label = Lang::get($trans_key_low);
298
-        }else if (empty($label)) {
298
+        } else if (empty($label)) {
299 299
              $label = ucfirst($relationColumn);
300 300
          }
301 301
         return $label;
Please login to merge, or discard this patch.
src/Grid/Filter/AbstractFilter.php 3 patches
Doc Comments   +5 added lines, -1 removed lines patch added patch discarded remove patch
@@ -106,6 +106,10 @@  discard block
 block discarded – undo
106 106
     {
107 107
         $this->setPresenter(new Text($this->label));
108 108
     }
109
+
110
+    /**
111
+     * @param string $label
112
+     */
109 113
     public function setLabel($label)
110 114
     {
111 115
         $trans_key = 'validation.attributes.' . $label;
@@ -350,7 +354,7 @@  discard block
 block discarded – undo
350 354
      *
351 355
      * @param Presenter $presenter
352 356
      *
353
-     * @return mixed
357
+     * @return Presenter
354 358
      */
355 359
     protected function setPresenter(Presenter $presenter)
356 360
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -108,14 +108,14 @@  discard block
 block discarded – undo
108 108
     }
109 109
     public function setLabel($label)
110 110
     {
111
-        $trans_key = 'validation.attributes.' . $label;
111
+        $trans_key = 'validation.attributes.'.$label;
112 112
         $trans_key_low = strtolower($trans_key);
113 113
         if (Lang::has($trans_key)) {
114 114
             $label = Lang::get($trans_key);
115 115
         }
116 116
         if (Lang::has($trans_key_low)) {
117 117
             $label = Lang::get($trans_key_low);
118
-        }else {
118
+        } else {
119 119
             $label = ucfirst($label);
120 120
         }
121 121
         return $label;
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
 
443 443
         list($relation, $args[0]) = explode('.', $this->column);
444 444
 
445
-        return ['whereHas' => [$relation, function ($relation) use ($args) {
445
+        return ['whereHas' => [$relation, function($relation) use ($args) {
446 446
             call_user_func_array([$relation, $this->query], $args);
447 447
         }]];
448 448
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -558,7 +558,7 @@
 block discarded – undo
558 558
         }
559 559
         if (Lang::has($trans_key_low)) {
560 560
             $label = Lang::get($trans_key_low);
561
-        }else {
561
+        } else {
562 562
             $label = ucfirst($label);
563 563
         }
564 564
         return $label;
Please login to merge, or discard this patch.
src/Grid/Column.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
         $grid = $this->grid;
411 411
         $column = $this;
412 412
 
413
-        $this->display(function ($value) use ($grid, $column, $class) {
413
+        $this->display(function($value) use ($grid, $column, $class) {
414 414
             $definition = new $class($value, $grid, $column, $this);
415 415
 
416 416
             return $definition->display();
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
     protected function htmlEntityEncode($item)
428 428
     {
429 429
         if (is_array($item)) {
430
-            array_walk_recursive($item, function (&$value) {
430
+            array_walk_recursive($item, function(&$value) {
431 431
                 $value = htmlentities($value);
432 432
             });
433 433
         } else {
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
      */
508 508
     protected function callSupportDisplayer($abstract, $arguments)
509 509
     {
510
-        return $this->display(function ($value) use ($abstract, $arguments) {
510
+        return $this->display(function($value) use ($abstract, $arguments) {
511 511
             if (is_array($value) || $value instanceof Arrayable) {
512 512
                 return call_user_func_array([collect($value), $abstract], $arguments);
513 513
             }
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
     protected function callBuiltinDisplayer($abstract, $arguments)
532 532
     {
533 533
         if ($abstract instanceof Closure) {
534
-            return $this->display(function ($value) use ($abstract, $arguments) {
534
+            return $this->display(function($value) use ($abstract, $arguments) {
535 535
                 return $abstract->call($this, ...array_merge([$value], $arguments));
536 536
             });
537 537
         }
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
             $grid = $this->grid;
541 541
             $column = $this;
542 542
 
543
-            return $this->display(function ($value) use ($abstract, $grid, $column, $arguments) {
543
+            return $this->display(function($value) use ($abstract, $grid, $column, $arguments) {
544 544
                 $displayer = new $abstract($value, $grid, $column, $this);
545 545
 
546 546
                 return call_user_func_array([$displayer, 'display'], $arguments);
@@ -551,14 +551,14 @@  discard block
 block discarded – undo
551 551
     }
552 552
     public function setLabel($label)
553 553
     {
554
-        $trans_key = 'validation.attributes.' . $label;
554
+        $trans_key = 'validation.attributes.'.$label;
555 555
         $trans_key_low = strtolower($trans_key);
556 556
         if (Lang::has($trans_key)) {
557 557
             $label = Lang::get($trans_key);
558 558
         }
559 559
         if (Lang::has($trans_key_low)) {
560 560
             $label = Lang::get($trans_key_low);
561
-        }else {
561
+        } else {
562 562
             $label = ucfirst($label);
563 563
         }
564 564
         return $label;
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -558,7 +558,7 @@
 block discarded – undo
558 558
         }
559 559
         if (Lang::has($trans_key_low)) {
560 560
             $label = Lang::get($trans_key_low);
561
-        }else {
561
+        } else {
562 562
             $label = ucfirst($label);
563 563
         }
564 564
         return $label;
Please login to merge, or discard this patch.
src/Grid/Displayers/Actions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 
224 224
     protected function editAction()
225 225
     {
226
-        $_edit =  trans('admin.edit');
226
+        $_edit = trans('admin.edit');
227 227
         return <<<EOT
228 228
 <a class="btn btn-xs btn-default" href="{$this->getResource()}/{$this->getKey()}/edit">
229 229
     <i class="fa fa-edit"></i> $_edit
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
     protected function deleteAction()
236 236
     {
237 237
         $this->___deleteAction();
238
-        $_delete =  trans('admin.delete');
238
+        $_delete = trans('admin.delete');
239 239
         return <<<EOT
240 240
 <a href="javascript:void(0);" data-id="{$this->getKey()}" class="grid-row-delete btn btn-xs btn-danger">
241 241
     <i class="fa fa-trash"></i> $_delete
Please login to merge, or discard this patch.
src/Form/Tab.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     {
48 48
         $fields = $this->collectFields($content);
49 49
 
50
-        $id = 'form-' . ($this->tabs->count() + 1);
50
+        $id = 'form-'.($this->tabs->count() + 1);
51 51
         //if define tab and row inside of tab ,you cant define row in form or simple field in tab
52 52
         $rows = $this->form->builder()->getRows();
53 53
         $this->form->builder()->setRows([]);
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
     public function getTabs()
85 85
     {
86 86
         // If there is no active tab, then active the first.
87
-        if ($this->tabs->filter(function ($tab) {
87
+        if ($this->tabs->filter(function($tab) {
88 88
             return $tab['active'];
89 89
         })->isEmpty()) {
90 90
             $first = $this->tabs->first();
Please login to merge, or discard this patch.
src/Form/Field/PlainInput.php 2 patches
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -26,6 +26,9 @@  discard block
 block discarded – undo
26 26
         return $this;
27 27
     }
28 28
 
29
+    /**
30
+     * @param string $string
31
+     */
29 32
     public function prepend($string)
30 33
     {
31 34
         if (is_null($this->prepend)) {
@@ -35,6 +38,9 @@  discard block
 block discarded – undo
35 38
         return $this;
36 39
     }
37 40
 
41
+    /**
42
+     * @param string $string
43
+     */
38 44
     public function append($string)
39 45
     {
40 46
         if (is_null($this->append)) {
@@ -51,6 +57,9 @@  discard block
 block discarded – undo
51 57
         }
52 58
     }
53 59
 
60
+    /**
61
+     * @param string $attribute
62
+     */
54 63
     protected function defaultAttribute($attribute, $value)
55 64
     {
56 65
         if (!array_key_exists($attribute, $this->attributes)) {
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
     public function prependIcon($icon, $class = "")
12 12
     {
13 13
         if (is_null($this->prepend)) {
14
-            $this->prepend = '<i class="fa fa-' . $icon . " " . $class . '"></i>';
14
+            $this->prepend = '<i class="fa fa-'.$icon." ".$class.'"></i>';
15 15
         }
16 16
 
17 17
         return $this;
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     public function appendIcon($icon, $class = "")
21 21
     {
22 22
         if (is_null($this->append)) {
23
-            $this->append = '<i class="fa fa-' . $icon . " " . $class . '"></i>';
23
+            $this->append = '<i class="fa fa-'.$icon." ".$class.'"></i>';
24 24
         }
25 25
 
26 26
         return $this;
Please login to merge, or discard this patch.
src/Widgets/Form.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
8 8
 use Illuminate\Contracts\Validation\Validator;
9 9
 use Illuminate\Support\Facades\Input;
10 10
 use Illuminate\Support\MessageBag;
11
-use phpDocumentor\Reflection\Types\This;
12 11
 
13 12
 /**
14 13
  * Class Form.
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
      */
173 173
     public function setWidth($fieldWidth = 8, $labelWidth = 2)
174 174
     {
175
-        collect($this->fields)->each(function ($field) use ($fieldWidth, $labelWidth) {
175
+        collect($this->fields)->each(function($field) use ($fieldWidth, $labelWidth) {
176 176
             /* @var Field $field */
177 177
             $field->setWidth($fieldWidth, $labelWidth);
178 178
         });
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
     {
342 342
         $rules = [];
343 343
         foreach ($this->fields as $item) {
344
-            if(!empty($item->getRules())){
344
+            if (!empty($item->getRules())) {
345 345
                 $rules[$item->id] = $item->getRules();
346 346
             }
347 347
         }
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
     public function getRuleMessages()
358 358
     {
359 359
         $rules = [];
360
-        foreach ($this->fields as $item ) {
360
+        foreach ($this->fields as $item) {
361 361
             foreach ($item->validationMessages as $key => $value) {
362 362
                 $rules[$key] = $value;
363 363
             }
Please login to merge, or discard this patch.