@@ -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 | } |
@@ -190,8 +190,7 @@ discard block |
||
| 190 | 190 | $c=$this->content[$i++]; |
| 191 | 191 | if(isset($c)){ |
| 192 | 192 | $c->addToProperty($property,$value); |
| 193 | - } |
|
| 194 | - else{ |
|
| 193 | + } else{ |
|
| 195 | 194 | return $this; |
| 196 | 195 | } |
| 197 | 196 | } |
@@ -220,8 +219,9 @@ discard block |
||
| 220 | 219 | foreach ( $this->content as $index=>$item ) { |
| 221 | 220 | if($item instanceof HtmlDoubleElement){ |
| 222 | 221 | $href=""; |
| 223 | - if(isset($hrefs[$index])) |
|
| 224 | - $href=$hrefs[$index]; |
|
| 222 | + if(isset($hrefs[$index])) { |
|
| 223 | + $href=$hrefs[$index]; |
|
| 224 | + } |
|
| 225 | 225 | $item->asLink($href,$target); |
| 226 | 226 | } |
| 227 | 227 | } |