@@ -26,8 +26,9 @@ discard block |
||
26 | 26 | State::ERROR, |
27 | 27 | State::DISABLED |
28 | 28 | ]; |
29 | - if (isset($label) && $label !== "") |
|
30 | - $this->setLabel($label); |
|
29 | + if (isset($label) && $label !== "") { |
|
30 | + $this->setLabel($label); |
|
31 | + } |
|
31 | 32 | $this->setField($field); |
32 | 33 | $this->_validation = NULL; |
33 | 34 | } |
@@ -59,8 +60,9 @@ discard block |
||
59 | 60 | * @return mixed |
60 | 61 | */ |
61 | 62 | public function getLabel() { |
62 | - if (\array_key_exists("label", $this->content)) |
|
63 | - return $this->content["label"]; |
|
63 | + if (\array_key_exists("label", $this->content)) { |
|
64 | + return $this->content["label"]; |
|
65 | + } |
|
64 | 66 | } |
65 | 67 | |
66 | 68 | /** |
@@ -145,7 +147,7 @@ discard block |
||
145 | 147 | if($type->getType()=='empty'){ |
146 | 148 | $this->addToProperty('class', 'required'); |
147 | 149 | } |
148 | - }elseif ($type === 'empty' || ($type['type'] ?? '') === 'empty') { |
|
150 | + } elseif ($type === 'empty' || ($type['type'] ?? '') === 'empty') { |
|
149 | 151 | $this->addToProperty('class', 'required'); |
150 | 152 | } |
151 | 153 | $this->_validation->addRule($type, $prompt, $value); |