@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | foreach ($list as $value => $label) { |
| 108 | 108 | $option_attributes = ['value' => $value]; |
| 109 | 109 | if ($selected == $value) { |
| 110 | - $option_attributes['selected'] = 'selected'; |
|
| 110 | + $option_attributes['selected'] = 'selected'; |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | $options .= new Element('option', (string)$label, $option_attributes); |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | */ |
| 125 | 125 | public static function legend(string $label, array $attributes = []): string |
| 126 | 126 | { |
| 127 | - return '' . (new Element('legend', $label, $attributes)); |
|
| 127 | + return ''.(new Element('legend', $label, $attributes)); |
|
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | /** |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | |
| 146 | 146 | public static function button(string $label, array $attributes = []): string |
| 147 | 147 | { |
| 148 | - return '' . (new Element('button', $label, $attributes)); |
|
| 148 | + return ''.(new Element('button', $label, $attributes)); |
|
| 149 | 149 | } |
| 150 | 150 | |
| 151 | 151 | /** |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | unset($attributes['label']); |
| 200 | 200 | $input = new Element($tag, $content, $attributes, false); |
| 201 | 201 | |
| 202 | - if($label_text){ |
|
| 202 | + if ($label_text) { |
|
| 203 | 203 | if (!empty($attributes['label-wrap'])) |
| 204 | 204 | $ret = self::label(null, $label_text.$input); |
| 205 | 205 | else |
@@ -200,13 +200,14 @@ |
||
| 200 | 200 | $input = new Element($tag, $content, $attributes, false); |
| 201 | 201 | |
| 202 | 202 | if($label_text){ |
| 203 | - if (!empty($attributes['label-wrap'])) |
|
| 204 | - $ret = self::label(null, $label_text.$input); |
|
| 205 | - else |
|
| 206 | - $ret = self::label($attributes['id'], $label_text).$input; |
|
| 203 | + if (!empty($attributes['label-wrap'])) { |
|
| 204 | + $ret = self::label(null, $label_text.$input); |
|
| 205 | + } else { |
|
| 206 | + $ret = self::label($attributes['id'], $label_text).$input; |
|
| 207 | + } |
|
| 208 | + } else { |
|
| 209 | + $ret = $input; |
|
| 207 | 210 | } |
| 208 | - else |
|
| 209 | - $ret = $input; |
|
| 210 | 211 | |
| 211 | 212 | return (string)$ret; |
| 212 | 213 | } |