Test Failed
Push — ft/elements ( 383c8a )
by Ben
10:58
created
src/FormGroups/FormGroup.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -54,8 +54,8 @@  discard block
 block discarded – undo
54 54
     {
55 55
         $formGroup = new static(new Fields([$field]));
56 56
 
57
-        if($field->getLabel()) $formGroup->label($field->getLabel());
58
-        if($field->getDescription()) $formGroup->description($field->getDescription());
57
+        if ($field->getLabel()) $formGroup->label($field->getLabel());
58
+        if ($field->getDescription()) $formGroup->description($field->getDescription());
59 59
         $formGroup->markAsRequired($field->required());
60 60
 
61 61
         return $formGroup;
@@ -64,8 +64,8 @@  discard block
 block discarded – undo
64 64
     public function fields(): Fields
65 65
     {
66 66
         // Manipulate each field with a custom view, unless specifically set.
67
-        $this->fields = $this->fields->map(function(Field $field){
68
-            if(!$field->hasCustomView()){
67
+        $this->fields = $this->fields->map(function(Field $field) {
68
+            if (!$field->hasCustomView()) {
69 69
                 $field->view(static::$fieldView); // Field should be immutable but it's not, ...
70 70
             }
71 71
 
@@ -179,6 +179,6 @@  discard block
 block discarded – undo
179 179
 
180 180
     private static function generateRandomKey(): string
181 181
     {
182
-        return md5(time() . mt_rand(1,9999));
182
+        return md5(time().mt_rand(1, 9999));
183 183
     }
184 184
 }
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,8 +54,12 @@
 block discarded – undo
54 54
     {
55 55
         $formGroup = new static(new Fields([$field]));
56 56
 
57
-        if($field->getLabel()) $formGroup->label($field->getLabel());
58
-        if($field->getDescription()) $formGroup->description($field->getDescription());
57
+        if($field->getLabel()) {
58
+            $formGroup->label($field->getLabel());
59
+        }
60
+        if($field->getDescription()) {
61
+            $formGroup->description($field->getDescription());
62
+        }
59 63
         $formGroup->markAsRequired($field->required());
60 64
 
61 65
         return $formGroup;
Please login to merge, or discard this patch.