@@ -29,12 +29,14 @@ discard block |
||
29 | 29 | if (\is_string($end)) { |
30 | 30 | $label=$end; |
31 | 31 | \array_pop($fields); |
32 | - } else |
|
33 | - $label=NULL; |
|
32 | + } else { |
|
33 | + $label=NULL; |
|
34 | + } |
|
34 | 35 | } |
35 | 36 | } |
36 | - if (isset($label)) |
|
37 | - $this->setLabel($label); |
|
37 | + if (isset($label)) { |
|
38 | + $this->setLabel($label); |
|
39 | + } |
|
38 | 40 | foreach ( $fields as $field ) { |
39 | 41 | $this->addItem($field); |
40 | 42 | } |
@@ -57,8 +59,9 @@ discard block |
||
57 | 59 | |
58 | 60 | public function addItem($item) { |
59 | 61 | $item=parent::addItem($item); |
60 | - if($item instanceof HtmlFormField) |
|
61 | - $item->setContainer($this); |
|
62 | + if($item instanceof HtmlFormField) { |
|
63 | + $item->setContainer($this); |
|
64 | + } |
|
62 | 65 | return $item; |
63 | 66 | } |
64 | 67 | |
@@ -73,8 +76,9 @@ discard block |
||
73 | 76 | if ($this->_equalWidth) { |
74 | 77 | $count=$this->count(); |
75 | 78 | $this->addToProperty("class", Wide::getConstants()["W".$count]." fields"); |
76 | - } else |
|
77 | - $this->addToProperty("class", "fields"); |
|
79 | + } else { |
|
80 | + $this->addToProperty("class", "fields"); |
|
81 | + } |
|
78 | 82 | return parent::compile($js, $view); |
79 | 83 | } |
80 | 84 | |
@@ -115,8 +119,9 @@ discard block |
||
115 | 119 | $fields[]=$itemO; |
116 | 120 | } |
117 | 121 | $radios=new HtmlFormFields($identifier, $fields); |
118 | - if (isset($label)) |
|
119 | - $radios->setLabel($label)->setProperty("for", $name); |
|
122 | + if (isset($label)) { |
|
123 | + $radios->setLabel($label)->setProperty("for", $name); |
|
124 | + } |
|
120 | 125 | return $radios; |
121 | 126 | } |
122 | 127 | |
@@ -132,8 +137,9 @@ discard block |
||
132 | 137 | $fields[]=$itemO; |
133 | 138 | } |
134 | 139 | $radios=new HtmlFormFields($identifier, $fields); |
135 | - if (isset($label)) |
|
136 | - $radios->setLabel($label)->setProperty("for", $name); |
|
140 | + if (isset($label)) { |
|
141 | + $radios->setLabel($label)->setProperty("for", $name); |
|
142 | + } |
|
137 | 143 | return $radios; |
138 | 144 | } |
139 | 145 |