@@ -9,8 +9,9 @@ |
||
9 | 9 | public function __construct($identifier,$width){ |
10 | 10 | parent::__construct($identifier,"div"); |
11 | 11 | $this->setClass("column"); |
12 | - if(isset($width)) |
|
13 | - $this->setWidth($width); |
|
12 | + if(isset($width)) { |
|
13 | + $this->setWidth($width); |
|
14 | + } |
|
14 | 15 | } |
15 | 16 | |
16 | 17 | public function setWidth($width){ |
@@ -14,10 +14,11 @@ |
||
14 | 14 | if(isset($numCols)){ |
15 | 15 | $numCols=min(16,$numCols); |
16 | 16 | $numCols=max(1,$numCols); |
17 | - if($colSizing) |
|
18 | - $width=(int)(16/$numCols); |
|
19 | - else |
|
20 | - $this->_colSize=16/$numCols; |
|
17 | + if($colSizing) { |
|
18 | + $width=(int)(16/$numCols); |
|
19 | + } else { |
|
20 | + $this->_colSize=16/$numCols; |
|
21 | + } |
|
21 | 22 | for ($i=0;$i<$numCols;$i++){ |
22 | 23 | $this->addItem($width); |
23 | 24 | } |
@@ -45,9 +45,9 @@ |
||
45 | 45 | * @return \Ajax\common\html\HtmlDoubleElement |
46 | 46 | */ |
47 | 47 | public function getItem($index) { |
48 | - if (is_int($index)) |
|
49 | - return $this->content[$index]; |
|
50 | - else { |
|
48 | + if (is_int($index)) { |
|
49 | + return $this->content[$index]; |
|
50 | + } else { |
|
51 | 51 | $elm=$this->getElementById($index, $this->content); |
52 | 52 | return $elm; |
53 | 53 | } |
@@ -101,8 +101,9 @@ discard block |
||
101 | 101 | * @return \Ajax\semantic\html\collections\HtmlGrid |
102 | 102 | */ |
103 | 103 | public function setPadded($value=NULL){ |
104 | - if(isset($value)) |
|
105 | - $this->addToPropertyCtrl("class", $value,array("vertically","horizontally")); |
|
104 | + if(isset($value)) { |
|
105 | + $this->addToPropertyCtrl("class", $value,array("vertically","horizontally")); |
|
106 | + } |
|
106 | 107 | return $this->addToProperty("class", "padded"); |
107 | 108 | } |
108 | 109 | |
@@ -124,8 +125,9 @@ discard block |
||
124 | 125 | * @see \Ajax\common\html\HtmlCollection::createItem() |
125 | 126 | */ |
126 | 127 | protected function createItem($value){ |
127 | - if($this->_createCols===false) |
|
128 | - $value=null; |
|
128 | + if($this->_createCols===false) { |
|
129 | + $value=null; |
|
130 | + } |
|
129 | 131 | $item=new HtmlGridRow($this->identifier."-row-".($this->count()+1),$value,$this->_colSizing); |
130 | 132 | return $item; |
131 | 133 | } |