Completed
Pull Request — master (#3028)
by
unknown
02:33
created
src/Form/Field.php 3 patches
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -473,11 +473,15 @@
 block discarded – undo
473 473
             $thisRuleArr = array_filter(explode('|', $this->rules));
474 474
 
475 475
             $this->rules = array_merge($thisRuleArr, $rules);
476
-            if (in_array('required', $this->rules)) $this->required();
476
+            if (in_array('required', $this->rules)) {
477
+                $this->required();
478
+            }
477 479
         } elseif (is_string($rules)) {
478 480
             $rules = array_filter(explode('|', "{$this->rules}|$rules"));
479 481
 
480
-            if (in_array('required', $rules)) $this->required();
482
+            if (in_array('required', $rules)) {
483
+                $this->required();
484
+            }
481 485
             $this->rules = implode('|', $rules);
482 486
         }
483 487
 
Please login to merge, or discard this patch.
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
     /**
228 228
      * Field constructor.
229 229
      *
230
-     * @param       $column
230
+     * @param       string $column
231 231
      * @param array $arguments
232 232
      */
233 233
     public function __construct($column, $arguments = [])
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
     /**
464 464
      * Get or set rules.
465 465
      *
466
-     * @param null  $rules
466
+     * @param string  $rules
467 467
      * @param array $messages
468 468
      *
469 469
      * @return $this
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
     /**
564 564
      * Set or get value of the field.
565 565
      *
566
-     * @param null $value
566
+     * @param string $value
567 567
      *
568 568
      * @return mixed
569 569
      */
@@ -734,7 +734,7 @@  discard block
 block discarded – undo
734 734
     /**
735 735
      * Add html attributes to elements.
736 736
      *
737
-     * @param array|string $attribute
737
+     * @param string $attribute
738 738
      * @param mixed        $value
739 739
      *
740 740
      * @return $this
@@ -1019,7 +1019,7 @@  discard block
 block discarded – undo
1019 1019
     /**
1020 1020
      * Get element class.
1021 1021
      *
1022
-     * @return array
1022
+     * @return string
1023 1023
      */
1024 1024
     protected function getGroupClass($default = false)
1025 1025
     : string
@@ -1051,7 +1051,7 @@  discard block
 block discarded – undo
1051 1051
     }
1052 1052
 
1053 1053
     /**
1054
-     * @param array $labelClass
1054
+     * @param string[] $labelClass
1055 1055
      *
1056 1056
      * @return self
1057 1057
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1024,7 +1024,7 @@
 block discarded – undo
1024 1024
     protected function getGroupClass($default = false)
1025 1025
     : string
1026 1026
     {
1027
-        return ($default ? 'form-group ' : '') . implode(' ', array_filter($this->groupClass));
1027
+        return ($default ? 'form-group ' : '').implode(' ', array_filter($this->groupClass));
1028 1028
     }
1029 1029
 
1030 1030
     /**
Please login to merge, or discard this patch.