@@ -22,8 +22,9 @@ discard block |
||
| 22 | 22 | */ |
| 23 | 23 | public function __construct($identifier, $tagName="tbody", $rowCount=NULL, $colCount=NULL) { |
| 24 | 24 | parent::__construct($identifier, $tagName, ""); |
| 25 | - if (isset($rowCount)&&isset($colCount)) |
|
| 26 | - $this->setRowCount($rowCount, $colCount); |
|
| 25 | + if (isset($rowCount)&&isset($colCount)) { |
|
| 26 | + $this->setRowCount($rowCount, $colCount); |
|
| 27 | + } |
|
| 27 | 28 | } |
| 28 | 29 | |
| 29 | 30 | /** |
@@ -107,8 +108,9 @@ discard block |
||
| 107 | 108 | $values=\array_fill(0, $count, $values); |
| 108 | 109 | $isArray=false; |
| 109 | 110 | } |
| 110 | - if (JArray::dimension($values)==1&&$isArray) |
|
| 111 | - $values=[ $values ]; |
|
| 111 | + if (JArray::dimension($values)==1&&$isArray) { |
|
| 112 | + $values=[ $values ]; |
|
| 113 | + } |
|
| 112 | 114 | |
| 113 | 115 | $count=\min(\sizeof($values), $count); |
| 114 | 116 | |
@@ -170,8 +172,9 @@ discard block |
||
| 170 | 172 | */ |
| 171 | 173 | public function getColCount() { |
| 172 | 174 | $result=0; |
| 173 | - if ($this->count()>0) |
|
| 174 | - $result=$this->getItem(0)->getColCount(); |
|
| 175 | + if ($this->count()>0) { |
|
| 176 | + $result=$this->getItem(0)->getColCount(); |
|
| 177 | + } |
|
| 175 | 178 | return $result; |
| 176 | 179 | } |
| 177 | 180 | |
@@ -106,15 +106,17 @@ discard block |
||
| 106 | 106 | } |
| 107 | 107 | |
| 108 | 108 | public function colCenter($colIndex) { |
| 109 | - if ($this->hasPart("thead")) |
|
| 110 | - $this->getHeader()->colCenter($colIndex); |
|
| 109 | + if ($this->hasPart("thead")) { |
|
| 110 | + $this->getHeader()->colCenter($colIndex); |
|
| 111 | + } |
|
| 111 | 112 | $this->getBody()->colCenter($colIndex); |
| 112 | 113 | return $this; |
| 113 | 114 | } |
| 114 | 115 | |
| 115 | 116 | public function colRight($colIndex) { |
| 116 | - if ($this->hasPart("thead")) |
|
| 117 | - $this->getHeader()->colRight($colIndex); |
|
| 117 | + if ($this->hasPart("thead")) { |
|
| 118 | + $this->getHeader()->colRight($colIndex); |
|
| 119 | + } |
|
| 118 | 120 | $this->getBody()->colRight($colIndex); |
| 119 | 121 | return $this; |
| 120 | 122 | } |
@@ -124,8 +126,9 @@ discard block |
||
| 124 | 126 | } |
| 125 | 127 | |
| 126 | 128 | public function setBasic($very=false) { |
| 127 | - if ($very) |
|
| 128 | - $this->addToPropertyCtrl("class", "very", array ("very" )); |
|
| 129 | + if ($very) { |
|
| 130 | + $this->addToPropertyCtrl("class", "very", array ("very" )); |
|
| 131 | + } |
|
| 129 | 132 | return $this->addToPropertyCtrl("class", "basic", array ("basic" )); |
| 130 | 133 | } |
| 131 | 134 | |
@@ -18,8 +18,9 @@ |
||
| 18 | 18 | if (isset($type)) { |
| 19 | 19 | if ($type=="page") { |
| 20 | 20 | $this->asPageHeader($niveau); |
| 21 | - } else |
|
| 22 | - $this->asContentHeader($niveau); |
|
| 21 | + } else { |
|
| 22 | + $this->asContentHeader($niveau); |
|
| 23 | + } |
|
| 23 | 24 | } |
| 24 | 25 | $this->content=$content; |
| 25 | 26 | } |
@@ -14,21 +14,24 @@ discard block |
||
| 14 | 14 | return $array[$key]; |
| 15 | 15 | } |
| 16 | 16 | $values=array_values($array); |
| 17 | - if ($pos<sizeof($values)) |
|
| 18 | - return $values[$pos]; |
|
| 17 | + if ($pos<sizeof($values)) { |
|
| 18 | + return $values[$pos]; |
|
| 19 | + } |
|
| 19 | 20 | } |
| 20 | 21 | |
| 21 | 22 | public static function getConditionalValue($array, $key, $condition) { |
| 22 | 23 | $result=NULL; |
| 23 | 24 | if (array_key_exists($key, $array)) { |
| 24 | 25 | $result=$array[$key]; |
| 25 | - if ($condition($result)===true) |
|
| 26 | - return $result; |
|
| 26 | + if ($condition($result)===true) { |
|
| 27 | + return $result; |
|
| 28 | + } |
|
| 27 | 29 | } |
| 28 | 30 | $values=array_values($array); |
| 29 | 31 | foreach ( $values as $val ) { |
| 30 | - if ($condition($val)===true) |
|
| 31 | - return $val; |
|
| 32 | + if ($condition($val)===true) { |
|
| 33 | + return $val; |
|
| 34 | + } |
|
| 32 | 35 | } |
| 33 | 36 | return $result; |
| 34 | 37 | } |
@@ -36,8 +39,9 @@ discard block |
||
| 36 | 39 | public static function getDefaultValue($array, $key, $default=NULL) { |
| 37 | 40 | if (array_key_exists($key, $array)) { |
| 38 | 41 | return $array[$key]; |
| 39 | - } else |
|
| 40 | - return $default; |
|
| 42 | + } else { |
|
| 43 | + return $default; |
|
| 44 | + } |
|
| 41 | 45 | } |
| 42 | 46 | |
| 43 | 47 | public static function implode($glue, $pieces) { |