@@ -34,8 +34,9 @@ discard block |
||
34 | 34 | |
35 | 35 | public function addImage($src="", $alt="", $size=NULL) { |
36 | 36 | $image=new HtmlImg("img-", $src, $alt); |
37 | - if (isset($size)) |
|
38 | - $image->setSize($size); |
|
37 | + if (isset($size)) { |
|
38 | + $image->setSize($size); |
|
39 | + } |
|
39 | 40 | $this->content["image"]=$image; |
40 | 41 | return $image; |
41 | 42 | } |
@@ -45,8 +46,9 @@ discard block |
||
45 | 46 | foreach ( $metas as $meta ) { |
46 | 47 | $this->addMeta($meta); |
47 | 48 | } |
48 | - } else |
|
49 | - $this->addMeta($metas); |
|
49 | + } else { |
|
50 | + $this->addMeta($metas); |
|
51 | + } |
|
50 | 52 | return $this; |
51 | 53 | } |
52 | 54 | |
@@ -73,8 +75,9 @@ discard block |
||
73 | 75 | $result=new HtmlSemDoubleElement("", "span", "", $caption); |
74 | 76 | $this->addContent($result); |
75 | 77 | $result->setFloated($direction); |
76 | - } else |
|
77 | - $result=$this->addContent($caption); |
|
78 | + } else { |
|
79 | + $result=$this->addContent($caption); |
|
80 | + } |
|
78 | 81 | return $result; |
79 | 82 | } |
80 | 83 |
@@ -36,8 +36,9 @@ |
||
36 | 36 | |
37 | 37 | private function getPart($part, $index=NULL) { |
38 | 38 | if (\array_key_exists($part, $this->content)) { |
39 | - if (isset($index)) |
|
40 | - return $this->content[$part][$index]; |
|
39 | + if (isset($index)) { |
|
40 | + return $this->content[$part][$index]; |
|
41 | + } |
|
41 | 42 | return $this->content[$part]; |
42 | 43 | } |
43 | 44 | return NULL; |
@@ -77,8 +77,9 @@ discard block |
||
77 | 77 | public function addCol($width=NULL) { |
78 | 78 | $colCount=$this->colCount() + 1; |
79 | 79 | $this->setColsCount($colCount, true, $width); |
80 | - if ($this->hasOnlyCols($this->count())) |
|
81 | - return $this->content[$colCount - 1]; |
|
80 | + if ($this->hasOnlyCols($this->count())) { |
|
81 | + return $this->content[$colCount - 1]; |
|
82 | + } |
|
82 | 83 | return $this; |
83 | 84 | } |
84 | 85 | |
@@ -166,8 +167,9 @@ discard block |
||
166 | 167 | */ |
167 | 168 | public function rowCount() { |
168 | 169 | $count=$this->count(); |
169 | - if ($this->hasOnlyCols($count)) |
|
170 | - return 0; |
|
170 | + if ($this->hasOnlyCols($count)) { |
|
171 | + return 0; |
|
172 | + } |
|
171 | 173 | return $count; |
172 | 174 | } |
173 | 175 | |
@@ -177,10 +179,12 @@ discard block |
||
177 | 179 | */ |
178 | 180 | public function colCount() { |
179 | 181 | $count=$this->count(); |
180 | - if ($this->hasOnlyCols($count)) |
|
181 | - return $count; |
|
182 | - if ($count > 0) |
|
183 | - return $this->getItem(0)->count(); |
|
182 | + if ($this->hasOnlyCols($count)) { |
|
183 | + return $count; |
|
184 | + } |
|
185 | + if ($count > 0) { |
|
186 | + return $this->getItem(0)->count(); |
|
187 | + } |
|
184 | 188 | return 0; |
185 | 189 | } |
186 | 190 | |
@@ -191,8 +195,9 @@ discard block |
||
191 | 195 | * @return \Ajax\semantic\html\collections\HtmlGridCol |
192 | 196 | */ |
193 | 197 | public function getCell($row, $col) { |
194 | - if ($row < 2 && $this->hasOnlyCols($this->count())) |
|
195 | - return $this->getItem($col); |
|
198 | + if ($row < 2 && $this->hasOnlyCols($this->count())) { |
|
199 | + return $this->getItem($col); |
|
200 | + } |
|
196 | 201 | $row=$this->getItem($row); |
197 | 202 | if (isset($row)) { |
198 | 203 | $col=$row->getItem($col); |
@@ -241,8 +246,9 @@ discard block |
||
241 | 246 | * @return \Ajax\semantic\html\collections\HtmlGrid |
242 | 247 | */ |
243 | 248 | public function setPadded($value=NULL) { |
244 | - if (isset($value)) |
|
245 | - $this->addToPropertyCtrl("class", $value, array ("vertically","horizontally" )); |
|
249 | + if (isset($value)) { |
|
250 | + $this->addToPropertyCtrl("class", $value, array ("vertically","horizontally" )); |
|
251 | + } |
|
246 | 252 | return $this->addToProperty("class", "padded"); |
247 | 253 | } |
248 | 254 | |
@@ -267,8 +273,9 @@ discard block |
||
267 | 273 | * @see \Ajax\common\html\HtmlCollection::createItem() |
268 | 274 | */ |
269 | 275 | protected function createItem($value) { |
270 | - if ($this->_createCols === false) |
|
271 | - $value=null; |
|
276 | + if ($this->_createCols === false) { |
|
277 | + $value=null; |
|
278 | + } |
|
272 | 279 | $item=new HtmlGridRow($this->identifier . "-row-" . ($this->count() + 1), $value, $this->_colSizing, $this->_implicitRows); |
273 | 280 | return $item; |
274 | 281 | } |