@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | foreach ($items as $k=>$v){ |
25 | 25 | $this->addItem([$k,$v]); |
26 | 26 | } |
27 | - }else{ |
|
27 | + } else{ |
|
28 | 28 | foreach ($items as $item){ |
29 | 29 | $this->addItem($item); |
30 | 30 | } |
@@ -80,9 +80,9 @@ discard block |
||
80 | 80 | * @return \Ajax\common\html\HtmlDoubleElement |
81 | 81 | */ |
82 | 82 | public function getItem($index) { |
83 | - if (is_int($index)) |
|
84 | - return $this->content[$index]; |
|
85 | - else { |
|
83 | + if (is_int($index)) { |
|
84 | + return $this->content[$index]; |
|
85 | + } else { |
|
86 | 86 | $elm=$this->getElementById($index, $this->content); |
87 | 87 | return $elm; |
88 | 88 | } |
@@ -144,10 +144,11 @@ discard block |
||
144 | 144 | $i=0; |
145 | 145 | foreach ($properties as $k=>$v){ |
146 | 146 | $c=$this->content[$i++]; |
147 | - if(isset($c)) |
|
148 | - $c->setProperty($k,$v); |
|
149 | - else |
|
150 | - return $this; |
|
147 | + if(isset($c)) { |
|
148 | + $c->setProperty($k,$v); |
|
149 | + } else { |
|
150 | + return $this; |
|
151 | + } |
|
151 | 152 | } |
152 | 153 | return $this; |
153 | 154 | } |
@@ -167,8 +168,7 @@ discard block |
||
167 | 168 | $c=$this->content[$i++]; |
168 | 169 | if(isset($c)){ |
169 | 170 | $c->setProperty($property,$value); |
170 | - } |
|
171 | - else{ |
|
171 | + } else{ |
|
172 | 172 | return $this; |
173 | 173 | } |
174 | 174 | } |
@@ -197,8 +197,9 @@ discard block |
||
197 | 197 | foreach ( $this->content as $index=>$item ) { |
198 | 198 | if($item instanceof HtmlDoubleElement){ |
199 | 199 | $href=""; |
200 | - if(isset($hrefs[$index])) |
|
201 | - $href=$hrefs[$index]; |
|
200 | + if(isset($hrefs[$index])) { |
|
201 | + $href=$hrefs[$index]; |
|
202 | + } |
|
202 | 203 | $item->asLink($href,$target); |
203 | 204 | } |
204 | 205 | } |