Completed
Push — master ( 0c3815...012895 )
by Jean-Christophe
03:40
created
Ajax/semantic/html/collections/HtmlGrid.php 3 patches
Doc Comments   +7 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,6 +21,11 @@  discard block
 block discarded – undo
21 21
 	private $_createCols;
22 22
 	private $_colSizing=true;
23 23
 	private $_implicitRows=false;
24
+
25
+	/**
26
+	 * @param string $identifier
27
+	 * @param integer $numCols
28
+	 */
24 29
 	public function __construct( $identifier,$numRows=1,$numCols=NULL,$createCols=true,$implicitRows=false){
25 30
 		parent::__construct( $identifier, "div","ui grid");
26 31
 		$this->_implicitRows=$implicitRows;
@@ -95,7 +100,7 @@  discard block
 block discarded – undo
95 100
 	/**
96 101
 	 * return the row at $index
97 102
 	 * @param int $index
98
-	 * @return \Ajax\semantic\html\collections\HtmlGridRow
103
+	 * @return \Ajax\common\html\HtmlDoubleElement
99 104
 	 */
100 105
 	public function getRow($index){
101 106
 		return $this->getItem($index);
@@ -211,7 +216,7 @@  discard block
 block discarded – undo
211 216
 
212 217
 	/**
213 218
 	 * stretch the row contents to take up the entire column height
214
-	 * @return \Ajax\semantic\html\content\HtmlGridRow
219
+	 * @return HtmlGrid
215 220
 	 */
216 221
 	public function setStretched(){
217 222
 		return $this->addToProperty("class", "stretched");
Please login to merge, or discard this patch.
Spacing   +66 added lines, -66 removed lines patch added patch discarded remove patch
@@ -16,46 +16,46 @@  discard block
 block discarded – undo
16 16
  * @author jc
17 17
  * @version 1.001
18 18
  */
19
-class HtmlGrid extends HtmlSemCollection{
19
+class HtmlGrid extends HtmlSemCollection {
20 20
 	use TextAlignmentTrait;
21 21
 	private $_createCols;
22 22
 	private $_colSizing=true;
23 23
 	private $_implicitRows=false;
24
-	public function __construct( $identifier,$numRows=1,$numCols=NULL,$createCols=true,$implicitRows=false){
25
-		parent::__construct( $identifier, "div","ui grid");
24
+	public function __construct($identifier, $numRows=1, $numCols=NULL, $createCols=true, $implicitRows=false) {
25
+		parent::__construct($identifier, "div", "ui grid");
26 26
 		$this->_implicitRows=$implicitRows;
27 27
 		$this->_createCols=$createCols;
28
-		if(isset($numCols)){
28
+		if (isset($numCols)) {
29 29
 			//if($this->_createCols){
30 30
 				$this->_colSizing=false;
31 31
 			//}
32 32
 			$this->setWide($numCols);
33 33
 		}
34
-		$this->setRowsCount($numRows,$numCols);
34
+		$this->setRowsCount($numRows, $numCols);
35 35
 	}
36 36
 
37
-	public function setWide($wide){
37
+	public function setWide($wide) {
38 38
 		$wide=Wide::getConstants()["W".$wide];
39 39
 		$this->addToPropertyCtrl("class", $wide, Wide::getConstants());
40
-		return $this->addToPropertyCtrl("class","column",array("column"));
40
+		return $this->addToPropertyCtrl("class", "column", array("column"));
41 41
 	}
42 42
 
43
-	public function addRow($colsCount=NULL){
43
+	public function addRow($colsCount=NULL) {
44 44
 		$rowCount=$this->rowCount()+1;
45
-		$this->setRowsCount($rowCount,$colsCount,true);
45
+		$this->setRowsCount($rowCount, $colsCount, true);
46 46
 		return $this->content[$rowCount-1];
47 47
 	}
48 48
 
49
-	public function addCol($width=NULL){
49
+	public function addCol($width=NULL) {
50 50
 		$colCount=$this->colCount()+1;
51
-		$this->setColsCount($colCount,true,$width);
52
-		if($this->hasOnlyCols($this->count()))
51
+		$this->setColsCount($colCount, true, $width);
52
+		if ($this->hasOnlyCols($this->count()))
53 53
 			return $this->content[$colCount-1];
54 54
 		return $this;
55 55
 	}
56 56
 
57
-	public function addCols($sizes=array()){
58
-		foreach ($sizes as $size){
57
+	public function addCols($sizes=array()) {
58
+		foreach ($sizes as $size) {
59 59
 			$this->addCol($size);
60 60
 		}
61 61
 		return $this;
@@ -67,42 +67,42 @@  discard block
 block discarded – undo
67 67
 	 * @param int $colsCount
68 68
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
69 69
 	 */
70
-	public function setRowsCount($rowsCount,$colsCount=NULL,$force=false){
70
+	public function setRowsCount($rowsCount, $colsCount=NULL, $force=false) {
71 71
 		$count=$this->count();
72
-		if($rowsCount<2 && $force===false){
73
-			for($i=$count;$i<$colsCount;$i++){
72
+		if ($rowsCount<2 && $force===false) {
73
+			for ($i=$count; $i<$colsCount; $i++) {
74 74
 				$this->addItem(new HtmlGridCol("col-".$this->identifier."-".$i));
75 75
 			}
76
-		}else{
77
-			if($this->hasOnlyCols($count)){
76
+		}else {
77
+			if ($this->hasOnlyCols($count)) {
78 78
 				$tmpContent=$this->content;
79 79
 				$item=$this->addItem($colsCount);
80 80
 				$item->setContent($tmpContent);
81 81
 				$this->content=array();
82 82
 				$count=1;
83 83
 			}
84
-			for($i=$count;$i<$rowsCount;$i++){
84
+			for ($i=$count; $i<$rowsCount; $i++) {
85 85
 				$this->addItem($colsCount);
86 86
 			}
87 87
 		}
88 88
 		return $this;
89 89
 	}
90 90
 
91
-	protected function hasOnlyCols($count){
91
+	protected function hasOnlyCols($count) {
92 92
 		return $count>0 && $this->content[0] instanceof HtmlGridCol;
93 93
 	}
94 94
 
95
-	public function setColsCount($numCols,$toCreate=true,$width=NULL){
96
-		if(isset($width)===false)
95
+	public function setColsCount($numCols, $toCreate=true, $width=NULL) {
96
+		if (isset($width)===false)
97 97
 			$this->setWide($numCols);
98
-		if($toCreate==true){
98
+		if ($toCreate==true) {
99 99
 			$count=$this->count();
100
-			if($count==0 || $this->hasOnlyCols($count)){
101
-				for($i=$count;$i<$numCols;$i++){
102
-					$this->addItem(new HtmlGridCol("col-".$this->identifier."-".$i,$width));
100
+			if ($count==0 || $this->hasOnlyCols($count)) {
101
+				for ($i=$count; $i<$numCols; $i++) {
102
+					$this->addItem(new HtmlGridCol("col-".$this->identifier."-".$i, $width));
103 103
 				}
104
-			}else{
105
-				for($i=0;$i<$count;$i++){
104
+			}else {
105
+				for ($i=0; $i<$count; $i++) {
106 106
 					$this->getItem($i)->setColsCount($numCols);
107 107
 				}
108 108
 			}
@@ -115,22 +115,22 @@  discard block
 block discarded – undo
115 115
 	 * @param int $index
116 116
 	 * @return \Ajax\semantic\html\collections\HtmlGridRow
117 117
 	 */
118
-	public function getRow($index){
118
+	public function getRow($index) {
119 119
 		return $this->getItem($index);
120 120
 	}
121 121
 
122
-	public function rowCount(){
122
+	public function rowCount() {
123 123
 		$count=$this->count();
124
-		if($this->hasOnlyCols($count))
124
+		if ($this->hasOnlyCols($count))
125 125
 			return 0;
126 126
 		return $count;
127 127
 	}
128 128
 
129
-	public function colCount(){
129
+	public function colCount() {
130 130
 		$count=$this->count();
131
-		if($this->hasOnlyCols($count))
131
+		if ($this->hasOnlyCols($count))
132 132
 			return $count;
133
-		if($count>0)
133
+		if ($count>0)
134 134
 			return $this->getItem(0)->count();
135 135
 		return 0;
136 136
 	}
@@ -140,11 +140,11 @@  discard block
 block discarded – undo
140 140
 	 * @param int $col
141 141
 	 * @return \Ajax\semantic\html\collections\HtmlGridCol
142 142
 	 */
143
-	public function getCell($row,$col){
144
-		if($row<2 && $this->hasOnlyCols($this->count()))
143
+	public function getCell($row, $col) {
144
+		if ($row<2 && $this->hasOnlyCols($this->count()))
145 145
 			return $this->getItem($col);
146 146
 		$row=$this->getItem($row);
147
-		if(isset($row)){
147
+		if (isset($row)) {
148 148
 			$col=$row->getItem($col);
149 149
 		}
150 150
 		return $col;
@@ -155,9 +155,9 @@  discard block
 block discarded – undo
155 155
 	 * @param boolean $vertically
156 156
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
157 157
 	 */
158
-	public function setDivided($vertically=false){
159
-		$value=($vertically===true)?"vertically divided":"divided";
160
-		return $this->addToPropertyCtrl("class", $value,array("divided"));
158
+	public function setDivided($vertically=false) {
159
+		$value=($vertically===true) ? "vertically divided" : "divided";
160
+		return $this->addToPropertyCtrl("class", $value, array("divided"));
161 161
 	}
162 162
 
163 163
 	/**
@@ -165,23 +165,23 @@  discard block
 block discarded – undo
165 165
 	 * @param boolean $internally true for internal cells
166 166
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
167 167
 	 */
168
-	public function setCelled($internally=false){
169
-		$value=($internally===true)?"internally celled":"celled";
170
-		return $this->addToPropertyCtrl("class", $value,array("celled","internally celled"));
168
+	public function setCelled($internally=false) {
169
+		$value=($internally===true) ? "internally celled" : "celled";
170
+		return $this->addToPropertyCtrl("class", $value, array("celled", "internally celled"));
171 171
 	}
172 172
 
173 173
 	/**
174 174
 	 * A grid can have its columns centered
175 175
 	 */
176
-	public function setCentered(){
177
-		return $this->addToPropertyCtrl("class", "centered",array("centered"));
176
+	public function setCentered() {
177
+		return $this->addToPropertyCtrl("class", "centered", array("centered"));
178 178
 	}
179 179
 
180 180
 	/**
181 181
 	 * automatically resize all elements to split the available width evenly
182 182
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
183 183
 	 */
184
-	public function setEqualWidth(){
184
+	public function setEqualWidth() {
185 185
 		return $this->addToProperty("class", "equal width");
186 186
 	}
187 187
 
@@ -190,9 +190,9 @@  discard block
 block discarded – undo
190 190
 	 * @param string $value
191 191
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
192 192
 	 */
193
-	public function setPadded($value=NULL){
194
-		if(isset($value))
195
-			$this->addToPropertyCtrl("class", $value,array("vertically","horizontally"));
193
+	public function setPadded($value=NULL) {
194
+		if (isset($value))
195
+			$this->addToPropertyCtrl("class", $value, array("vertically", "horizontally"));
196 196
 		return $this->addToProperty("class", "padded");
197 197
 	}
198 198
 
@@ -200,37 +200,37 @@  discard block
 block discarded – undo
200 200
 	 * @param boolean $very
201 201
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
202 202
 	 */
203
-	public function setRelaxed($very=false){
204
-		$value=($very===true)?"very relaxed":"relaxed";
205
-		return $this->addToPropertyCtrl("class", $value,array("relaxed","very relaxed"));
203
+	public function setRelaxed($very=false) {
204
+		$value=($very===true) ? "very relaxed" : "relaxed";
205
+		return $this->addToPropertyCtrl("class", $value, array("relaxed", "very relaxed"));
206 206
 	}
207 207
 
208
-	public function setVerticalAlignment($value=VerticalAlignment::MIDDLE){
209
-		return $this->addToPropertyCtrl("class", $value." aligned",VerticalAlignment::getConstantValues("aligned"));
208
+	public function setVerticalAlignment($value=VerticalAlignment::MIDDLE) {
209
+		return $this->addToPropertyCtrl("class", $value." aligned", VerticalAlignment::getConstantValues("aligned"));
210 210
 	}
211 211
 
212 212
 	/**
213 213
 	 * {@inheritDoc}
214 214
 	 * @see \Ajax\common\html\HtmlCollection::createItem()
215 215
 	 */
216
-	protected function createItem($value){
217
-		if($this->_createCols===false)
216
+	protected function createItem($value) {
217
+		if ($this->_createCols===false)
218 218
 			$value=null;
219
-		$item=new HtmlGridRow($this->identifier."-row-".($this->count()+1),$value,$this->_colSizing,$this->_implicitRows);
219
+		$item=new HtmlGridRow($this->identifier."-row-".($this->count()+1), $value, $this->_colSizing, $this->_implicitRows);
220 220
 		return $item;
221 221
 	}
222 222
 
223
-	public function setValues($values){
223
+	public function setValues($values) {
224 224
 		$count=$this->count();
225
-		if($this->_createCols===false){
226
-			for($i=$count;$i<\sizeof($values);$i++){
225
+		if ($this->_createCols===false) {
226
+			for ($i=$count; $i<\sizeof($values); $i++) {
227 227
 				$colSize=\sizeof($values[$i]);
228
-				$this->addItem(new HtmlGridRow($this->identifier."-row-".($this->count()+1),$colSize,$this->_colSizing,$this->_implicitRows));
228
+				$this->addItem(new HtmlGridRow($this->identifier."-row-".($this->count()+1), $colSize, $this->_colSizing, $this->_implicitRows));
229 229
 			}
230 230
 		}
231
-		$count=\min(array($this->count(),\sizeof($values)));
232
-		for($i=0;$i<$count;$i++){
233
-			$this->content[$i]->setValues($values[$i],$this->_createCols===false);
231
+		$count=\min(array($this->count(), \sizeof($values)));
232
+		for ($i=0; $i<$count; $i++) {
233
+			$this->content[$i]->setValues($values[$i], $this->_createCols===false);
234 234
 		}
235 235
 	}
236 236
 
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 	 * stretch the row contents to take up the entire column height
239 239
 	 * @return \Ajax\semantic\html\content\HtmlGridRow
240 240
 	 */
241
-	public function setStretched(){
241
+	public function setStretched() {
242 242
 		return $this->addToProperty("class", "stretched");
243 243
 	}
244 244
 
Please login to merge, or discard this patch.
Braces   +26 added lines, -18 removed lines patch added patch discarded remove patch
@@ -49,8 +49,9 @@  discard block
 block discarded – undo
49 49
 	public function addCol($width=NULL){
50 50
 		$colCount=$this->colCount()+1;
51 51
 		$this->setColsCount($colCount,true,$width);
52
-		if($this->hasOnlyCols($this->count()))
53
-			return $this->content[$colCount-1];
52
+		if($this->hasOnlyCols($this->count())) {
53
+					return $this->content[$colCount-1];
54
+		}
54 55
 		return $this;
55 56
 	}
56 57
 
@@ -73,7 +74,7 @@  discard block
 block discarded – undo
73 74
 			for($i=$count;$i<$colsCount;$i++){
74 75
 				$this->addItem(new HtmlGridCol("col-".$this->identifier."-".$i));
75 76
 			}
76
-		}else{
77
+		} else{
77 78
 			if($this->hasOnlyCols($count)){
78 79
 				$tmpContent=$this->content;
79 80
 				$item=$this->addItem($colsCount);
@@ -93,15 +94,16 @@  discard block
 block discarded – undo
93 94
 	}
94 95
 
95 96
 	public function setColsCount($numCols,$toCreate=true,$width=NULL){
96
-		if(isset($width)===false)
97
-			$this->setWide($numCols);
97
+		if(isset($width)===false) {
98
+					$this->setWide($numCols);
99
+		}
98 100
 		if($toCreate==true){
99 101
 			$count=$this->count();
100 102
 			if($count==0 || $this->hasOnlyCols($count)){
101 103
 				for($i=$count;$i<$numCols;$i++){
102 104
 					$this->addItem(new HtmlGridCol("col-".$this->identifier."-".$i,$width));
103 105
 				}
104
-			}else{
106
+			} else{
105 107
 				for($i=0;$i<$count;$i++){
106 108
 					$this->getItem($i)->setColsCount($numCols);
107 109
 				}
@@ -121,17 +123,20 @@  discard block
 block discarded – undo
121 123
 
122 124
 	public function rowCount(){
123 125
 		$count=$this->count();
124
-		if($this->hasOnlyCols($count))
125
-			return 0;
126
+		if($this->hasOnlyCols($count)) {
127
+					return 0;
128
+		}
126 129
 		return $count;
127 130
 	}
128 131
 
129 132
 	public function colCount(){
130 133
 		$count=$this->count();
131
-		if($this->hasOnlyCols($count))
132
-			return $count;
133
-		if($count>0)
134
-			return $this->getItem(0)->count();
134
+		if($this->hasOnlyCols($count)) {
135
+					return $count;
136
+		}
137
+		if($count>0) {
138
+					return $this->getItem(0)->count();
139
+		}
135 140
 		return 0;
136 141
 	}
137 142
 
@@ -141,8 +146,9 @@  discard block
 block discarded – undo
141 146
 	 * @return \Ajax\semantic\html\collections\HtmlGridCol
142 147
 	 */
143 148
 	public function getCell($row,$col){
144
-		if($row<2 && $this->hasOnlyCols($this->count()))
145
-			return $this->getItem($col);
149
+		if($row<2 && $this->hasOnlyCols($this->count())) {
150
+					return $this->getItem($col);
151
+		}
146 152
 		$row=$this->getItem($row);
147 153
 		if(isset($row)){
148 154
 			$col=$row->getItem($col);
@@ -191,8 +197,9 @@  discard block
 block discarded – undo
191 197
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
192 198
 	 */
193 199
 	public function setPadded($value=NULL){
194
-		if(isset($value))
195
-			$this->addToPropertyCtrl("class", $value,array("vertically","horizontally"));
200
+		if(isset($value)) {
201
+					$this->addToPropertyCtrl("class", $value,array("vertically","horizontally"));
202
+		}
196 203
 		return $this->addToProperty("class", "padded");
197 204
 	}
198 205
 
@@ -214,8 +221,9 @@  discard block
 block discarded – undo
214 221
 	 * @see \Ajax\common\html\HtmlCollection::createItem()
215 222
 	 */
216 223
 	protected function createItem($value){
217
-		if($this->_createCols===false)
218
-			$value=null;
224
+		if($this->_createCols===false) {
225
+					$value=null;
226
+		}
219 227
 		$item=new HtmlGridRow($this->identifier."-row-".($this->count()+1),$value,$this->_colSizing,$this->_implicitRows);
220 228
 		return $item;
221 229
 	}
Please login to merge, or discard this patch.
Ajax/semantic/traits/SemanticComponentsTrait.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -47,6 +47,9 @@
 block discarded – undo
47 47
 		return $this->addComponent(new Accordion($this->js), $attachTo, $params);
48 48
 	}
49 49
 
50
+	/**
51
+	 * @param string $attachTo
52
+	 */
50 53
 	public function sticky($attachTo=NULL, $params=NULL) {
51 54
 		return $this->addComponent(new Sticky($this->js), $attachTo, $params);
52 55
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlPopup.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 class HtmlPopup extends HtmlSemDoubleElement {
13 13
 	private $_params;
14 14
 	private $_container;
15
-	public function __construct(BaseHtml $container,$identifier, $content="") {
15
+	public function __construct(BaseHtml $container, $identifier, $content="") {
16 16
 		parent::__construct($identifier, "div");
17 17
 		$this->_container=$container;
18 18
 		$this->setClass("ui popup");
@@ -20,21 +20,21 @@  discard block
 block discarded – undo
20 20
 		$this->_params=array("on"=>"hover");
21 21
 	}
22 22
 
23
-	public function addList($items=array(),$header=NULL){
24
-		if(!$this->content instanceof HtmlGrid){
25
-			$this->content=new HtmlGrid("grid-".$this->identifier,0);
23
+	public function addList($items=array(), $header=NULL) {
24
+		if (!$this->content instanceof HtmlGrid) {
25
+			$this->content=new HtmlGrid("grid-".$this->identifier, 0);
26 26
 		}
27 27
 		$grid=$this->content;
28 28
 
29 29
 		$colCount=$grid->colCount();
30 30
 		$grid->setColsCount(++$colCount);
31 31
 
32
-		$list=new HtmlList("",$items);
32
+		$list=new HtmlList("", $items);
33 33
 		$list->asLink();
34
-		if(isset($header)){
35
-			$list->addHeader(4,$header);
34
+		if (isset($header)) {
35
+			$list->addHeader(4, $header);
36 36
 		}
37
-		$grid->getCell(0,$colCount-1)->setContent($list);
37
+		$grid->getCell(0, $colCount-1)->setContent($list);
38 38
 		$grid->setDivided()->setRelaxed(true);
39 39
 		return $list;
40 40
 	}
@@ -42,14 +42,14 @@  discard block
 block discarded – undo
42 42
 	/**
43 43
 	 * A popup can have no maximum width and continue to flow to fit its content
44 44
 	 */
45
-	public function setFlowing(){
45
+	public function setFlowing() {
46 46
 		return $this->addToProperty("class", "flowing");
47 47
 	}
48 48
 
49 49
 	/**
50 50
 	 * A popup can provide more basic formatting
51 51
 	 */
52
-	public function setBasic(){
52
+	public function setBasic() {
53 53
 		return $this->addToProperty("class", "basic");
54 54
 	}
55 55
 
@@ -57,22 +57,22 @@  discard block
 block discarded – undo
57 57
 	 * {@inheritDoc}
58 58
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::run()
59 59
 	 */
60
-	public function run(JsUtils $js){
60
+	public function run(JsUtils $js) {
61 61
 		$this->_params["popup"]="#".$this->identifier;
62
-		$js->semantic()->popup("#".$this->_container->getIdentifier(),$this->_params);
62
+		$js->semantic()->popup("#".$this->_container->getIdentifier(), $this->_params);
63 63
 	}
64 64
 
65
-	public function setOn($event="click"){
65
+	public function setOn($event="click") {
66 66
 		$this->_params["on"]=$event;
67 67
 		return $this;
68 68
 	}
69 69
 
70
-	public function setInline($value=true){
70
+	public function setInline($value=true) {
71 71
 		$this->_params["inline"]=$value;
72 72
 		return $this;
73 73
 	}
74 74
 
75
-	public function setPosition($position){
75
+	public function setPosition($position) {
76 76
 		$this->_params["position"]=$position;
77 77
 		return $this;
78 78
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlSticky.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@  discard block
 block discarded – undo
8 8
 class HtmlSticky extends HtmlSemDoubleElement {
9 9
 	private $_params=array();
10 10
 
11
-	public function __construct($identifier,$context=NULL,$content=NULL) {
11
+	public function __construct($identifier, $context=NULL, $content=NULL) {
12 12
 		parent::__construct($identifier, "div", "ui sticky", $content);
13
-		if(isset($content))
13
+		if (isset($content))
14 14
 			$this->setContext($context);
15 15
 	}
16 16
 
17
-	public function setContext($context){
17
+	public function setContext($context) {
18 18
 		$this->_params["context"]=$context;
19 19
 		return $this;
20 20
 	}
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
 	 * {@inheritDoc}
24 24
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::run()
25 25
 	 */
26
-	public function run(JsUtils $js){
26
+	public function run(JsUtils $js) {
27 27
 		parent::run($js);
28
-		return $js->semantic()->sticky("#".$this->identifier,$this->_params);
28
+		return $js->semantic()->sticky("#".$this->identifier, $this->_params);
29 29
 	}
30 30
 }
31 31
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,8 +10,9 @@
 block discarded – undo
10 10
 
11 11
 	public function __construct($identifier,$context=NULL,$content=NULL) {
12 12
 		parent::__construct($identifier, "div", "ui sticky", $content);
13
-		if(isset($content))
14
-			$this->setContext($context);
13
+		if(isset($content)) {
14
+					$this->setContext($context);
15
+		}
15 16
 	}
16 17
 
17 18
 	public function setContext($context){
Please login to merge, or discard this patch.