@@ -26,8 +26,9 @@ discard block |
||
26 | 26 | */ |
27 | 27 | public function __construct($identifier, $tagName="tbody", $rowCount=NULL, $colCount=NULL) { |
28 | 28 | parent::__construct($identifier, $tagName, ""); |
29 | - if (isset($rowCount) && isset($colCount)) |
|
30 | - $this->setRowCount($rowCount, $colCount); |
|
29 | + if (isset($rowCount) && isset($colCount)) { |
|
30 | + $this->setRowCount($rowCount, $colCount); |
|
31 | + } |
|
31 | 32 | } |
32 | 33 | |
33 | 34 | /** |
@@ -103,7 +104,7 @@ discard block |
||
103 | 104 | $row=$this->getItem($row); |
104 | 105 | if (isset($row) && $row instanceof HtmlCollection) { |
105 | 106 | $col=$row->getItem($col); |
106 | - }else{ |
|
107 | + } else{ |
|
107 | 108 | $col=$row; |
108 | 109 | } |
109 | 110 | return $col; |
@@ -161,8 +162,9 @@ discard block |
||
161 | 162 | $values=\array_fill(0, $count, $values); |
162 | 163 | $isArray=false; |
163 | 164 | } |
164 | - if (JArray::dimension($values) == 1 && $isArray) |
|
165 | - $values=[ $values ]; |
|
165 | + if (JArray::dimension($values) == 1 && $isArray) { |
|
166 | + $values=[ $values ]; |
|
167 | + } |
|
166 | 168 | |
167 | 169 | $count=\min(\sizeof($values), $count); |
168 | 170 | |
@@ -189,8 +191,9 @@ discard block |
||
189 | 191 | $count=$this->count(); |
190 | 192 | for($i=0; $i < $count; $i++) { |
191 | 193 | $cell=$this->getCell($i, $colIndex); |
192 | - if($cell instanceof BaseTrait) |
|
193 | - $cell->addVariations($variations); |
|
194 | + if($cell instanceof BaseTrait) { |
|
195 | + $cell->addVariations($variations); |
|
196 | + } |
|
194 | 197 | } |
195 | 198 | return $this; |
196 | 199 | } |
@@ -208,8 +211,9 @@ discard block |
||
208 | 211 | $count=$this->count(); |
209 | 212 | for($i=0; $i < $count; $i++) { |
210 | 213 | $index=$this->content[$i]->getColPosition($colIndex); |
211 | - if ($index !== NULL) |
|
212 | - $this->getCell($i, $index)->$function(); |
|
214 | + if ($index !== NULL) { |
|
215 | + $this->getCell($i, $index)->$function(); |
|
216 | + } |
|
213 | 217 | } |
214 | 218 | return $this; |
215 | 219 | } |
@@ -219,8 +223,9 @@ discard block |
||
219 | 223 | for($i=0; $i < $count; $i++) { |
220 | 224 | $maxRow=$this->content[$i]->count(); |
221 | 225 | $index=$maxRow-$colIndex-1; |
222 | - if (($cell=$this->getCell($i, $index))!== NULL) |
|
223 | - $cell->$function(); |
|
226 | + if (($cell=$this->getCell($i, $index))!== NULL) { |
|
227 | + $cell->$function(); |
|
228 | + } |
|
224 | 229 | } |
225 | 230 | return $this; |
226 | 231 | } |
@@ -263,8 +268,9 @@ discard block |
||
263 | 268 | */ |
264 | 269 | public function getColCount() { |
265 | 270 | $result=0; |
266 | - if ($this->count() > 0) |
|
267 | - $result=$this->getItem(0)->count(); |
|
271 | + if ($this->count() > 0) { |
|
272 | + $result=$this->getItem(0)->count(); |
|
273 | + } |
|
268 | 274 | return $result; |
269 | 275 | } |
270 | 276 | |
@@ -288,8 +294,9 @@ discard block |
||
288 | 294 | |
289 | 295 | public function toDelete($rowIndex, $colIndex){ |
290 | 296 | $row=$this->getItem($rowIndex); |
291 | - if (isset($row) === true) |
|
292 | - $row->toDelete($colIndex); |
|
297 | + if (isset($row) === true) { |
|
298 | + $row->toDelete($colIndex); |
|
299 | + } |
|
293 | 300 | return $this; |
294 | 301 | } |
295 | 302 | |
@@ -387,8 +394,9 @@ discard block |
||
387 | 394 | foreach ( $rows as $row ) { |
388 | 395 | $cell=$row->getItem($colIndex); |
389 | 396 | $value=$cell->getContent(); |
390 | - if($functionExists) |
|
391 | - $value=\call_user_func($function,$value); |
|
397 | + if($functionExists) { |
|
398 | + $value=\call_user_func($function,$value); |
|
399 | + } |
|
392 | 400 | if($value!==$identiqual){ |
393 | 401 | if($counter>0 && isset($cellToMerge)){ |
394 | 402 | $cellToMerge->setRowspan($counter); |