Completed
Push — master ( b4ccca...781bd5 )
by Jean-Christophe
03:50
created
Ajax/semantic/components/Popup.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 		return $this->setParam("onShow", "%function(){".$jsCode."}%");
31 31
 	}
32 32
 
33
-	public function setExclusive($value){
33
+	public function setExclusive($value) {
34 34
 		return $this->setParam("exclusive", $value);
35 35
 	}
36 36
 
@@ -39,15 +39,15 @@  discard block
 block discarded – undo
39 39
 	 * @param string $popup the css selector of the popup
40 40
 	 * @return \Ajax\semantic\components\Popup
41 41
 	 */
42
-	public function setPopup($popup){
42
+	public function setPopup($popup) {
43 43
 		return $this->setParam("popup", $popup);
44 44
 	}
45 45
 
46
-	public function setInline($value){
46
+	public function setInline($value) {
47 47
 		return $this->setParam("inline", $value);
48 48
 	}
49 49
 
50
-	public function setPosition($value){
50
+	public function setPosition($value) {
51 51
 		return $this->setParam("position", $value);
52 52
 	}
53 53
 	//TODO other events implementation
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.
Ajax/semantic/html/collections/HtmlGrid.php 3 patches
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.
Doc Comments   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,6 +22,10 @@  discard block
 block discarded – undo
22 22
 	private $_colSizing=true;
23 23
 	private $_implicitRows=false;
24 24
 
25
+	/**
26
+	 * @param string $identifier
27
+	 * @param integer $numCols
28
+	 */
25 29
 	public function __construct( $identifier,$numRows=1,$numCols=NULL,$createCols=true,$implicitRows=false){
26 30
 		parent::__construct( $identifier, "div","ui grid");
27 31
 		$this->_implicitRows=$implicitRows;
@@ -148,7 +152,7 @@  discard block
 block discarded – undo
148 152
 	/**
149 153
 	 * return the row at $index
150 154
 	 * @param int $index
151
-	 * @return \Ajax\semantic\html\collections\HtmlGridRow
155
+	 * @return \Ajax\common\html\HtmlDoubleElement
152 156
 	 */
153 157
 	public function getRow($index){
154 158
 		return $this->getItem($index);
@@ -284,7 +288,7 @@  discard block
 block discarded – undo
284 288
 
285 289
 	/**
286 290
 	 * stretch the row contents to take up the entire column height
287
-	 * @return \Ajax\semantic\html\content\HtmlGridRow
291
+	 * @return HtmlGrid
288 292
 	 */
289 293
 	public function setStretched(){
290 294
 		return $this->addToProperty("class", "stretched");
Please login to merge, or discard this patch.
Spacing   +68 added lines, -68 removed lines patch added patch discarded remove patch
@@ -16,26 +16,26 @@  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 24
 
25
-	public function __construct( $identifier,$numRows=1,$numCols=NULL,$createCols=true,$implicitRows=false){
26
-		parent::__construct( $identifier, "div","ui grid");
25
+	public function __construct($identifier, $numRows=1, $numCols=NULL, $createCols=true, $implicitRows=false) {
26
+		parent::__construct($identifier, "div", "ui grid");
27 27
 		$this->_implicitRows=$implicitRows;
28 28
 		$this->_createCols=$createCols;
29
-		if(isset($numCols)){
29
+		if (isset($numCols)) {
30 30
 			//if($this->_createCols){
31 31
 				$this->_colSizing=false;
32 32
 			//}
33 33
 			$this->setWide($numCols);
34 34
 		}
35
-		$this->setRowsCount($numRows,$numCols);
35
+		$this->setRowsCount($numRows, $numCols);
36 36
 	}
37 37
 
38
-	public function asSegment(){
38
+	public function asSegment() {
39 39
 		return $this->addToPropertyCtrl("class", "segment", array("segment"));
40 40
 	}
41 41
 
@@ -43,10 +43,10 @@  discard block
 block discarded – undo
43 43
 	 * Defines the grid width (alias for setWidth)
44 44
 	 * @param int $wide
45 45
 	 */
46
-	public function setWide($wide){
46
+	public function setWide($wide) {
47 47
 		$wide=Wide::getConstants()["W".$wide];
48 48
 		$this->addToPropertyCtrl("class", $wide, Wide::getConstants());
49
-		return $this->addToPropertyCtrl("class","column",array("column"));
49
+		return $this->addToPropertyCtrl("class", "column", array("column"));
50 50
 	}
51 51
 
52 52
 	/**
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	 * @param int $width
55 55
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
56 56
 	 */
57
-	public function setWidth($width){
57
+	public function setWidth($width) {
58 58
 	return $this->setWide($width);
59 59
 	}
60 60
 
@@ -63,9 +63,9 @@  discard block
 block discarded – undo
63 63
 	 * @param int $colsCount number of columns to create
64 64
 	 * @return mixed
65 65
 	 */
66
-	public function addRow($colsCount=NULL){
66
+	public function addRow($colsCount=NULL) {
67 67
 		$rowCount=$this->rowCount()+1;
68
-		$this->setRowsCount($rowCount,$colsCount,true);
68
+		$this->setRowsCount($rowCount, $colsCount, true);
69 69
 		return $this->content[$rowCount-1];
70 70
 	}
71 71
 
@@ -74,10 +74,10 @@  discard block
 block discarded – undo
74 74
 	 * @param int $width with of the column to add
75 75
 	 * @return mixed|\Ajax\semantic\html\collections\HtmlGrid
76 76
 	 */
77
-	public function addCol($width=NULL){
77
+	public function addCol($width=NULL) {
78 78
 		$colCount=$this->colCount()+1;
79
-		$this->setColsCount($colCount,true,$width);
80
-		if($this->hasOnlyCols($this->count()))
79
+		$this->setColsCount($colCount, true, $width);
80
+		if ($this->hasOnlyCols($this->count()))
81 81
 			return $this->content[$colCount-1];
82 82
 		return $this;
83 83
 	}
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
 	 * @param array $sizes array of width of the columns to create
87 87
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
88 88
 	 */
89
-	public function addCols($sizes=array()){
90
-		foreach ($sizes as $size){
89
+	public function addCols($sizes=array()) {
90
+		foreach ($sizes as $size) {
91 91
 			$this->addCol($size);
92 92
 		}
93 93
 		return $this;
@@ -99,28 +99,28 @@  discard block
 block discarded – undo
99 99
 	 * @param int $colsCount
100 100
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
101 101
 	 */
102
-	public function setRowsCount($rowsCount,$colsCount=NULL,$force=false){
102
+	public function setRowsCount($rowsCount, $colsCount=NULL, $force=false) {
103 103
 		$count=$this->count();
104
-		if($rowsCount<2 && $force===false){
105
-			for($i=$count;$i<$colsCount;$i++){
104
+		if ($rowsCount<2 && $force===false) {
105
+			for ($i=$count; $i<$colsCount; $i++) {
106 106
 				$this->addItem(new HtmlGridCol("col-".$this->identifier."-".$i));
107 107
 			}
108
-		}else{
109
-			if($this->hasOnlyCols($count)){
108
+		}else {
109
+			if ($this->hasOnlyCols($count)) {
110 110
 				$tmpContent=$this->content;
111 111
 				$item=$this->addItem($colsCount);
112 112
 				$item->setContent($tmpContent);
113 113
 				$this->content=array();
114 114
 				$count=1;
115 115
 			}
116
-			for($i=$count;$i<$rowsCount;$i++){
116
+			for ($i=$count; $i<$rowsCount; $i++) {
117 117
 				$this->addItem($colsCount);
118 118
 			}
119 119
 		}
120 120
 		return $this;
121 121
 	}
122 122
 
123
-	protected function hasOnlyCols($count){
123
+	protected function hasOnlyCols($count) {
124 124
 		return $count>0 && $this->content[0] instanceof HtmlGridCol;
125 125
 	}
126 126
 
@@ -131,17 +131,17 @@  discard block
 block discarded – undo
131 131
 	 * @param int $width
132 132
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
133 133
 	 */
134
-	public function setColsCount($numCols,$toCreate=true,$width=NULL){
135
-		if(isset($width)===false)
134
+	public function setColsCount($numCols, $toCreate=true, $width=NULL) {
135
+		if (isset($width)===false)
136 136
 			$this->setWide($numCols);
137
-		if($toCreate==true){
137
+		if ($toCreate==true) {
138 138
 			$count=$this->count();
139
-			if($count==0 || $this->hasOnlyCols($count)){
140
-				for($i=$count;$i<$numCols;$i++){
141
-					$this->addItem(new HtmlGridCol("col-".$this->identifier."-".$i,$width));
139
+			if ($count==0 || $this->hasOnlyCols($count)) {
140
+				for ($i=$count; $i<$numCols; $i++) {
141
+					$this->addItem(new HtmlGridCol("col-".$this->identifier."-".$i, $width));
142 142
 				}
143
-			}else{
144
-				for($i=0;$i<$count;$i++){
143
+			}else {
144
+				for ($i=0; $i<$count; $i++) {
145 145
 					$this->getItem($i)->setColsCount($numCols);
146 146
 				}
147 147
 			}
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 	 * @param int $index
155 155
 	 * @return \Ajax\semantic\html\collections\HtmlGridRow
156 156
 	 */
157
-	public function getRow($index){
157
+	public function getRow($index) {
158 158
 		return $this->getItem($index);
159 159
 	}
160 160
 
@@ -162,9 +162,9 @@  discard block
 block discarded – undo
162 162
 	 * Returns the row count
163 163
 	 * @return int
164 164
 	 */
165
-	public function rowCount(){
165
+	public function rowCount() {
166 166
 		$count=$this->count();
167
-		if($this->hasOnlyCols($count))
167
+		if ($this->hasOnlyCols($count))
168 168
 			return 0;
169 169
 		return $count;
170 170
 	}
@@ -173,11 +173,11 @@  discard block
 block discarded – undo
173 173
 	 * Returns the column count
174 174
 	 * @return int
175 175
 	 */
176
-	public function colCount(){
176
+	public function colCount() {
177 177
 		$count=$this->count();
178
-		if($this->hasOnlyCols($count))
178
+		if ($this->hasOnlyCols($count))
179 179
 			return $count;
180
-		if($count>0)
180
+		if ($count>0)
181 181
 			return $this->getItem(0)->count();
182 182
 		return 0;
183 183
 	}
@@ -188,11 +188,11 @@  discard block
 block discarded – undo
188 188
 	 * @param int $col
189 189
 	 * @return \Ajax\semantic\html\collections\HtmlGridCol
190 190
 	 */
191
-	public function getCell($row,$col){
192
-		if($row<2 && $this->hasOnlyCols($this->count()))
191
+	public function getCell($row, $col) {
192
+		if ($row<2 && $this->hasOnlyCols($this->count()))
193 193
 			return $this->getItem($col);
194 194
 		$row=$this->getItem($row);
195
-		if(isset($row)){
195
+		if (isset($row)) {
196 196
 			$col=$row->getItem($col);
197 197
 		}
198 198
 		return $col;
@@ -203,9 +203,9 @@  discard block
 block discarded – undo
203 203
 	 * @param boolean $vertically
204 204
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
205 205
 	 */
206
-	public function setDivided($vertically=false){
207
-		$value=($vertically===true)?"vertically divided":"divided";
208
-		return $this->addToPropertyCtrl("class", $value,array("divided"));
206
+	public function setDivided($vertically=false) {
207
+		$value=($vertically===true) ? "vertically divided" : "divided";
208
+		return $this->addToPropertyCtrl("class", $value, array("divided"));
209 209
 	}
210 210
 
211 211
 	/**
@@ -213,23 +213,23 @@  discard block
 block discarded – undo
213 213
 	 * @param boolean $internally true for internal cells
214 214
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
215 215
 	 */
216
-	public function setCelled($internally=false){
217
-		$value=($internally===true)?"internally celled":"celled";
218
-		return $this->addToPropertyCtrl("class", $value,array("celled","internally celled"));
216
+	public function setCelled($internally=false) {
217
+		$value=($internally===true) ? "internally celled" : "celled";
218
+		return $this->addToPropertyCtrl("class", $value, array("celled", "internally celled"));
219 219
 	}
220 220
 
221 221
 	/**
222 222
 	 * A grid can have its columns centered
223 223
 	 */
224
-	public function setCentered(){
225
-		return $this->addToPropertyCtrl("class", "centered",array("centered"));
224
+	public function setCentered() {
225
+		return $this->addToPropertyCtrl("class", "centered", array("centered"));
226 226
 	}
227 227
 
228 228
 	/**
229 229
 	 * automatically resize all elements to split the available width evenly
230 230
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
231 231
 	 */
232
-	public function setEqualWidth(){
232
+	public function setEqualWidth() {
233 233
 		return $this->addToProperty("class", "equal width");
234 234
 	}
235 235
 
@@ -238,9 +238,9 @@  discard block
 block discarded – undo
238 238
 	 * @param string $value
239 239
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
240 240
 	 */
241
-	public function setPadded($value=NULL){
242
-		if(isset($value))
243
-			$this->addToPropertyCtrl("class", $value,array("vertically","horizontally"));
241
+	public function setPadded($value=NULL) {
242
+		if (isset($value))
243
+			$this->addToPropertyCtrl("class", $value, array("vertically", "horizontally"));
244 244
 		return $this->addToProperty("class", "padded");
245 245
 	}
246 246
 
@@ -248,23 +248,23 @@  discard block
 block discarded – undo
248 248
 	 * @param boolean $very
249 249
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
250 250
 	 */
251
-	public function setRelaxed($very=false){
252
-		$value=($very===true)?"very relaxed":"relaxed";
253
-		return $this->addToPropertyCtrl("class", $value,array("relaxed","very relaxed"));
251
+	public function setRelaxed($very=false) {
252
+		$value=($very===true) ? "very relaxed" : "relaxed";
253
+		return $this->addToPropertyCtrl("class", $value, array("relaxed", "very relaxed"));
254 254
 	}
255 255
 
256
-	public function setVerticalAlignment($value=VerticalAlignment::MIDDLE){
257
-		return $this->addToPropertyCtrl("class", $value." aligned",VerticalAlignment::getConstantValues("aligned"));
256
+	public function setVerticalAlignment($value=VerticalAlignment::MIDDLE) {
257
+		return $this->addToPropertyCtrl("class", $value." aligned", VerticalAlignment::getConstantValues("aligned"));
258 258
 	}
259 259
 
260 260
 	/**
261 261
 	 * {@inheritDoc}
262 262
 	 * @see \Ajax\common\html\HtmlCollection::createItem()
263 263
 	 */
264
-	protected function createItem($value){
265
-		if($this->_createCols===false)
264
+	protected function createItem($value) {
265
+		if ($this->_createCols===false)
266 266
 			$value=null;
267
-		$item=new HtmlGridRow($this->identifier."-row-".($this->count()+1),$value,$this->_colSizing,$this->_implicitRows);
267
+		$item=new HtmlGridRow($this->identifier."-row-".($this->count()+1), $value, $this->_colSizing, $this->_implicitRows);
268 268
 		return $item;
269 269
 	}
270 270
 
@@ -272,17 +272,17 @@  discard block
 block discarded – undo
272 272
 	 * Sets $values to the grid
273 273
 	 * @param array $values
274 274
 	 */
275
-	public function setValues($values,$force=true){
275
+	public function setValues($values, $force=true) {
276 276
 		$count=$this->count();
277
-		if($this->_createCols===false || $force===true){
278
-			for($i=$count;$i<\sizeof($values);$i++){
277
+		if ($this->_createCols===false || $force===true) {
278
+			for ($i=$count; $i<\sizeof($values); $i++) {
279 279
 				$colSize=\sizeof($values[$i]);
280
-				$this->addItem(new HtmlGridRow($this->identifier."-row-".($this->count()+1),$colSize,$this->_colSizing,$this->_implicitRows));
280
+				$this->addItem(new HtmlGridRow($this->identifier."-row-".($this->count()+1), $colSize, $this->_colSizing, $this->_implicitRows));
281 281
 			}
282 282
 		}
283
-		$count=\min(array($this->count(),\sizeof($values)));
284
-		for($i=0;$i<$count;$i++){
285
-			$this->content[$i]->setValues($values[$i],$this->_createCols===false);
283
+		$count=\min(array($this->count(), \sizeof($values)));
284
+		for ($i=0; $i<$count; $i++) {
285
+			$this->content[$i]->setValues($values[$i], $this->_createCols===false);
286 286
 		}
287 287
 	}
288 288
 
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 	 * stretch the row contents to take up the entire column height
291 291
 	 * @return \Ajax\semantic\html\content\HtmlGridRow
292 292
 	 */
293
-	public function setStretched(){
293
+	public function setStretched() {
294 294
 		return $this->addToProperty("class", "stretched");
295 295
 	}
296 296
 
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/HtmlFormInput.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,13 +8,13 @@
 block discarded – undo
8 8
 class HtmlFormInput extends HtmlFormField {
9 9
 	use TextFieldsTrait;
10 10
 
11
-	public function __construct($identifier, $label=NULL,$type="text",$value=NULL,$placeholder=NULL) {
12
-		if(!isset($placeholder) && $type==="text")
11
+	public function __construct($identifier, $label=NULL, $type="text", $value=NULL, $placeholder=NULL) {
12
+		if (!isset($placeholder) && $type==="text")
13 13
 			$placeholder=$label;
14
-		parent::__construct("field-".$identifier, new HtmlInput($identifier,$type,$value,$placeholder), $label);
14
+		parent::__construct("field-".$identifier, new HtmlInput($identifier, $type, $value, $placeholder), $label);
15 15
 	}
16 16
 
17
-	public function setReadonly(){
17
+	public function setReadonly() {
18 18
 		$this->getField()->setProperty("readonly", "");
19 19
 	}
20 20
 }
21 21
\ 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
@@ -9,8 +9,9 @@
 block discarded – undo
9 9
 	use TextFieldsTrait;
10 10
 
11 11
 	public function __construct($identifier, $label=NULL,$type="text",$value=NULL,$placeholder=NULL) {
12
-		if(!isset($placeholder) && $type==="text")
13
-			$placeholder=$label;
12
+		if(!isset($placeholder) && $type==="text") {
13
+					$placeholder=$label;
14
+		}
14 15
 		parent::__construct("field-".$identifier, new HtmlInput($identifier,$type,$value,$placeholder), $label);
15 16
 	}
16 17
 
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/elements/HtmlList.php 3 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -10,6 +10,9 @@  discard block
 block discarded – undo
10 10
 class HtmlList extends HtmlSemCollection{
11 11
 	protected $_hasCheckedList;
12 12
 
13
+	/**
14
+	 * @param string $identifier
15
+	 */
13 16
 	public function __construct( $identifier, $items=array()){
14 17
 		parent::__construct( $identifier, "div", "ui list");
15 18
 		$this->addItems($items);
@@ -27,6 +30,9 @@  discard block
 block discarded – undo
27 30
 		return $item;
28 31
 	}
29 32
 
33
+	/**
34
+	 * @param integer $niveau
35
+	 */
30 36
 	public function addHeader($niveau,$content){
31 37
 		return $this->wrap(new HtmlHeader("header-".$this->identifier,$niveau,$content,"page"));
32 38
 	}
Please login to merge, or discard this patch.
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -19,15 +19,15 @@  discard block
 block discarded – undo
19 19
 	protected function createItem($value) {
20 20
 		$count=$this->count();
21 21
 		if (\is_array($value)) {
22
-			$item=new HtmlListItem("item-" . $this->identifier . "-" . $count, $value[0]);
22
+			$item=new HtmlListItem("item-".$this->identifier."-".$count, $value[0]);
23 23
 			$item->addIcon($value[1]);
24
-		} else
25
-			$item=new HtmlListItem("item-" . $this->identifier . "-" . $count, $value);
24
+		}else
25
+			$item=new HtmlListItem("item-".$this->identifier."-".$count, $value);
26 26
 		return $item;
27 27
 	}
28 28
 
29 29
 	public function addHeader($niveau, $content) {
30
-		$header=new HtmlHeader("header-" . $this->identifier, $niveau, $content, "page");
30
+		$header=new HtmlHeader("header-".$this->identifier, $niveau, $content, "page");
31 31
 		$this->wrap($header);
32 32
 		return $header;
33 33
 	}
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	}
38 38
 
39 39
 	public function asLink() {
40
-		$this->addToPropertyCtrl("class", "link", array ("link" ));
40
+		$this->addToPropertyCtrl("class", "link", array("link"));
41 41
 		return $this->contentAs("a");
42 42
 	}
43 43
 
@@ -52,9 +52,9 @@  discard block
 block discarded – undo
52 52
 	}
53 53
 
54 54
 	public function run(JsUtils $js) {
55
-		if ($this->_hasCheckedList === true) {
56
-			$jsCode=include dirname(__FILE__) . '/../../components/jsTemplates/tplCheckedList.php';
57
-			$jsCode=\str_replace("%identifier%", "#" . $this->identifier, $jsCode);
55
+		if ($this->_hasCheckedList===true) {
56
+			$jsCode=include dirname(__FILE__).'/../../components/jsTemplates/tplCheckedList.php';
57
+			$jsCode=\str_replace("%identifier%", "#".$this->identifier, $jsCode);
58 58
 			$this->executeOnRun($jsCode);
59 59
 		}
60 60
 		return parent::run($js);
@@ -70,28 +70,28 @@  discard block
 block discarded – undo
70 70
 
71 71
 	public function addCheckedList($items=array(), $masterItem=NULL, $values=array()) {
72 72
 		$count=$this->count();
73
-		$identifier=$this->identifier . "-" . $count;
73
+		$identifier=$this->identifier."-".$count;
74 74
 		if (isset($masterItem)) {
75
-			$masterO=new HtmlFormCheckbox("master-" . $identifier, $masterItem);
75
+			$masterO=new HtmlFormCheckbox("master-".$identifier, $masterItem);
76 76
 			$masterO->getField()->addToProperty("class", "master");
77 77
 			$masterO->setClass("item");
78 78
 			$this->addItem($masterO);
79 79
 		}
80
-		$fields=array ();
80
+		$fields=array();
81 81
 		$i=0;
82
-		foreach ( $items as $val => $caption ) {
83
-			$itemO=new HtmlFormCheckbox($identifier . "-" . $i++, $caption, $val, "child");
84
-			if (\array_search($val, $values) !== false) {
82
+		foreach ($items as $val => $caption) {
83
+			$itemO=new HtmlFormCheckbox($identifier."-".$i++, $caption, $val, "child");
84
+			if (\array_search($val, $values)!==false) {
85 85
 				$itemO->getField()->getField()->setProperty("checked", "");
86 86
 			}
87 87
 			$itemO->setClass("item");
88 88
 			$fields[]=$itemO;
89 89
 		}
90
-		if (isset($masterO) === true) {
90
+		if (isset($masterO)===true) {
91 91
 			$list=new HtmlList("", $fields);
92 92
 			$list->setClass("list");
93 93
 			$masterO->addContent($list);
94
-		} else {
94
+		}else {
95 95
 			$this->addList($fields);
96 96
 		}
97 97
 		$this->_hasCheckedList=true;
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,9 @@
 block discarded – undo
21 21
 		if (\is_array($value)) {
22 22
 			$item=new HtmlListItem("item-" . $this->identifier . "-" . $count, $value[0]);
23 23
 			$item->addIcon($value[1]);
24
-		} else
25
-			$item=new HtmlListItem("item-" . $this->identifier . "-" . $count, $value);
24
+		} else {
25
+					$item=new HtmlListItem("item-" . $this->identifier . "-" . $count, $value);
26
+		}
26 27
 		return $item;
27 28
 	}
28 29
 
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlReveal.php 2 patches
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -10,64 +10,64 @@
 block discarded – undo
10 10
 
11 11
 class HtmlReveal extends HtmlSemDoubleElement {
12 12
 
13
-	public function __construct($identifier, $visibleContent,$hiddenContent,$type=RevealType::FADE,$attributeType=NULL) {
13
+	public function __construct($identifier, $visibleContent, $hiddenContent, $type=RevealType::FADE, $attributeType=NULL) {
14 14
 		parent::__construct($identifier, "div", "ui reveal");
15 15
 		$this->setElement(0, $visibleContent);
16 16
 		$this->setElement(1, $hiddenContent);
17
-		$this->setType($type,$attributeType);
17
+		$this->setType($type, $attributeType);
18 18
 	}
19 19
 
20
-	private function setElement($index,$content){
21
-		if(!$content instanceof HtmlSingleElement){
22
-			$content=new HtmlLabel("",$content);
20
+	private function setElement($index, $content) {
21
+		if (!$content instanceof HtmlSingleElement) {
22
+			$content=new HtmlLabel("", $content);
23 23
 		}
24
-		if($content instanceof HtmlSemDoubleElement){
25
-			$content=new HtmlSemDoubleElement($this->identifier."-".$index,"div","",$content);
26
-		}elseif ($content instanceof HtmlImg){
24
+		if ($content instanceof HtmlSemDoubleElement) {
25
+			$content=new HtmlSemDoubleElement($this->identifier."-".$index, "div", "", $content);
26
+		}elseif ($content instanceof HtmlImg) {
27 27
 			$this->addToPropertyCtrl("class", "image", array("image"));
28 28
 		}
29
-		$content->addToProperty("class",(($index===0)?"visible":"hidden")." content");
29
+		$content->addToProperty("class", (($index===0) ? "visible" : "hidden")." content");
30 30
 		$this->content[$index]=$content;
31 31
 		return $this;
32 32
 	}
33 33
 
34
-	public function setVisibleContent($visibleContent){
34
+	public function setVisibleContent($visibleContent) {
35 35
 		return $this->setElement(0, $visibleContent);
36 36
 	}
37 37
 
38
-	public function setHiddenContent($hiddenContent){
38
+	public function setHiddenContent($hiddenContent) {
39 39
 		return $this->setElement(1, $hiddenContent);
40 40
 	}
41 41
 
42
-	public function getVisibleContent(){
42
+	public function getVisibleContent() {
43 43
 		return $this->content[0];
44 44
 	}
45 45
 
46
-	public function getHiddenContent(){
46
+	public function getHiddenContent() {
47 47
 		return $this->content[1];
48 48
 	}
49 49
 
50
-	public function setType($type,$attribute=NULL){
50
+	public function setType($type, $attribute=NULL) {
51 51
 		$this->addToPropertyCtrl("class", $type, RevealType::getConstants());
52
-		if(isset($attribute)){
52
+		if (isset($attribute)) {
53 53
 			$this->addToPropertyCtrl("class", $attribute, Direction::getConstants());
54 54
 		}
55 55
 		return $this;
56 56
 	}
57 57
 
58
-	public function setFade($attribute=NULL){
59
-		return $this->setType(RevealType::FADE,$attribute);
58
+	public function setFade($attribute=NULL) {
59
+		return $this->setType(RevealType::FADE, $attribute);
60 60
 	}
61 61
 
62
-	public function setMove($attribute=NULL){
63
-		return $this->setType(RevealType::MOVE,$attribute);
62
+	public function setMove($attribute=NULL) {
63
+		return $this->setType(RevealType::MOVE, $attribute);
64 64
 	}
65 65
 
66
-	public function setRotate($attribute=NULL){
67
-		return $this->setType(RevealType::ROTATE,$attribute);
66
+	public function setRotate($attribute=NULL) {
67
+		return $this->setType(RevealType::ROTATE, $attribute);
68 68
 	}
69 69
 
70
-	public function setCircular(){
70
+	public function setCircular() {
71 71
 		return $this->addToProperty("class", "circular");
72 72
 	}
73 73
 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 		}
24 24
 		if($content instanceof HtmlSemDoubleElement){
25 25
 			$content=new HtmlSemDoubleElement($this->identifier."-".$index,"div","",$content);
26
-		}elseif ($content instanceof HtmlImg){
26
+		} elseif ($content instanceof HtmlImg){
27 27
 			$this->addToPropertyCtrl("class", "image", array("image"));
28 28
 		}
29 29
 		$content->addToProperty("class",(($index===0)?"visible":"hidden")." content");
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlStep.php 2 patches
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@  discard block
 block discarded – undo
9 9
 use Ajax\common\html\HtmlDoubleElement;
10 10
 use Ajax\semantic\html\base\constants\Side;
11 11
 
12
-class HtmlStep extends HtmlSemCollection{
12
+class HtmlStep extends HtmlSemCollection {
13 13
 	protected $_activeStep;
14 14
 
15
-	public function __construct( $identifier,$steps=array()){
16
-		parent::__construct( $identifier,"div", "ui steps");
15
+	public function __construct($identifier, $steps=array()) {
16
+		parent::__construct($identifier, "div", "ui steps");
17 17
 		$this->addItems($steps);
18 18
 	}
19 19
 
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	 * @see \Ajax\common\html\html5\HtmlCollection::createItem()
24 24
 	 */
25 25
 	protected function createItem($value) {
26
-		$itemO=new HtmlStepItem("item-".\sizeof($this->content),$value);
26
+		$itemO=new HtmlStepItem("item-".\sizeof($this->content), $value);
27 27
 		return $itemO;
28 28
 	}
29 29
 
@@ -31,50 +31,50 @@  discard block
 block discarded – undo
31 31
 	 * @param string|array $step
32 32
 	 * @return HtmlStepItem
33 33
 	 */
34
-	public function addStep($step){
34
+	public function addStep($step) {
35 35
 		return $this->addItem($step);
36 36
 	}
37 37
 
38
-	public function setOrdered(){
38
+	public function setOrdered() {
39 39
 		return $this->addToProperty("class", "ordered");
40 40
 	}
41 41
 
42
-	public function isOrdered(){
42
+	public function isOrdered() {
43 43
 		return $this->propertyContains("class", "ordered");
44 44
 	}
45 45
 
46
-	public function setVertical(){
46
+	public function setVertical() {
47 47
 		return $this->addToProperty("class", "vertical");
48 48
 	}
49 49
 
50
-	protected function defineActiveStep(){
50
+	protected function defineActiveStep() {
51 51
 		$activestep=$this->_activeStep;
52 52
 		$count=$this->count();
53
-		if($this->isOrdered()){
54
-			for($i=0;$i<$count;$i++){
53
+		if ($this->isOrdered()) {
54
+			for ($i=0; $i<$count; $i++) {
55 55
 				$step=$this->content[$i];
56 56
 				$step->removeStatus();
57
-				if($i<$activestep)
57
+				if ($i<$activestep)
58 58
 					$step->setCompleted();
59 59
 				elseif ($i===$activestep)
60 60
 					$step->setActive();
61 61
 				else
62 62
 					$step->setDisabled();
63 63
 			}
64
-		}else{
65
-			foreach ($this->content as $step){
64
+		}else {
65
+			foreach ($this->content as $step) {
66 66
 				$step->removeStatus();
67 67
 			}
68
-			if($activestep<$count)
68
+			if ($activestep<$count)
69 69
 				$this->content[$activestep]->setActive();
70 70
 		}
71 71
 		return $this;
72 72
 	}
73 73
 
74 74
 	public function compile(JsUtils $js=NULL, View $view=NULL) {
75
-		if(isset($this->_activeStep)===true && \is_numeric($this->_activeStep))
75
+		if (isset($this->_activeStep)===true && \is_numeric($this->_activeStep))
76 76
 			$this->defineActiveStep();
77
-		return parent::compile($js,$view);
77
+		return parent::compile($js, $view);
78 78
 	}
79 79
 
80 80
 	public function setActiveStep($_activeStep) {
@@ -82,15 +82,15 @@  discard block
 block discarded – undo
82 82
 		return $this;
83 83
 	}
84 84
 
85
-	public function setAttached($side="",HtmlDoubleElement $toElement=NULL){
86
-		if(isset($toElement)){
87
-			$toElement->addToPropertyCtrl("class", "attached",array("attached"));
85
+	public function setAttached($side="", HtmlDoubleElement $toElement=NULL) {
86
+		if (isset($toElement)) {
87
+			$toElement->addToPropertyCtrl("class", "attached", array("attached"));
88 88
 		}
89
-		return $this->addToPropertyCtrl("class", $side." attached",Side::getConstantValues("attached"));
89
+		return $this->addToPropertyCtrl("class", $side." attached", Side::getConstantValues("attached"));
90 90
 	}
91 91
 
92
-	public function asLink(){
93
-		foreach ($this->content as $step){
92
+	public function asLink() {
93
+		foreach ($this->content as $step) {
94 94
 			$step->asLink();
95 95
 		}
96 96
 		return $this;
Please login to merge, or discard this patch.
Braces   +14 added lines, -11 removed lines patch added patch discarded remove patch
@@ -54,26 +54,29 @@
 block discarded – undo
54 54
 			for($i=0;$i<$count;$i++){
55 55
 				$step=$this->content[$i];
56 56
 				$step->removeStatus();
57
-				if($i<$activestep)
58
-					$step->setCompleted();
59
-				elseif ($i===$activestep)
60
-					$step->setActive();
61
-				else
62
-					$step->setDisabled();
57
+				if($i<$activestep) {
58
+									$step->setCompleted();
59
+				} elseif ($i===$activestep) {
60
+									$step->setActive();
61
+				} else {
62
+									$step->setDisabled();
63
+				}
63 64
 			}
64
-		}else{
65
+		} else{
65 66
 			foreach ($this->content as $step){
66 67
 				$step->removeStatus();
67 68
 			}
68
-			if($activestep<$count)
69
-				$this->content[$activestep]->setActive();
69
+			if($activestep<$count) {
70
+							$this->content[$activestep]->setActive();
71
+			}
70 72
 		}
71 73
 		return $this;
72 74
 	}
73 75
 
74 76
 	public function compile(JsUtils $js=NULL, View $view=NULL) {
75
-		if(isset($this->_activeStep)===true && \is_numeric($this->_activeStep))
76
-			$this->defineActiveStep();
77
+		if(isset($this->_activeStep)===true && \is_numeric($this->_activeStep)) {
78
+					$this->defineActiveStep();
79
+		}
77 80
 		return parent::compile($js,$view);
78 81
 	}
79 82
 
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlLabel.php 3 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,9 @@
 block discarded – undo
13 13
 	public function __construct($identifier,$caption="",$icon=NULL,$tagName="div") {
14 14
 		parent::__construct($identifier,$tagName,"ui label");
15 15
 		$this->content=$caption;
16
-		if(isset($icon))
17
-			$this->addIcon($icon);
16
+		if(isset($icon)) {
17
+					$this->addIcon($icon);
18
+		}
18 19
 	}
19 20
 
20 21
 	/**
Please login to merge, or discard this patch.
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,6 +10,10 @@  discard block
 block discarded – undo
10 10
 
11 11
 class HtmlLabel extends HtmlSemDoubleElement {
12 12
 	use LabeledIconTrait;
13
+
14
+	/**
15
+	 * @param string $icon
16
+	 */
13 17
 	public function __construct($identifier,$caption="",$icon=NULL,$tagName="div") {
14 18
 		parent::__construct($identifier,$tagName,"ui label");
15 19
 		$this->content=$caption;
@@ -18,7 +22,6 @@  discard block
 block discarded – undo
18 22
 	}
19 23
 
20 24
 	/**
21
-	 * @param string $side
22 25
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
23 26
 	 */
24 27
 	public function setPointing($value=Direction::NONE){
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -10,10 +10,10 @@  discard block
 block discarded – undo
10 10
 
11 11
 class HtmlLabel extends HtmlSemDoubleElement {
12 12
 	use LabeledIconTrait;
13
-	public function __construct($identifier,$caption="",$icon=NULL,$tagName="div") {
14
-		parent::__construct($identifier,$tagName,"ui label");
13
+	public function __construct($identifier, $caption="", $icon=NULL, $tagName="div") {
14
+		parent::__construct($identifier, $tagName, "ui label");
15 15
 		$this->content=$caption;
16
-		if(isset($icon))
16
+		if (isset($icon))
17 17
 			$this->addIcon($icon);
18 18
 	}
19 19
 
@@ -21,33 +21,33 @@  discard block
 block discarded – undo
21 21
 	 * @param string $side
22 22
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
23 23
 	 */
24
-	public function setPointing($value=Direction::NONE){
25
-		return $this->addToPropertyCtrl("class", $value." pointing",Direction::getConstantValues("pointing"));
24
+	public function setPointing($value=Direction::NONE) {
25
+		return $this->addToPropertyCtrl("class", $value." pointing", Direction::getConstantValues("pointing"));
26 26
 	}
27 27
 
28 28
 	/**
29 29
 	 * @param string $side
30 30
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
31 31
 	 */
32
-	public function toCorner($side="left"){
33
-		return $this->addToPropertyCtrl("class", $side." corner",array("right corner","left corner"));
32
+	public function toCorner($side="left") {
33
+		return $this->addToPropertyCtrl("class", $side." corner", array("right corner", "left corner"));
34 34
 	}
35 35
 
36 36
 	/**
37 37
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
38 38
 	 */
39
-	public function asTag(){
39
+	public function asTag() {
40 40
 		return $this->addToProperty("class", "tag");
41 41
 	}
42 42
 
43 43
 	/**
44 44
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
45 45
 	 */
46
-	public function asLink(){
46
+	public function asLink() {
47 47
 		return $this->setTagName("a");
48 48
 	}
49 49
 
50
-	public function setBasic(){
50
+	public function setBasic() {
51 51
 		return $this->addToProperty("class", "basic");
52 52
 	}
53 53
 
@@ -58,28 +58,28 @@  discard block
 block discarded – undo
58 58
 	 * @param string $before
59 59
 	 * @return \Ajax\semantic\html\elements\HtmlLabel
60 60
 	 */
61
-	public function addImage($src,$alt="",$before=true){
61
+	public function addImage($src, $alt="", $before=true) {
62 62
 		$this->addToProperty("class", "image");
63
-		return $this->addContent(new HtmlImg("image-".$this->identifier,$src,$alt),$before);
63
+		return $this->addContent(new HtmlImg("image-".$this->identifier, $src, $alt), $before);
64 64
 	}
65 65
 
66 66
 	/**
67 67
 	 * @param string $detail
68 68
 	 * @return \Ajax\common\html\HtmlDoubleElement
69 69
 	 */
70
-	public function addDetail($detail){
71
-		$div=new HtmlDoubleElement("detail-".$this->identifier,$this->tagName);
70
+	public function addDetail($detail) {
71
+		$div=new HtmlDoubleElement("detail-".$this->identifier, $this->tagName);
72 72
 		$div->setClass("detail");
73 73
 		$div->setContent($detail);
74 74
 		$this->addContent($div);
75 75
 		return $div;
76 76
 	}
77 77
 
78
-	public function asRibbon(){
78
+	public function asRibbon() {
79 79
 		return $this->addToPropertyCtrl("class", "ribbon", array("ribbon"));
80 80
 	}
81 81
 
82
-	public static function ribbon($identifier,$caption){
83
-		return (new HtmlLabel($identifier,$caption))->asRibbon();
82
+	public static function ribbon($identifier, $caption) {
83
+		return (new HtmlLabel($identifier, $caption))->asRibbon();
84 84
 	}
85 85
 }
86 86
\ No newline at end of file
Please login to merge, or discard this patch.