@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | for($i=$count;$i<$colsCount;$i++){ |
57 | 57 | $this->addItem(new HtmlGridCol("col-".$this->identifier."-".$i)); |
58 | 58 | } |
59 | - }else{ |
|
59 | + } else{ |
|
60 | 60 | if($this->hasOnlyCols($count)){ |
61 | 61 | $tmpContent=$this->content; |
62 | 62 | $item=$this->addItem($colsCount); |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | for($i=$count;$i<$numCols;$i++){ |
84 | 84 | $this->addItem(new HtmlGridCol("col-".$this->identifier."-".$i)); |
85 | 85 | } |
86 | - }else{ |
|
86 | + } else{ |
|
87 | 87 | for($i=0;$i<$count;$i++){ |
88 | 88 | $this->getItem($i)->setNumCols($numCols); |
89 | 89 | } |
@@ -107,8 +107,9 @@ discard block |
||
107 | 107 | * @return \Ajax\semantic\html\collections\HtmlGridCol |
108 | 108 | */ |
109 | 109 | public function getCell($row,$col){ |
110 | - if($row<2 && $this->hasOnlyCols($this->count())) |
|
111 | - return $this->getItem($col); |
|
110 | + if($row<2 && $this->hasOnlyCols($this->count())) { |
|
111 | + return $this->getItem($col); |
|
112 | + } |
|
112 | 113 | $row=$this->getItem($row); |
113 | 114 | if(isset($row)){ |
114 | 115 | $col=$row->getItem($col); |
@@ -150,8 +151,9 @@ discard block |
||
150 | 151 | * @return \Ajax\semantic\html\collections\HtmlGrid |
151 | 152 | */ |
152 | 153 | public function setPadded($value=NULL){ |
153 | - if(isset($value)) |
|
154 | - $this->addToPropertyCtrl("class", $value,array("vertically","horizontally")); |
|
154 | + if(isset($value)) { |
|
155 | + $this->addToPropertyCtrl("class", $value,array("vertically","horizontally")); |
|
156 | + } |
|
155 | 157 | return $this->addToProperty("class", "padded"); |
156 | 158 | } |
157 | 159 | |
@@ -173,8 +175,9 @@ discard block |
||
173 | 175 | * @see \Ajax\common\html\HtmlCollection::createItem() |
174 | 176 | */ |
175 | 177 | protected function createItem($value){ |
176 | - if($this->_createCols===false) |
|
177 | - $value=null; |
|
178 | + if($this->_createCols===false) { |
|
179 | + $value=null; |
|
180 | + } |
|
178 | 181 | $item=new HtmlGridRow($this->identifier."-row-".($this->count()+1),$value,$this->_colSizing,$this->_implicitRows); |
179 | 182 | return $item; |
180 | 183 | } |
@@ -201,10 +204,11 @@ discard block |
||
201 | 204 | $result=0; |
202 | 205 | $count=$this->count(); |
203 | 206 | if($count>0){ |
204 | - if($this->content[0] instanceof HtmlGridCol) |
|
205 | - $result=$count; |
|
206 | - else |
|
207 | - $result=$this->content[0]->count(); |
|
207 | + if($this->content[0] instanceof HtmlGridCol) { |
|
208 | + $result=$count; |
|
209 | + } else { |
|
210 | + $result=$this->content[0]->count(); |
|
211 | + } |
|
208 | 212 | } |
209 | 213 | return $result; |
210 | 214 | } |