Completed
Push — master ( 012895...9e0835 )
by Jean-Christophe
03:33
created
Ajax/Jquery.php 1 patch
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -17,21 +17,21 @@  discard block
 block discarded – undo
17 17
  * jQuery Class
18 18
  */
19 19
 class Jquery {
20
-	use JqueryEventsTrait,JqueryAjaxTrait,JqueryActionsTrait;
20
+	use JqueryEventsTrait, JqueryAjaxTrait, JqueryActionsTrait;
21 21
 	protected $_di;
22 22
 	protected $_ui;
23 23
 	protected $_bootstrap;
24 24
 	protected $_semantic;
25 25
 	protected $libraryFile;
26 26
 	protected $_javascript_folder='js';
27
-	protected $jquery_code_for_load=array ();
28
-	protected $jquery_code_for_compile=array ();
27
+	protected $jquery_code_for_load=array();
28
+	protected $jquery_code_for_compile=array();
29 29
 	protected $jquery_corner_active=FALSE;
30 30
 	protected $jquery_table_sorter_active=FALSE;
31 31
 	protected $jquery_table_sorter_pager_active=FALSE;
32 32
 
33
-	protected $jquery_events=array (
34
-			"bind","blur","change","click","dblclick","delegate","die","error","focus","focusin","focusout","hover","keydown","keypress","keyup","live","load","mousedown","mousseenter","mouseleave","mousemove","mouseout","mouseover","mouseup","off","on","one","ready","resize","scroll","select","submit","toggle","trigger","triggerHandler","undind","undelegate","unload"
33
+	protected $jquery_events=array(
34
+			"bind", "blur", "change", "click", "dblclick", "delegate", "die", "error", "focus", "focusin", "focusout", "hover", "keydown", "keypress", "keyup", "live", "load", "mousedown", "mousseenter", "mouseleave", "mousemove", "mouseout", "mouseover", "mouseup", "off", "on", "one", "ready", "resize", "scroll", "select", "submit", "toggle", "trigger", "triggerHandler", "undind", "undelegate", "unload"
35 35
 	);
36 36
 
37 37
 	public function setDi($di) {
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
 	public function __construct($params) {
63 63
 		$this->params=array();
64
-		foreach ( $params as $key => $val ) {
64
+		foreach ($params as $key => $val) {
65 65
 				$this->params[$key]=$params[$key];
66 66
 		}
67 67
 	}
@@ -135,12 +135,12 @@  discard block
 block discarded – undo
135 135
 	 */
136 136
 	public function _output($array_js='') {
137 137
 		if (!is_array($array_js)) {
138
-			$array_js=array (
138
+			$array_js=array(
139 139
 					$array_js
140 140
 			);
141 141
 		}
142 142
 
143
-		foreach ( $array_js as $js ) {
143
+		foreach ($array_js as $js) {
144 144
 			$this->jquery_code_for_compile[]="\t$js\n";
145 145
 		}
146 146
 	}
@@ -152,12 +152,12 @@  discard block
 block discarded – undo
152 152
 	 * @param string $param
153 153
 	 * @param boolean $immediatly delayed if false
154 154
 	 */
155
-	public function _genericCallValue($jQueryCall,$element='this', $param="", $immediatly=false) {
155
+	public function _genericCallValue($jQueryCall, $element='this', $param="", $immediatly=false) {
156 156
 		$element=$this->_prep_element($element);
157 157
 		if (isset($param)) {
158 158
 			$param=$this->_prep_value($param);
159 159
 			$str="$({$element}).{$jQueryCall}({$param});";
160
-		} else
160
+		}else
161 161
 			$str="$({$element}).{$jQueryCall}();";
162 162
 			if ($immediatly)
163 163
 				$this->jquery_code_for_compile[]=$str;
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 	 * @param boolean $immediatly delayed if false
172 172
 	 * @return string
173 173
 	 */
174
-	public function _genericCallElement($jQueryCall,$to='this', $element, $immediatly=false) {
174
+	public function _genericCallElement($jQueryCall, $to='this', $element, $immediatly=false) {
175 175
 		$to=$this->_prep_element($to);
176 176
 		$element=$this->_prep_element($element);
177 177
 		$str="$({$to}).{$jQueryCall}({$element});";
@@ -189,12 +189,12 @@  discard block
 block discarded – undo
189 189
 	 */
190 190
 	public function sortable($element, $options=array()) {
191 191
 		if (count($options)>0) {
192
-			$sort_options=array ();
193
-			foreach ( $options as $k => $v ) {
192
+			$sort_options=array();
193
+			foreach ($options as $k => $v) {
194 194
 				$sort_options[]="\n\t\t".$k.': '.$v."";
195 195
 			}
196 196
 			$sort_options=implode(",", $sort_options);
197
-		} else {
197
+		}else {
198 198
 			$sort_options='';
199 199
 		}
200 200
 
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 	 * @param boolean $stopPropagation Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event.
223 223
 	 * @return string
224 224
 	 */
225
-	public function _add_event($element, $js, $event, $preventDefault=false, $stopPropagation=false,$immediatly=true) {
225
+	public function _add_event($element, $js, $event, $preventDefault=false, $stopPropagation=false, $immediatly=true) {
226 226
 		if (is_array($js)) {
227 227
 			$js=implode("\n\t\t", $js);
228 228
 		}
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
 			$event="\n\t$(".$this->_prep_element($element).").bind('{$event}',function(event){\n\t\t{$js}\n\t});\n";
237 237
 		else
238 238
 			$event="\n\t$(".$this->_prep_element($element).").{$event}(function(event){\n\t\t{$js}\n\t});\n";
239
-		if($immediatly)
239
+		if ($immediatly)
240 240
 			$this->jquery_code_for_compile[]=$event;
241 241
 		return $event;
242 242
 	}
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
 
277 277
 		// External references
278 278
 		$external_scripts=implode('', $this->jquery_code_for_load);
279
-		extract(array (
279
+		extract(array(
280 280
 				'library_src' => $external_scripts
281 281
 		));
282 282
 
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 		$script.='});';
292 292
 
293 293
 		$this->jquery_code_for_compile=array();
294
-		if($this->params["debug"]==false){
294
+		if ($this->params["debug"]==false) {
295 295
 			$script=$this->minify($script);
296 296
 		}
297 297
 		$output=($script_tags===FALSE) ? $script : $this->inline($script);
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
 	 * @return void
312 312
 	 */
313 313
 	public function _clear_compile() {
314
-		$this->jquery_code_for_compile=array ();
314
+		$this->jquery_code_for_compile=array();
315 315
 	}
316 316
 
317 317
 	/**
@@ -320,12 +320,12 @@  discard block
 block discarded – undo
320 320
 	 */
321 321
 	public function _document_ready($js) {
322 322
 		if (!is_array($js)) {
323
-			$js=array (
323
+			$js=array(
324 324
 					$js
325 325
 			);
326 326
 		}
327 327
 
328
-		foreach ( $js as $script ) {
328
+		foreach ($js as $script) {
329 329
 			$this->jquery_code_for_compile[]=$script;
330 330
 		}
331 331
 	}
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
 	 * @return string
340 340
 	 */
341 341
 	public function _prep_element($element) {
342
-		if (strrpos($element, 'this')===false&&strrpos($element, 'event')===false&&strrpos($element, 'self')===false) {
342
+		if (strrpos($element, 'this')===false && strrpos($element, 'event')===false && strrpos($element, 'self')===false) {
343 343
 			$element='"'.addslashes($element).'"';
344 344
 		}
345 345
 		return $element;
@@ -357,14 +357,14 @@  discard block
 block discarded – undo
357 357
 		if (is_array($value)) {
358 358
 			$value=implode(",", $value);
359 359
 		}
360
-		if (strrpos($value, 'this')===false&&strrpos($value, 'event')===false&&strrpos($value, 'self')===false) {
360
+		if (strrpos($value, 'this')===false && strrpos($value, 'event')===false && strrpos($value, 'self')===false) {
361 361
 			$value='"'.$value.'"';
362 362
 		}
363 363
 		return $value;
364 364
 	}
365 365
 
366 366
 	private function minify($input) {
367
-	if(trim($input) === "") return $input;
367
+	if (trim($input)==="") return $input;
368 368
 	return preg_replace(
369 369
 			array(
370 370
 					// Remove comment(s)
Please login to merge, or discard this patch.
Ajax/bootstrap/html/content/HtmlGridRow.php 1 patch
Spacing   +38 added lines, -38 removed lines patch added patch discarded remove patch
@@ -14,89 +14,89 @@
 block discarded – undo
14 14
  */
15 15
 class HtmlGridRow extends HtmlBsDoubleElement {
16 16
 	private $cols;
17
-	public function __construct($identifier,$numCols=NULL){
18
-		parent::__construct($identifier,"div");
17
+	public function __construct($identifier, $numCols=NULL) {
18
+		parent::__construct($identifier, "div");
19 19
 		$this->setProperty("class", "row");
20 20
 		$this->cols=array();
21
-		if(isset($numCols)){
22
-			$numCols=min(12,$numCols);
23
-			$numCols=max(1,$numCols);
24
-			$width=12/$numCols;
25
-			for ($i=0;$i<$numCols;$i++){
26
-				$this->addCol(CssSize::SIZE_MD,$width);
21
+		if (isset($numCols)) {
22
+			$numCols=min(12, $numCols);
23
+			$numCols=max(1, $numCols);
24
+			$width=12 / $numCols;
25
+			for ($i=0; $i<$numCols; $i++) {
26
+				$this->addCol(CssSize::SIZE_MD, $width);
27 27
 			}
28 28
 		}
29 29
 	}
30 30
 
31
-	public function addCol($size=CssSize::SIZE_MD,$width=1){
32
-		$col=new HtmlGridCol($this->identifier."-col-".(sizeof($this->cols)+1),$size,$width);
31
+	public function addCol($size=CssSize::SIZE_MD, $width=1) {
32
+		$col=new HtmlGridCol($this->identifier."-col-".(sizeof($this->cols)+1), $size, $width);
33 33
 		$this->cols[]=$col;
34 34
 		return $col;
35 35
 	}
36 36
 
37
-	public function addColAt($size=CssSize::SIZE_MD,$width=1,$offset=1){
38
-		$col=$this->addCol($size,$width);
39
-		return $col->setOffset($size, max($offset,sizeof($this->cols)+1));
37
+	public function addColAt($size=CssSize::SIZE_MD, $width=1, $offset=1) {
38
+		$col=$this->addCol($size, $width);
39
+		return $col->setOffset($size, max($offset, sizeof($this->cols)+1));
40 40
 	}
41 41
 
42
-	public function getCol($index,$force=true){
42
+	public function getCol($index, $force=true) {
43 43
 		$result=null;
44
-		if($index<sizeof($this->cols)+1){
44
+		if ($index<sizeof($this->cols)+1) {
45 45
 			$result=$this->cols[$index-1];
46
-		}else if ($force){
47
-			$result=$this->addColAt(CssSize::SIZE_MD,1,$index);
46
+		}else if ($force) {
47
+			$result=$this->addColAt(CssSize::SIZE_MD, 1, $index);
48 48
 		}
49 49
 		return $result;
50 50
 	}
51 51
 
52
-	public function getColAt($offset,$force=true){
52
+	public function getColAt($offset, $force=true) {
53 53
 		$result=null;
54
-		foreach ($this->cols as $col){
54
+		foreach ($this->cols as $col) {
55 55
 			$offsets=$col->getOffsets();
56
-			if($result=array_search($offset, $offsets)){
56
+			if ($result=array_search($offset, $offsets)) {
57 57
 				break;
58 58
 			}
59 59
 		}
60
-		if(!$result || isset($result)==false){
61
-			$result=$this->getCol($offset,$force);
60
+		if (!$result || isset($result)==false) {
61
+			$result=$this->getCol($offset, $force);
62 62
 		}
63 63
 		return $result;
64 64
 	}
65 65
 
66 66
 	public function compile(JsUtils $js=NULL, View $view=NULL) {
67 67
 
68
-		foreach ($this->cols as $col){
68
+		foreach ($this->cols as $col) {
69 69
 			$this->addContent($col);
70 70
 		}
71
-		return parent::compile($js,$view);
71
+		return parent::compile($js, $view);
72 72
 	}
73 73
 	public function getCols() {
74 74
 		return $this->cols;
75 75
 	}
76 76
 
77
-	public function setContentForAll($content){
78
-		foreach ($this->cols as $col){
77
+	public function setContentForAll($content) {
78
+		foreach ($this->cols as $col) {
79 79
 			$col->setContent($content);
80 80
 		}
81 81
 	}
82
-	public function merge($size=CssSize::SIZE_MD,$start,$width){
83
-		$col=$this->getColAt($start,false);
84
-		if(isset($col)){
85
-			$col->setWidth($size,$width+1);
86
-			$this->delete($size,$start+1, $width);
82
+	public function merge($size=CssSize::SIZE_MD, $start, $width) {
83
+		$col=$this->getColAt($start, false);
84
+		if (isset($col)) {
85
+			$col->setWidth($size, $width+1);
86
+			$this->delete($size, $start+1, $width);
87 87
 		}
88 88
 	}
89
-	public function delete($size=CssSize::SIZE_MD,$start,$width){
90
-		while($start<sizeof($this->cols)+1 && $width>0){
91
-			$col=$this->getColAt($start,false);
92
-			if(isset($col)){
89
+	public function delete($size=CssSize::SIZE_MD, $start, $width) {
90
+		while ($start<sizeof($this->cols)+1 && $width>0) {
91
+			$col=$this->getColAt($start, false);
92
+			if (isset($col)) {
93 93
 				$widthCol=$col->getWidth($size);
94
-				if($widthCol<=$width){
94
+				if ($widthCol<=$width) {
95 95
 					unset($this->cols[$start-1]);
96
-					$this->cols = array_values($this->cols);
96
+					$this->cols=array_values($this->cols);
97 97
 					$width=$width-$widthCol;
98 98
 				}
99
-			}else{
99
+			}else {
100 100
 				$width=0;
101 101
 			}
102 102
 		}
Please login to merge, or discard this patch.
Ajax/common/traits/JqueryActionsTrait.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -3,7 +3,7 @@  discard block
 block discarded – undo
3 3
 namespace Ajax\common\traits;
4 4
 
5 5
 trait JqueryActionsTrait {
6
-	public abstract function _add_event($element, $js, $event, $preventDefault=false, $stopPropagation=false,$immediatly=true);
6
+	public abstract function _add_event($element, $js, $event, $preventDefault=false, $stopPropagation=false, $immediatly=true);
7 7
 	public abstract function _prep_element($element);
8 8
 	public abstract function _prep_value($value);
9 9
 
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 		if (isset($value)) {
20 20
 			$value=$this->_prep_value($value);
21 21
 			$str="$({$element}).attr(\"$attributeName\",{$value});";
22
-		} else
22
+		}else
23 23
 			$str="$({$element}).attr(\"$attributeName\");";
24 24
 			if ($immediatly)
25 25
 				$this->jquery_code_for_compile[]=$str;
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 	 * @param boolean $immediatly defers the execution if set to false
34 34
 	 * @return string
35 35
 	 */
36
-	public function after($element='this', $value='', $immediatly=false){
36
+	public function after($element='this', $value='', $immediatly=false) {
37 37
 		$element=$this->_prep_element($element);
38 38
 		$value=$this->_prep_value($value);
39 39
 		$str="$({$element}).after({$value});";
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 
59 59
 		$animations="\t\t\t";
60 60
 		if (is_array($params)) {
61
-			foreach ( $params as $param => $value ) {
61
+			foreach ($params as $param => $value) {
62 62
 				$animations.=$param.': \''.$value.'\', ';
63 63
 			}
64 64
 		}
@@ -351,8 +351,8 @@  discard block
 block discarded – undo
351 351
 	 * @param boolean $immediatly
352 352
 	 * @return string
353 353
 	 */
354
-	public function _doJQueryOn($event, $element, $elementToModify, $jqueryCall, $param="", $preventDefault=false, $stopPropagation=false, $jsCallback="",$immediatly=true) {
355
-		return $this->_add_event($element, $this->_doJQuery($elementToModify, $jqueryCall, $param, $jsCallback), $event, $preventDefault, $stopPropagation,$immediatly);
354
+	public function _doJQueryOn($event, $element, $elementToModify, $jqueryCall, $param="", $preventDefault=false, $stopPropagation=false, $jsCallback="", $immediatly=true) {
355
+		return $this->_add_event($element, $this->_doJQuery($elementToModify, $jqueryCall, $param, $jsCallback), $event, $preventDefault, $stopPropagation, $immediatly);
356 356
 	}
357 357
 
358 358
 	/**
@@ -378,8 +378,8 @@  discard block
 block discarded – undo
378 378
 	 * @param boolean $immediatly
379 379
 	 * @return String
380 380
 	 */
381
-	public function _execOn($element, $event, $js, $preventDefault=false, $stopPropagation=false,$immediatly=true) {
382
-		return $this->_add_event($element, $this->_exec($js), $event, $preventDefault, $stopPropagation,$immediatly);
381
+	public function _execOn($element, $event, $js, $preventDefault=false, $stopPropagation=false, $immediatly=true) {
382
+		return $this->_add_event($element, $this->_exec($js), $event, $preventDefault, $stopPropagation, $immediatly);
383 383
 	}
384 384
 
385 385
 	/**
@@ -388,8 +388,8 @@  discard block
 block discarded – undo
388 388
 	 * @return string
389 389
 	 */
390 390
 	private function _validate_speed($speed) {
391
-		if (in_array($speed, array (
392
-				'slow','normal','fast'
391
+		if (in_array($speed, array(
392
+				'slow', 'normal', 'fast'
393 393
 		))) {
394 394
 			$speed='"'.$speed.'"';
395 395
 		} elseif (preg_match("/[^0-9]/", $speed)) {
Please login to merge, or discard this patch.
Ajax/semantic/html/base/traits/IconTrait.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -8,18 +8,18 @@  discard block
 block discarded – undo
8 8
 	private $_hasIcon=false;
9 9
 
10 10
 	protected abstract function addToPropertyCtrl($name, $value, $typeCtrl);
11
-	public abstract function addContent($content,$before=false);
11
+	public abstract function addContent($content, $before=false);
12 12
 
13
-	public function addIcon($icon,$direction=Direction::LEFT){
14
-		if($this->_hasIcon===false){
13
+	public function addIcon($icon, $direction=Direction::LEFT) {
14
+		if ($this->_hasIcon===false) {
15 15
 			$iconO=$icon;
16
-			if(\is_string($icon)){
16
+			if (\is_string($icon)) {
17 17
 				$iconO=new HtmlIcon("icon-".$this->identifier, $icon);
18 18
 			}
19 19
 			$this->addToPropertyCtrl("class", $direction." icon", Direction::getConstantValues("icon"));
20
-			$this->addContent($iconO,false);
20
+			$this->addContent($iconO, false);
21 21
 			$this->_hasIcon=true;
22
-		}else{
22
+		}else {
23 23
 			$iconO=$this->getIcon();
24 24
 			$iconO->setIcon($icon);
25 25
 			$this->addToPropertyCtrl("class", $direction." icon", Direction::getConstantValues("icon"));
@@ -27,10 +27,10 @@  discard block
 block discarded – undo
27 27
 		return $iconO;
28 28
 	}
29 29
 
30
-	public function getIcon(){
31
-		if(\is_array($this->content)){
32
-			foreach ($this->content as $item){
33
-				if($item instanceof HtmlIcon)
30
+	public function getIcon() {
31
+		if (\is_array($this->content)) {
32
+			foreach ($this->content as $item) {
33
+				if ($item instanceof HtmlIcon)
34 34
 					return $item;
35 35
 			}
36 36
 		}
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/traits/FieldsTrait.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -9,26 +9,26 @@  discard block
 block discarded – undo
9 9
 use Ajax\semantic\html\collections\form\HtmlFormCheckbox;
10 10
 use Ajax\semantic\html\collections\form\HtmlFormRadio;
11 11
 trait FieldsTrait {
12
-	public abstract function addFields($fields=NULL,$label=NULL);
12
+	public abstract function addFields($fields=NULL, $label=NULL);
13 13
 	public abstract function addItem($item);
14 14
 
15
-	protected function createItem($value){
16
-		if(\is_array($value)){
17
-			$itemO=new HtmlFormInput(JArray::getDefaultValue($value, "id",""),JArray::getDefaultValue($value, "label",null),JArray::getDefaultValue($value, "type", "text"),JArray::getDefaultValue($value, "value",""),JArray::getDefaultValue($value, "placeholder",JArray::getDefaultValue($value, "label",null)));
15
+	protected function createItem($value) {
16
+		if (\is_array($value)) {
17
+			$itemO=new HtmlFormInput(JArray::getDefaultValue($value, "id", ""), JArray::getDefaultValue($value, "label", null), JArray::getDefaultValue($value, "type", "text"), JArray::getDefaultValue($value, "value", ""), JArray::getDefaultValue($value, "placeholder", JArray::getDefaultValue($value, "label", null)));
18 18
 			return $itemO;
19 19
 		}else
20 20
 			return new HtmlFormInput($value);
21 21
 	}
22 22
 
23
-	public function addInputs($inputs,$fieldslabel=null){
23
+	public function addInputs($inputs, $fieldslabel=null) {
24 24
 		$fields=array();
25
-		foreach ($inputs as $input){
25
+		foreach ($inputs as $input) {
26 26
 			\extract($input);
27
-			$f=new HtmlFormInput("","");
27
+			$f=new HtmlFormInput("", "");
28 28
 			$f->fromArray($input);
29 29
 			$fields[]=$f;
30 30
 		}
31
-		return $this->addFields($fields,$fieldslabel);
31
+		return $this->addFields($fields, $fieldslabel);
32 32
 	}
33 33
 
34 34
 	/**
@@ -39,23 +39,23 @@  discard block
 block discarded – undo
39 39
 	 * @param boolean $multiple
40 40
 	 * @return \Ajax\common\html\HtmlDoubleElement
41 41
 	 */
42
-	public function addDropdown($identifier,$items=array(), $label=NULL,$value=NULL,$multiple=false){
43
-		return $this->addItem(new HtmlFormDropdown($identifier,$items,$label,$value,$multiple));
42
+	public function addDropdown($identifier, $items=array(), $label=NULL, $value=NULL, $multiple=false) {
43
+		return $this->addItem(new HtmlFormDropdown($identifier, $items, $label, $value, $multiple));
44 44
 	}
45 45
 
46
-	public function addInput($identifier, $label=NULL,$type="text",$value=NULL,$placeholder=NULL){
47
-		return $this->addItem(new HtmlFormInput($identifier,$label,$type,$value,$placeholder));
46
+	public function addInput($identifier, $label=NULL, $type="text", $value=NULL, $placeholder=NULL) {
47
+		return $this->addItem(new HtmlFormInput($identifier, $label, $type, $value, $placeholder));
48 48
 	}
49 49
 
50
-	public function addButton($identifier,$value,$cssStyle=NULL,$onClick=NULL){
51
-		return $this->addItem(new HtmlButton($identifier,$value,$cssStyle,$onClick));
50
+	public function addButton($identifier, $value, $cssStyle=NULL, $onClick=NULL) {
51
+		return $this->addItem(new HtmlButton($identifier, $value, $cssStyle, $onClick));
52 52
 	}
53 53
 
54
-	public function addCheckbox($identifier, $label=NULL,$value=NULL,$type=NULL){
55
-		return $this->addItem(new HtmlFormCheckbox($identifier,$label,$value,$type));
54
+	public function addCheckbox($identifier, $label=NULL, $value=NULL, $type=NULL) {
55
+		return $this->addItem(new HtmlFormCheckbox($identifier, $label, $value, $type));
56 56
 	}
57 57
 
58
-	public function addRadio($identifier, $name,$label=NULL,$value=NULL){
59
-		return $this->addItem(new HtmlFormRadio($identifier,$name,$label,$value));
58
+	public function addRadio($identifier, $name, $label=NULL, $value=NULL) {
59
+		return $this->addItem(new HtmlFormRadio($identifier, $name, $label, $value));
60 60
 	}
61 61
 }
62 62
\ No newline at end of file
Please login to merge, or discard this patch.
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/content/HtmlGridCol.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -13,12 +13,12 @@  discard block
 block discarded – undo
13 13
  * @author jc
14 14
  * @version 1.001
15 15
  */
16
-class HtmlGridCol extends HtmlSemDoubleElement{
16
+class HtmlGridCol extends HtmlSemDoubleElement {
17 17
 	use TextAlignmentTrait;
18
-	public function __construct($identifier,$width=NULL){
19
-		parent::__construct($identifier,"div");
18
+	public function __construct($identifier, $width=NULL) {
19
+		parent::__construct($identifier, "div");
20 20
 		$this->setClass("column");
21
-		if(isset($width))
21
+		if (isset($width))
22 22
 			$this->setWidth($width);
23 23
 	}
24 24
 
@@ -27,12 +27,12 @@  discard block
 block discarded – undo
27 27
 	 * @param int $width
28 28
 	 * @return \Ajax\semantic\html\content\HtmlGridCol
29 29
 	 */
30
-	public function setWidth($width){
31
-		if(\is_int($width)){
30
+	public function setWidth($width) {
31
+		if (\is_int($width)) {
32 32
 			$width=Wide::getConstants()["W".$width];
33 33
 		}
34 34
 		$this->addToPropertyCtrl("class", $width, Wide::getConstants());
35
-		return $this->addToPropertyCtrl("class", "wide",array("wide"));
35
+		return $this->addToPropertyCtrl("class", "wide", array("wide"));
36 36
 	}
37 37
 
38 38
 	/**
@@ -40,17 +40,17 @@  discard block
 block discarded – undo
40 40
 	 * @param Direction $value left or right
41 41
 	 * @return \Ajax\semantic\html\content\HtmlGridCol
42 42
 	 */
43
-	public function setFloated($value="left"){
44
-		return $this->addToPropertyCtrl("class", $value." floated",Direction::getConstantValues("floated"));
43
+	public function setFloated($value="left") {
44
+		return $this->addToPropertyCtrl("class", $value." floated", Direction::getConstantValues("floated"));
45 45
 	}
46 46
 
47 47
 
48
-	public function setValue($value){
48
+	public function setValue($value) {
49 49
 		$this->content=$value;
50 50
 		return $this;
51 51
 	}
52 52
 
53
-	public function setValues($value){
53
+	public function setValues($value) {
54 54
 		return $this->setValue($value);
55 55
 	}
56 56
 }
57 57
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlList.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -5,34 +5,34 @@
 block discarded – undo
5 5
 use Ajax\semantic\html\base\HtmlSemCollection;
6 6
 use Ajax\semantic\html\content\HtmlListItem;
7 7
 
8
-class HtmlList extends HtmlSemCollection{
8
+class HtmlList extends HtmlSemCollection {
9 9
 
10 10
 
11
-	public function __construct( $identifier, $items=array()){
12
-		parent::__construct( $identifier, "div", "ui list");
11
+	public function __construct($identifier, $items=array()) {
12
+		parent::__construct($identifier, "div", "ui list");
13 13
 		$this->addItems($items);
14 14
 	}
15 15
 
16 16
 
17
-	protected function createItem($value){
17
+	protected function createItem($value) {
18 18
 		$count=$this->count();
19
-		if(\is_array($value)){
19
+		if (\is_array($value)) {
20 20
 			$item=new HtmlListItem("item-".$this->identifier."-".$count, $value[0]);
21 21
 			$item->addIcon($value[1]);
22 22
 		}else
23
-			$item= new HtmlListItem("item-".$this->identifier."-".$count, $value);
23
+			$item=new HtmlListItem("item-".$this->identifier."-".$count, $value);
24 24
 		return $item;
25 25
 	}
26 26
 
27
-	public function addHeader($niveau,$content){
28
-		return $this->wrap(new HtmlHeader("header-".$this->identifier,$niveau,$content,"page"));
27
+	public function addHeader($niveau, $content) {
28
+		return $this->wrap(new HtmlHeader("header-".$this->identifier, $niveau, $content, "page"));
29 29
 	}
30 30
 
31
-	public function itemsAs($tagName){
31
+	public function itemsAs($tagName) {
32 32
 		return $this->contentAs($tagName);
33 33
 	}
34 34
 
35
-	public function asLink(){
35
+	public function asLink() {
36 36
 		$this->addToPropertyCtrl("class", "link", array("link"));
37 37
 		return $this->contentAs("a");
38 38
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlSticky.php 1 patch
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.