@@ -25,8 +25,9 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function __construct($identifier, $tagName="tbody", $rowCount=NULL, $colCount=NULL) { |
27 | 27 | parent::__construct($identifier, $tagName, ""); |
28 | - if (isset($rowCount) && isset($colCount)) |
|
29 | - $this->setRowCount($rowCount, $colCount); |
|
28 | + if (isset($rowCount) && isset($colCount)) { |
|
29 | + $this->setRowCount($rowCount, $colCount); |
|
30 | + } |
|
30 | 31 | } |
31 | 32 | |
32 | 33 | /** |
@@ -102,7 +103,7 @@ discard block |
||
102 | 103 | $row=$this->getItem($row); |
103 | 104 | if (isset($row) && $row instanceof HtmlCollection) { |
104 | 105 | $col=$row->getItem($col); |
105 | - }else{ |
|
106 | + } else{ |
|
106 | 107 | $col=$row; |
107 | 108 | } |
108 | 109 | return $col; |
@@ -160,8 +161,9 @@ discard block |
||
160 | 161 | $values=\array_fill(0, $count, $values); |
161 | 162 | $isArray=false; |
162 | 163 | } |
163 | - if (JArray::dimension($values) == 1 && $isArray) |
|
164 | - $values=[ $values ]; |
|
164 | + if (JArray::dimension($values) == 1 && $isArray) { |
|
165 | + $values=[ $values ]; |
|
166 | + } |
|
165 | 167 | |
166 | 168 | $count=\min(\sizeof($values), $count); |
167 | 169 | |
@@ -205,8 +207,9 @@ discard block |
||
205 | 207 | $count=$this->count(); |
206 | 208 | for($i=0; $i < $count; $i++) { |
207 | 209 | $index=$this->content[$i]->getColPosition($colIndex); |
208 | - if ($index !== NULL) |
|
209 | - $this->getCell($i, $index)->$function(); |
|
210 | + if ($index !== NULL) { |
|
211 | + $this->getCell($i, $index)->$function(); |
|
212 | + } |
|
210 | 213 | } |
211 | 214 | return $this; |
212 | 215 | } |
@@ -237,8 +240,9 @@ discard block |
||
237 | 240 | */ |
238 | 241 | public function getColCount() { |
239 | 242 | $result=0; |
240 | - if ($this->count() > 0) |
|
241 | - $result=$this->getItem(0)->count(); |
|
243 | + if ($this->count() > 0) { |
|
244 | + $result=$this->getItem(0)->count(); |
|
245 | + } |
|
242 | 246 | return $result; |
243 | 247 | } |
244 | 248 | |
@@ -262,8 +266,9 @@ discard block |
||
262 | 266 | |
263 | 267 | public function toDelete($rowIndex, $colIndex){ |
264 | 268 | $row=$this->getItem($rowIndex); |
265 | - if (isset($row) === true) |
|
266 | - $row->toDelete($colIndex); |
|
269 | + if (isset($row) === true) { |
|
270 | + $row->toDelete($colIndex); |
|
271 | + } |
|
267 | 272 | return $this; |
268 | 273 | } |
269 | 274 | |
@@ -361,8 +366,9 @@ discard block |
||
361 | 366 | foreach ( $rows as $row ) { |
362 | 367 | $cell=$row->getItem($colIndex); |
363 | 368 | $value=$cell->getContent(); |
364 | - if($functionExists) |
|
365 | - $value=\call_user_func($function,$value); |
|
369 | + if($functionExists) { |
|
370 | + $value=\call_user_func($function,$value); |
|
371 | + } |
|
366 | 372 | if($value!==$identiqual){ |
367 | 373 | if($counter>0 && isset($cellToMerge)){ |
368 | 374 | $cellToMerge->setRowspan($counter); |