@@ -34,8 +34,9 @@ discard block |
||
| 34 | 34 | */ |
| 35 | 35 | public function __construct($identifier, $tagName = "tbody", $rowCount = NULL, $colCount = NULL) { |
| 36 | 36 | parent::__construct($identifier, $tagName, ""); |
| 37 | - if (isset($rowCount) && isset($colCount)) |
|
| 38 | - $this->setRowCount($rowCount, $colCount); |
|
| 37 | + if (isset($rowCount) && isset($colCount)) { |
|
| 38 | + $this->setRowCount($rowCount, $colCount); |
|
| 39 | + } |
|
| 39 | 40 | } |
| 40 | 41 | |
| 41 | 42 | /** |
@@ -198,10 +199,11 @@ discard block |
||
| 198 | 199 | $values = \array_fill(0, $count, $values); |
| 199 | 200 | $isArray = false; |
| 200 | 201 | } |
| 201 | - if (JArray::dimension($values) == 1 && $isArray) |
|
| 202 | - $values = [ |
|
| 202 | + if (JArray::dimension($values) == 1 && $isArray) { |
|
| 203 | + $values = [ |
|
| 203 | 204 | $values |
| 204 | 205 | ]; |
| 206 | + } |
|
| 205 | 207 | |
| 206 | 208 | $count = \min(\sizeof($values), $count); |
| 207 | 209 | |
@@ -228,8 +230,9 @@ discard block |
||
| 228 | 230 | $count = $this->count(); |
| 229 | 231 | for ($i = 0; $i < $count; $i ++) { |
| 230 | 232 | $cell = $this->getCell($i, $colIndex); |
| 231 | - if ($cell instanceof BaseTrait) |
|
| 232 | - $cell->addVariations($variations); |
|
| 233 | + if ($cell instanceof BaseTrait) { |
|
| 234 | + $cell->addVariations($variations); |
|
| 235 | + } |
|
| 233 | 236 | } |
| 234 | 237 | return $this; |
| 235 | 238 | } |
@@ -238,8 +241,9 @@ discard block |
||
| 238 | 241 | $count = $this->count(); |
| 239 | 242 | for ($i = 0; $i < $count; $i ++) { |
| 240 | 243 | $cell = $this->getCell($i, $colIndex); |
| 241 | - if (isset($cell)) |
|
| 242 | - $cell->addToProperty($name, $value); |
|
| 244 | + if (isset($cell)) { |
|
| 245 | + $cell->addToProperty($name, $value); |
|
| 246 | + } |
|
| 243 | 247 | } |
| 244 | 248 | return $this; |
| 245 | 249 | } |
@@ -273,8 +277,9 @@ discard block |
||
| 273 | 277 | $maxRow = $this->content[$i]->count(); |
| 274 | 278 | $index = $maxRow - $colIndex - 1; |
| 275 | 279 | if (($cell = $this->getCell($i, $index)) !== NULL) { |
| 276 | - if ($cell->getColspan() == 1) |
|
| 277 | - $cell->$function(); |
|
| 280 | + if ($cell->getColspan() == 1) { |
|
| 281 | + $cell->$function(); |
|
| 282 | + } |
|
| 278 | 283 | } |
| 279 | 284 | } |
| 280 | 285 | return $this; |
@@ -320,8 +325,9 @@ discard block |
||
| 320 | 325 | */ |
| 321 | 326 | public function getColCount() { |
| 322 | 327 | $result = 0; |
| 323 | - if ($this->count() > 0) |
|
| 324 | - $result = $this->getItem(0)->count(); |
|
| 328 | + if ($this->count() > 0) { |
|
| 329 | + $result = $this->getItem(0)->count(); |
|
| 330 | + } |
|
| 325 | 331 | return $result; |
| 326 | 332 | } |
| 327 | 333 | |
@@ -346,15 +352,17 @@ discard block |
||
| 346 | 352 | |
| 347 | 353 | public function toDelete($rowIndex, $colIndex) { |
| 348 | 354 | $row = $this->getItem($rowIndex); |
| 349 | - if (isset($row) === true) |
|
| 350 | - $row->toDelete($colIndex); |
|
| 355 | + if (isset($row) === true) { |
|
| 356 | + $row->toDelete($colIndex); |
|
| 357 | + } |
|
| 351 | 358 | return $this; |
| 352 | 359 | } |
| 353 | 360 | |
| 354 | 361 | public function toRowspanned($rowIndex, $colIndex) { |
| 355 | 362 | $row = $this->getItem($rowIndex); |
| 356 | - if (isset($row) === true) |
|
| 357 | - $row->toRowspanned($colIndex); |
|
| 363 | + if (isset($row) === true) { |
|
| 364 | + $row->toRowspanned($colIndex); |
|
| 365 | + } |
|
| 358 | 366 | return $this; |
| 359 | 367 | } |
| 360 | 368 | |
@@ -464,8 +472,9 @@ discard block |
||
| 464 | 472 | foreach ($rows as $row) { |
| 465 | 473 | $cell = $row->getItem($colIndex); |
| 466 | 474 | $value = $cell->getContent(); |
| 467 | - if ($functionExists) |
|
| 468 | - $value = \call_user_func($function, $value); |
|
| 475 | + if ($functionExists) { |
|
| 476 | + $value = \call_user_func($function, $value); |
|
| 477 | + } |
|
| 469 | 478 | if ($value !== $identiqual) { |
| 470 | 479 | if ($counter > 0 && isset($cellToMerge)) { |
| 471 | 480 | $cellToMerge->setRowspanned($counter); |