Completed
Push — master ( 3cf661...c0f044 )
by Jean-Christophe
03:28
created
Ajax/semantic/html/base/constants/Color.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -5,8 +5,8 @@
 block discarded – undo
5 5
 use Ajax\common\BaseEnum;
6 6
 
7 7
 abstract class Color extends BaseEnum {
8
-	const STANDARD="",RED="red",ORANGE="orange",YELLOW="yellow",
9
-	OLIVE="olive",GREEN="green",TEAL="teal",
10
-	BLUE="blue",VIOLET="violet",PURPLE="purple",
11
-	PINK="pink",BROWN="brown",GREY="grey",BLACK="black";
8
+	const STANDARD="", RED="red", ORANGE="orange", YELLOW="yellow",
9
+	OLIVE="olive", GREEN="green", TEAL="teal",
10
+	BLUE="blue", VIOLET="violet", PURPLE="purple",
11
+	PINK="pink", BROWN="brown", GREY="grey", BLACK="black";
12 12
 }
13 13
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlButtonGroups.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -11,35 +11,35 @@  discard block
 block discarded – undo
11 11
  */
12 12
 class HtmlButtonGroups extends HtmlSemDoubleElement {
13 13
 
14
-	public function __construct($identifier, $elements=array(),$asIcons=false) {
15
-		parent::__construct($identifier, "div","ui buttons");
14
+	public function __construct($identifier, $elements=array(), $asIcons=false) {
15
+		parent::__construct($identifier, "div", "ui buttons");
16 16
 		$this->content=array();
17
-		if($asIcons===true)
17
+		if ($asIcons===true)
18 18
 			$this->asIcons();
19
-		$this->addElements($elements,$asIcons);
19
+		$this->addElements($elements, $asIcons);
20 20
 	}
21
-	public function addElement($element,$asIcon=false){
21
+	public function addElement($element, $asIcon=false) {
22 22
 		$elementO=$element;
23
-		if(\is_string($element)){
24
-			if($asIcon){
23
+		if (\is_string($element)) {
24
+			if ($asIcon) {
25 25
 				$elementO=new HtmlButton("button-".\sizeof($this->content));
26 26
 				$elementO->asIcon($element);
27 27
 			}else
28
-				$elementO=new HtmlButton("button-".\sizeof($this->content),$element);
28
+				$elementO=new HtmlButton("button-".\sizeof($this->content), $element);
29 29
 		}
30 30
 		$this->addContent($elementO);
31 31
 	}
32 32
 
33 33
 
34
-	public function addElements($elements,$asIcons=false) {
35
-		foreach ( $elements as $element ) {
36
-			$this->addElement($element,$asIcons);
34
+	public function addElements($elements, $asIcons=false) {
35
+		foreach ($elements as $element) {
36
+			$this->addElement($element, $asIcons);
37 37
 		}
38 38
 		return $this;
39 39
 	}
40 40
 
41
-	public function insertOr($aferIndex=0,$or="or"){
42
-		$orElement=new HtmlSemDoubleElement("or-".$this->identifier,"div","or");
41
+	public function insertOr($aferIndex=0, $or="or") {
42
+		$orElement=new HtmlSemDoubleElement("or-".$this->identifier, "div", "or");
43 43
 		$orElement->setProperty("data-text", $or);
44 44
 		array_splice($this->content, $aferIndex+1, 0, array($orElement));
45 45
 		return $this;
@@ -52,18 +52,18 @@  discard block
 block discarded – undo
52 52
 		$this->addElements($array);
53 53
 	}
54 54
 
55
-	public function asIcons(){
56
-		foreach ($this->content as $item){
55
+	public function asIcons() {
56
+		foreach ($this->content as $item) {
57 57
 			$item->asIcon($item->getContent());
58 58
 		}
59 59
 		return $this->addToProperty("class", "icons");
60 60
 	}
61 61
 
62
-	public function setVertical(){
62
+	public function setVertical() {
63 63
 		return $this->addToProperty("class", "vertical");
64 64
 	}
65 65
 
66
-	public function setLabeled(){
66
+	public function setLabeled() {
67 67
 		return $this->addToProperty("class", "labeled icon");
68 68
 	}
69 69
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	 * @see \Ajax\bootstrap\html\base\BaseHtml::on()
92 92
 	 */
93 93
 	public function on($event, $jsCode, $stopPropagation=false, $preventDefault=false) {
94
-		foreach ( $this->content as $element ) {
94
+		foreach ($this->content as $element) {
95 95
 			$element->on($event, $jsCode, $stopPropagation, $preventDefault);
96 96
 		}
97 97
 		return $this;
Please login to merge, or discard this patch.
Ajax/semantic/components/Dropdown.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
 	 * @param string $action one of "select","auto","activate","combo","nothing","hide"
18 18
 	 * @return \Ajax\semantic\components\Dropdown
19 19
 	 */
20
-	public function setAction($action){
21
-		return $this->setParamCtrl("action", $action,array("select","auto","activate","combo","nothing","hide"));
20
+	public function setAction($action) {
21
+		return $this->setParamCtrl("action", $action, array("select", "auto", "activate", "combo", "nothing", "hide"));
22 22
 	}
23 23
 
24 24
 	/**
@@ -26,11 +26,11 @@  discard block
 block discarded – undo
26 26
 	 * @param string $event Event used to trigger dropdown (Hover, Click, Custom Event)
27 27
 	 * @return \Ajax\semantic\components\Dropdown
28 28
 	 */
29
-	public function setOn($event){
29
+	public function setOn($event) {
30 30
 		return $this->setParam("on", $event);
31 31
 	}
32 32
 
33
-	public function setFullTextSearch($value){
33
+	public function setFullTextSearch($value) {
34 34
 		return $this->setParam("fullTextSearch", $value);
35 35
 	}
36 36
 }
37 37
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/common/html/BaseHtml.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -16,8 +16,8 @@  discard block
 block discarded – undo
16 16
 abstract class BaseHtml extends BaseWidget {
17 17
 	protected $_template;
18 18
 	protected $tagName;
19
-	protected $properties=array ();
20
-	protected $events=array ();
19
+	protected $properties=array();
20
+	protected $events=array();
21 21
 	protected $wrapBefore="";
22 22
 	protected $wrapAfter="";
23 23
 	protected $_bsComponent;
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
 	public function addToProperty($name, $value, $separator=" ") {
58 58
 		$v=@$this->properties[$name];
59
-		if (isset($v)&&$v!=="")
59
+		if (isset($v) && $v!=="")
60 60
 			$v=$v.$separator.$value;
61 61
 		else
62 62
 			$v=$value;
@@ -71,11 +71,11 @@  discard block
 block discarded – undo
71 71
 
72 72
 	public function compile(JsUtils $js=NULL, View $view=NULL) {
73 73
 		$result=$this->getTemplate();
74
-		foreach ( $this as $key => $value ) {
75
-			if (PhalconUtils::startsWith($key, "_")===false&&$key!=="events") {
74
+		foreach ($this as $key => $value) {
75
+			if (PhalconUtils::startsWith($key, "_")===false && $key!=="events") {
76 76
 				if (is_array($value)) {
77 77
 					$v=PropertyWrapper::wrap($value, $js);
78
-				} else {
78
+				}else {
79 79
 					$v=$value;
80 80
 				}
81 81
 				$result=str_ireplace("%".$key."%", $v, $result);
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 		if (isset($view)===true) {
88 88
 			$controls=$view->getVar("q");
89 89
 			if (isset($controls)===false) {
90
-				$controls=array ();
90
+				$controls=array();
91 91
 			}
92 92
 			$controls [$this->identifier]=$result;
93 93
 			$view->setVar("q", $controls);
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 			if (array_search($value, $typeCtrl)===false) {
101 101
 				throw new \Exception("La valeur passée a propriété `".$name."` ne fait pas partie des valeurs possibles : {".implode(",", $typeCtrl)."}");
102 102
 			}
103
-		} else {
103
+		}else {
104 104
 			if (!$typeCtrl($value)) {
105 105
 				throw new \Exception("La fonction ".$typeCtrl." a retourné faux pour l'affectation de la propriété ".$name);
106 106
 			}
@@ -108,9 +108,9 @@  discard block
 block discarded – undo
108 108
 		return true;
109 109
 	}
110 110
 
111
-	protected function propertyContains($propertyName,$value){
111
+	protected function propertyContains($propertyName, $value) {
112 112
 		$values=$this->getProperty($propertyName);
113
-		if(isset($values)){
113
+		if (isset($values)) {
114 114
 			return JString::contains($values, $value);
115 115
 		}
116 116
 		return false;
@@ -137,13 +137,13 @@  discard block
 block discarded – undo
137 137
 		return $this;
138 138
 	}
139 139
 
140
-	protected function removePropertyValue($name,$value){
140
+	protected function removePropertyValue($name, $value) {
141 141
 		$this->properties[$name]=\str_replace($value, "", $this->properties[$name]);
142 142
 		return $this;
143 143
 	}
144 144
 
145
-	protected function removeProperty($name){
146
-		if(\array_key_exists($name, $this->properties))
145
+	protected function removeProperty($name) {
146
+		if (\array_key_exists($name, $this->properties))
147 147
 			unset($this->properties[$name]);
148 148
 		return $this;
149 149
 	}
@@ -196,28 +196,28 @@  discard block
 block discarded – undo
196 196
 	}
197 197
 
198 198
 	public function fromArray($array) {
199
-		foreach ( $this as $key => $value ) {
199
+		foreach ($this as $key => $value) {
200 200
 			if (array_key_exists($key, $array) && !PhalconUtils::startsWith($key, "_")) {
201 201
 					$setter="set".ucfirst($key);
202 202
 					$this->$setter($array [$key]);
203 203
 				unset($array [$key]);
204 204
 			}
205 205
 		}
206
-		foreach ( $array as $key => $value ) {
206
+		foreach ($array as $key => $value) {
207 207
 			if (method_exists($this, $key)) {
208 208
 				try {
209 209
 					$this->$key($value);
210 210
 					unset($array [$key]);
211
-				} catch ( \Exception $e ) {
211
+				} catch (\Exception $e) {
212 212
 					// Nothing to do
213 213
 				}
214
-			} else {
214
+			}else {
215 215
 				$setter="set".ucfirst($key);
216 216
 				if (method_exists($this, $setter)) {
217 217
 					try {
218 218
 						$this->$setter($value);
219 219
 						unset($array [$key]);
220
-					} catch ( \Exception $e ) {
220
+					} catch (\Exception $e) {
221 221
 						// Nothing to do
222 222
 					}
223 223
 				}
@@ -226,21 +226,21 @@  discard block
 block discarded – undo
226 226
 		return $array;
227 227
 	}
228 228
 
229
-	public function fromDatabaseObjects($objects,$function) {
230
-		if(isset($objects)){
231
-			foreach ($objects as $object){
232
-				$this->fromDatabaseObject($object,$function);
229
+	public function fromDatabaseObjects($objects, $function) {
230
+		if (isset($objects)) {
231
+			foreach ($objects as $object) {
232
+				$this->fromDatabaseObject($object, $function);
233 233
 			}
234 234
 		}
235 235
 		return $this;
236 236
 	}
237 237
 
238
-	public function fromDatabaseObject($object,$function){
238
+	public function fromDatabaseObject($object, $function) {
239 239
 
240 240
 	}
241 241
 
242 242
 	public function wrap($before, $after="") {
243
-		if(isset($before)){
243
+		if (isset($before)) {
244 244
 			$this->wrapBefore.=$before;
245 245
 		}
246 246
 		$this->wrapAfter=$after.$this->wrapAfter;
@@ -262,13 +262,13 @@  discard block
 block discarded – undo
262 262
 		if (array_key_exists($event, $this->events)) {
263 263
 			if (is_array($this->events [$event])) {
264 264
 				$this->events [$event] []=$jsCode;
265
-			} else {
266
-				$this->events [$event]=array (
265
+			}else {
266
+				$this->events [$event]=array(
267 267
 						$this->events [$event],
268 268
 						$jsCode
269 269
 				);
270 270
 			}
271
-		} else {
271
+		}else {
272 272
 			$this->events [$event]=$jsCode;
273 273
 		}
274 274
 	}
@@ -287,14 +287,14 @@  discard block
 block discarded – undo
287 287
 
288 288
 	public function addEventsOnRun(JsUtils $js) {
289 289
 		if (isset($this->_bsComponent)) {
290
-			foreach ( $this->events as $event => $jsCode ) {
290
+			foreach ($this->events as $event => $jsCode) {
291 291
 				$code=$jsCode;
292 292
 				if (is_array($jsCode)) {
293 293
 					$code="";
294
-					foreach ( $jsCode as $jsC ) {
294
+					foreach ($jsCode as $jsC) {
295 295
 						if ($jsC instanceof AjaxCall) {
296 296
 							$code.="\n".$jsC->compile($js);
297
-						} else {
297
+						}else {
298 298
 							$code.="\n".$jsC;
299 299
 						}
300 300
 					}
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
 	}
309 309
 
310 310
 	public function _ajaxOn($operation, $event, $url, $responseElement="", $parameters=array()) {
311
-		$params=array (
311
+		$params=array(
312 312
 				"url" => $url,
313 313
 				"responseElement" => $responseElement
314 314
 		);
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 		if (is_array($elements)) {
348 348
 			$flag=false;
349 349
 			$index=0;
350
-			while ( !$flag&&$index<sizeof($elements) ) {
350
+			while (!$flag && $index<sizeof($elements)) {
351 351
 				if ($elements [$index] instanceof BaseHtml)
352 352
 					$flag=($elements [$index]->getIdentifier()===$identifier);
353 353
 				$index++;
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
 		return null;
362 362
 	}
363 363
 
364
-	public function __toString(){
364
+	public function __toString() {
365 365
 		return $this->compile();
366 366
 	}
367 367
 
@@ -377,25 +377,25 @@  discard block
 block discarded – undo
377 377
 		if (is_array($value)) {
378 378
 			$value=implode(",", $value);
379 379
 		}
380
-		if (strrpos($value, 'this')===false&&strrpos($value, 'event')===false) {
380
+		if (strrpos($value, 'this')===false && strrpos($value, 'event')===false) {
381 381
 			$value='"'.$value.'"';
382 382
 		}
383 383
 		return $value;
384 384
 	}
385 385
 
386
-	public function jsDoJquery($jqueryCall, $param=""){
386
+	public function jsDoJquery($jqueryCall, $param="") {
387 387
 		return "$('#".$this->identifier."').".$jqueryCall."(".$this->_prep_value($param).");";
388 388
 	}
389 389
 
390
-	public function jsHtml($content=""){
391
-		return $this->jsDoJquery("html",$content);
390
+	public function jsHtml($content="") {
391
+		return $this->jsDoJquery("html", $content);
392 392
 	}
393 393
 
394
-	public function jsShow(){
394
+	public function jsShow() {
395 395
 		return $this->jsDoJquery("show");
396 396
 	}
397 397
 
398
-	public function jsHide(){
398
+	public function jsHide() {
399 399
 		return $this->jsDoJquery("hide");
400 400
 	}
401 401
 
Please login to merge, or discard this patch.
Ajax/lib/CDN.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -1,9 +1,9 @@  discard block
 block discarded – undo
1 1
 <?php
2
-return array (
3
-		"JQuery" => array (
4
-				"MaxCDN" => array (
2
+return array(
3
+		"JQuery" => array(
4
+				"MaxCDN" => array(
5 5
 						"url" => "http://code.jquery.com/jquery-%version%.min.js",
6
-						"versions" => array (
6
+						"versions" => array(
7 7
 								"2.2.3",
8 8
 								"2.2.1",
9 9
 								"2.1.4",
@@ -11,9 +11,9 @@  discard block
 block discarded – undo
11 11
 								"1.11.2"
12 12
 						)
13 13
 				),
14
-				"Google" => array (
14
+				"Google" => array(
15 15
 						"url" => "https://ajax.googleapis.com/ajax/libs/jquery/%version%/jquery.min.js",
16
-						"versions" => array (
16
+						"versions" => array(
17 17
 								"2.2.2",
18 18
 								"2.2.1",
19 19
 								"2.2.0",
@@ -25,17 +25,17 @@  discard block
 block discarded – undo
25 25
 						)
26 26
 				)
27 27
 		),
28
-		"JQueryUI" => array (
29
-				"MaxCDN" => array (
28
+		"JQueryUI" => array(
29
+				"MaxCDN" => array(
30 30
 						"core" => "http://code.jquery.com/ui/%version%/jquery-ui.min.js",
31 31
 						"css" => "http://code.jquery.com/ui/%version%/themes/%theme%/jquery-ui.css",
32
-						"versions" => array (
32
+						"versions" => array(
33 33
 								"1.11.4",
34 34
 								"1.11.3",
35 35
 								"1.11.2",
36 36
 								"1.10.4"
37 37
 						),
38
-						"themes" => array (
38
+						"themes" => array(
39 39
 								"black-tie",
40 40
 								"blitzer",
41 41
 								"cupertino",
@@ -62,10 +62,10 @@  discard block
 block discarded – undo
62 62
 								"vader"
63 63
 						)
64 64
 				),
65
-				"Google" => array (
65
+				"Google" => array(
66 66
 						"core" => "https://ajax.googleapis.com/ajax/libs/jqueryui/%version%/jquery-ui.min.js",
67 67
 						"css" => "https://ajax.googleapis.com/ajax/libs/jqueryui/%version%/themes/%theme%/jquery-ui.css",
68
-						"versions" => array (
68
+						"versions" => array(
69 69
 								"1.11.4",
70 70
 								"1.11.3",
71 71
 								"1.11.2",
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 								"1.10.4",
75 75
 								"1.10.0"
76 76
 						),
77
-						"themes" => array (
77
+						"themes" => array(
78 78
 								"black-tie",
79 79
 								"blitzer",
80 80
 								"cupertino",
@@ -102,25 +102,25 @@  discard block
 block discarded – undo
102 102
 						)
103 103
 				)
104 104
 		),
105
-		"Bootstrap" => array (
106
-				"MaxCDN" => array (
105
+		"Bootstrap" => array(
106
+				"MaxCDN" => array(
107 107
 						"core" => "http://maxcdn.bootstrapcdn.com/bootstrap/%version%/js/bootstrap.min.js",
108 108
 						"css" => "http://maxcdn.bootstrapcdn.com/bootstrap/%version%/css/bootstrap.min.css",
109
-						"versions" => array (
109
+						"versions" => array(
110 110
 								"3.3.6",
111 111
 								"3.3.5"
112 112
 						),
113
-						"themes" => array ()
113
+						"themes" => array()
114 114
 				)
115 115
 		),
116
-		"Semantic" => array (
117
-				"cdnjs" => array (
116
+		"Semantic" => array(
117
+				"cdnjs" => array(
118 118
 						"core" => "https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/%version%/semantic.min.js",
119 119
 						"css" => "https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/%version%/semantic.min.js",
120
-						"versions" => array (
120
+						"versions" => array(
121 121
 								"2.1.8"
122 122
 						),
123
-						"themes" => array ()
123
+						"themes" => array()
124 124
 				)
125 125
 		)
126 126
 );
127 127
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/lib/CDNCoreCss.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
9 9
 	protected $localCss;
10 10
 	protected $framework;
11 11
 
12
-	public function __construct($framework,$version, $provider="MaxCDN") {
12
+	public function __construct($framework, $version, $provider="MaxCDN") {
13 13
 		parent::__construct($version, $provider);
14 14
 		$this->framework=$framework;
15 15
 		$this->data=$this->data [$framework];
Please login to merge, or discard this patch.
Ajax/JsUtils.php 1 patch
Spacing   +65 added lines, -65 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
 
51 51
 	protected function _setDi($di) {
52 52
 		$this->_di=$di;
53
-		if ($this->js!=null&&$di!=null)
53
+		if ($this->js!=null && $di!=null)
54 54
 			$this->js->setDi($di);
55 55
 	}
56 56
 
@@ -145,18 +145,18 @@  discard block
 block discarded – undo
145 145
 	}
146 146
 
147 147
 	public function __construct($params=array()) {
148
-		$defaults=array (
148
+		$defaults=array(
149 149
 				'driver' => 'Jquery',
150 150
 				'debug' => true
151 151
 		);
152
-		foreach ( $defaults as $key => $val ) {
153
-			if (isset($params[$key])&&$params[$key]!=="") {
152
+		foreach ($defaults as $key => $val) {
153
+			if (isset($params[$key]) && $params[$key]!=="") {
154 154
 				$defaults[$key]=$params[$key];
155 155
 			}
156 156
 		}
157 157
 		extract($defaults);
158 158
 		$this->js=new Jquery($defaults);
159
-		$this->cdns=array ();
159
+		$this->cdns=array();
160 160
 	}
161 161
 
162 162
 	public function addToCompile($jsScript) {
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
 	 * @return string
409 409
 	 */
410 410
 	public function addClass($element='this', $class='', $immediatly=false) {
411
-		return $this->js->_genericCallValue('addClass',$element, $class, $immediatly);
411
+		return $this->js->_genericCallValue('addClass', $element, $class, $immediatly);
412 412
 	}
413 413
 
414 414
 	/**
@@ -418,8 +418,8 @@  discard block
 block discarded – undo
418 418
 	 * @param boolean $immediatly defers the execution if set to false
419 419
 	 * @return string
420 420
 	 */
421
-	public function after($to, $element, $immediatly=false){
422
-		return $this->js->_genericCallElement('after',$to, $element, $immediatly);
421
+	public function after($to, $element, $immediatly=false) {
422
+		return $this->js->_genericCallElement('after', $to, $element, $immediatly);
423 423
 	}
424 424
 
425 425
 	/**
@@ -429,8 +429,8 @@  discard block
 block discarded – undo
429 429
 	 * @param boolean $immediatly defers the execution if set to false
430 430
 	 * @return string
431 431
 	 */
432
-	public function before($to, $element, $immediatly=false){
433
-		return $this->js->_genericCallElement('before',$to, $element, $immediatly);
432
+	public function before($to, $element, $immediatly=false) {
433
+		return $this->js->_genericCallElement('before', $to, $element, $immediatly);
434 434
 	}
435 435
 
436 436
 	/**
@@ -450,8 +450,8 @@  discard block
 block discarded – undo
450 450
 	 * @param string $value
451 451
 	 * @param boolean $immediatly defers the execution if set to false
452 452
 	 */
453
-	public function val($element='this',$value='',$immediatly=false){
454
-		return $this->js->_genericCallValue('val',$element,$value,$immediatly);
453
+	public function val($element='this', $value='', $immediatly=false) {
454
+		return $this->js->_genericCallValue('val', $element, $value, $immediatly);
455 455
 	}
456 456
 
457 457
 	/**
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
 	 * @param boolean $immediatly defers the execution if set to false
462 462
 	 */
463 463
 	public function html($element='this', $value='', $immediatly=false) {
464
-		return $this->js->_genericCallValue('html',$element, $value, $immediatly);
464
+		return $this->js->_genericCallValue('html', $element, $value, $immediatly);
465 465
 	}
466 466
 	// --------------------------------------------------------------------
467 467
 	/**
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
 	 * @return string
487 487
 	 */
488 488
 	public function append($to, $element, $immediatly=false) {
489
-		return $this->js->_genericCallElement('append',$to, $element, $immediatly);
489
+		return $this->js->_genericCallElement('append', $to, $element, $immediatly);
490 490
 	}
491 491
 
492 492
 	/**
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
 	 * @return string
498 498
 	 */
499 499
 	public function prepend($to, $element, $immediatly=false) {
500
-		return $this->js->_genericCallElement('prepend',$to, $element, $immediatly);
500
+		return $this->js->_genericCallElement('prepend', $to, $element, $immediatly);
501 501
 	}
502 502
 	// --------------------------------------------------------------------
503 503
 	/**
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
 	 * @return string
549 549
 	 */
550 550
 	public function removeClass($element='this', $class='', $immediatly=false) {
551
-		return $this->js->_genericCall('removeClass',$element, $class, $immediatly);
551
+		return $this->js->_genericCall('removeClass', $element, $class, $immediatly);
552 552
 	}
553 553
 	// --------------------------------------------------------------------
554 554
 	/**
@@ -609,7 +609,7 @@  discard block
 block discarded – undo
609 609
 	 * @return string
610 610
 	 */
611 611
 	public function toggleClass($element='this', $class='', $immediatly=false) {
612
-		return $this->js->_genericCallValue('toggleClass',$element, $class, $immediatly);
612
+		return $this->js->_genericCallValue('toggleClass', $element, $class, $immediatly);
613 613
 	}
614 614
 
615 615
 	/**
@@ -656,11 +656,11 @@  discard block
 block discarded – undo
656 656
 	 */
657 657
 	public function compile($view=NULL, $view_var='script_foot', $script_tags=TRUE) {
658 658
 		$bs=$this->_bootstrap;
659
-		if (isset($bs)&&isset($view)) {
659
+		if (isset($bs) && isset($view)) {
660 660
 			$bs->compileHtml($this, $view);
661 661
 		}
662 662
 		$sem=$this->_semantic;
663
-		if (isset($sem)&&isset($view)) {
663
+		if (isset($sem) && isset($view)) {
664 664
 			$sem->compileHtml($this, $view);
665 665
 		}
666 666
 		return $this->js->_compile($view, $view_var, $script_tags);
@@ -740,27 +740,27 @@  discard block
 block discarded – undo
740 740
 				$json_result=$result->result_array();
741 741
 			} elseif (is_array($result)) {
742 742
 				$json_result=$result;
743
-			} else {
743
+			}else {
744 744
 				return $this->_prep_args($result);
745 745
 			}
746
-		} else {
746
+		}else {
747 747
 			return 'null';
748 748
 		}
749 749
 		return $this->_create_json($json_result, $match_array_type);
750 750
 	}
751 751
 
752 752
 	private function _create_json($json_result, $match_array_type) {
753
-		$json=array ();
753
+		$json=array();
754 754
 		$_is_assoc=TRUE;
755
-		if (!is_array($json_result)&&empty($json_result)) {
755
+		if (!is_array($json_result) && empty($json_result)) {
756 756
 			show_error("Generate JSON Failed - Illegal key, value pair.");
757 757
 		} elseif ($match_array_type) {
758 758
 			$_is_assoc=$this->_is_associative_array($json_result);
759 759
 		}
760
-		foreach ( $json_result as $k => $v ) {
760
+		foreach ($json_result as $k => $v) {
761 761
 			if ($_is_assoc) {
762 762
 				$json[]=$this->_prep_args($k, TRUE).':'.$this->generate_json($v, $match_array_type);
763
-			} else {
763
+			}else {
764 764
 				$json[]=$this->generate_json($v, $match_array_type);
765 765
 			}
766 766
 		}
@@ -775,7 +775,7 @@  discard block
 block discarded – undo
775 775
 	 * @return type
776 776
 	 */
777 777
 	public function _is_associative_array($arr) {
778
-		foreach ( array_keys($arr) as $key => $val ) {
778
+		foreach (array_keys($arr) as $key => $val) {
779 779
 			if ($key!==$val) {
780 780
 				return TRUE;
781 781
 			}
@@ -794,11 +794,11 @@  discard block
 block discarded – undo
794 794
 			return 'null';
795 795
 		} elseif (is_bool($result)) {
796 796
 			return ($result===TRUE) ? 'true' : 'false';
797
-		} elseif (is_string($result)||$is_key) {
798
-			return '"'.str_replace(array (
799
-					'\\',"\t","\n","\r",'"','/'
800
-			), array (
801
-					'\\\\','\\t','\\n',"\\r",'\"','\/'
797
+		} elseif (is_string($result) || $is_key) {
798
+			return '"'.str_replace(array(
799
+					'\\', "\t", "\n", "\r", '"', '/'
800
+			), array(
801
+					'\\\\', '\\t', '\\n', "\\r", '\"', '\/'
802 802
 			), $result).'"';
803 803
 		} elseif (is_scalar($result)) {
804 804
 			return $result;
@@ -813,8 +813,8 @@  discard block
 block discarded – undo
813 813
 	 * @param string $jsCallback javascript code to execute after the request
814 814
 	 * @param boolean $hasLoader true for showing ajax loader. default : true
815 815
 	 */
816
-	public function get($url, $responseElement="", $params="{}", $jsCallback=NULL,$hasLoader=true) {
817
-		return $this->js->_get($url, $params, $responseElement, $jsCallback, NULL, $hasLoader,true);
816
+	public function get($url, $responseElement="", $params="{}", $jsCallback=NULL, $hasLoader=true) {
817
+		return $this->js->_get($url, $params, $responseElement, $jsCallback, NULL, $hasLoader, true);
818 818
 	}
819 819
 
820 820
 	/**
@@ -825,8 +825,8 @@  discard block
 block discarded – undo
825 825
 	 * @param string $jsCallback javascript code to execute after the request
826 826
 	 * @param boolean $immediatly
827 827
 	 */
828
-	public function json($url, $method="get", $params="{}", $jsCallback=NULL, $attr="id", $context="document",$immediatly=false) {
829
-		return $this->js->_json($url, $method, $params, $jsCallback, $attr, $context,$immediatly);
828
+	public function json($url, $method="get", $params="{}", $jsCallback=NULL, $attr="id", $context="document", $immediatly=false) {
829
+		return $this->js->_json($url, $method, $params, $jsCallback, $attr, $context, $immediatly);
830 830
 	}
831 831
 
832 832
 	/**
@@ -836,8 +836,8 @@  discard block
 block discarded – undo
836 836
 	 * @param string $url the request address
837 837
 	 * @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","params"=>"{}","method"=>"get","immediatly"=>true)
838 838
 	 */
839
-	public function jsonOn($event,$element, $url,$parameters=array()) {
840
-		return $this->js->_jsonOn($event, $element, $url,$parameters);
839
+	public function jsonOn($event, $element, $url, $parameters=array()) {
840
+		return $this->js->_jsonOn($event, $element, $url, $parameters);
841 841
 	}
842 842
 
843 843
 	/**
@@ -881,8 +881,8 @@  discard block
 block discarded – undo
881 881
 	 * @param string $url the request url
882 882
 	 * @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","params"=>"{}","method"=>"get","immediatly"=>true)
883 883
 	 */
884
-	public function jsonArrayOn($event,$element,$maskSelector, $url,$parameters=array()) {
885
-		return $this->js->_jsonArrayOn($event,$element,$maskSelector, $url, $parameters);
884
+	public function jsonArrayOn($event, $element, $maskSelector, $url, $parameters=array()) {
885
+		return $this->js->_jsonArrayOn($event, $element, $maskSelector, $url, $parameters);
886 886
 	}
887 887
 
888 888
 	/**
@@ -894,7 +894,7 @@  discard block
 block discarded – undo
894 894
 	 * @param string $jsCallback javascript code to execute after the request
895 895
 	 * @param string $attr the html attribute added to the request
896 896
 	 */
897
-	public function getDeferred($url, $responseElement="", $params="{}", $jsCallback=NULL,$attr="id") {
897
+	public function getDeferred($url, $responseElement="", $params="{}", $jsCallback=NULL, $attr="id") {
898 898
 		return $this->js->_get($url, $params, $responseElement, $jsCallback, $attr, false);
899 899
 	}
900 900
 
@@ -932,8 +932,8 @@  discard block
 block discarded – undo
932 932
 	 * @param string $jsCallback javascript code to execute after the request
933 933
 	 * @param boolean $hasLoader true for showing ajax loader. default : true
934 934
 	 */
935
-	public function post($url, $responseElement="", $params="{}", $jsCallback=NULL,$hasLoader=true) {
936
-		return $this->js->_post($url, $params, $responseElement, $jsCallback, NULL, $hasLoader,true);
935
+	public function post($url, $responseElement="", $params="{}", $jsCallback=NULL, $hasLoader=true) {
936
+		return $this->js->_post($url, $params, $responseElement, $jsCallback, NULL, $hasLoader, true);
937 937
 	}
938 938
 
939 939
 	/**
@@ -946,8 +946,8 @@  discard block
 block discarded – undo
946 946
 	 * @param string $jsCallback javascript code to execute after the request
947 947
 	 * @param boolean $hasLoader true for showing ajax loader. default : true
948 948
 	 */
949
-	public function postDeferred($url, $responseElement="", $params="{}", $jsCallback=NULL, $attr="id",$hasLoader=true) {
950
-		return $this->js->_post($url, $params, $responseElement, $jsCallback, $attr, $hasLoader,false);
949
+	public function postDeferred($url, $responseElement="", $params="{}", $jsCallback=NULL, $attr="id", $hasLoader=true) {
950
+		return $this->js->_post($url, $params, $responseElement, $jsCallback, $attr, $hasLoader, false);
951 951
 	}
952 952
 
953 953
 	/**
@@ -961,7 +961,7 @@  discard block
 block discarded – undo
961 961
 	 * @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"immediatly"=>true)
962 962
 	 */
963 963
 	public function postOn($event, $element, $url, $params="{}", $responseElement="", $parameters=array()) {
964
-		return $this->js->_postOn($event, $element,  $url, $params, $responseElement, $parameters);
964
+		return $this->js->_postOn($event, $element, $url, $params, $responseElement, $parameters);
965 965
 	}
966 966
 
967 967
 	/**
@@ -985,8 +985,8 @@  discard block
 block discarded – undo
985 985
 	 * @param string $jsCallback javascript code to execute after the request
986 986
 	 * @param boolean $hasLoader true for showing ajax loader. default : true
987 987
 	 */
988
-	public function postForm($url, $form, $responseElement, $validation=false, $jsCallback=NULL,$hasLoader=true) {
989
-		return $this->js->_postForm($url, $form, $responseElement, $validation, $jsCallback, NULL, $hasLoader,true);
988
+	public function postForm($url, $form, $responseElement, $validation=false, $jsCallback=NULL, $hasLoader=true) {
989
+		return $this->js->_postForm($url, $form, $responseElement, $validation, $jsCallback, NULL, $hasLoader, true);
990 990
 	}
991 991
 
992 992
 	/**
@@ -999,8 +999,8 @@  discard block
 block discarded – undo
999 999
 	 * @param string $attr the html attribute added to the request
1000 1000
 	 * @param boolean $hasLoader true for showing ajax loader. default : true
1001 1001
 	 */
1002
-	public function postFormDeferred($url, $form, $responseElement, $validation=false, $jsCallback=NULL,$attr="id",$hasLoader=true) {
1003
-		return $this->js->_postForm($url, $form, $responseElement, $validation, $jsCallback, $attr, $hasLoader,false);
1002
+	public function postFormDeferred($url, $form, $responseElement, $validation=false, $jsCallback=NULL, $attr="id", $hasLoader=true) {
1003
+		return $this->js->_postForm($url, $form, $responseElement, $validation, $jsCallback, $attr, $hasLoader, false);
1004 1004
 	}
1005 1005
 
1006 1006
 	/**
@@ -1014,7 +1014,7 @@  discard block
 block discarded – undo
1014 1014
 	 * @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"validation"=>false,"jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"immediatly"=>true)
1015 1015
 	 */
1016 1016
 	public function postFormOn($event, $element, $url, $form, $responseElement="", $parameters=array()) {
1017
-		return $this->js->_postFormOn($event,$element, $url, $form, $responseElement, $parameters);
1017
+		return $this->js->_postFormOn($event, $element, $url, $form, $responseElement, $parameters);
1018 1018
 	}
1019 1019
 
1020 1020
 	/**
@@ -1069,7 +1069,7 @@  discard block
 block discarded – undo
1069 1069
 		$preventDefault=false;
1070 1070
 		$immediatly=true;
1071 1071
 		extract($parameters);
1072
-		return $this->js->_doJQueryOn($event, $element, $elementToModify, $jqueryCall, $param, $preventDefault, $stopPropagation, $jsCallback,$immediatly);
1072
+		return $this->js->_doJQueryOn($event, $element, $elementToModify, $jqueryCall, $param, $preventDefault, $stopPropagation, $jsCallback, $immediatly);
1073 1073
 	}
1074 1074
 
1075 1075
 	/**
@@ -1096,7 +1096,7 @@  discard block
 block discarded – undo
1096 1096
 		$preventDefault=false;
1097 1097
 		$immediatly=true;
1098 1098
 		extract($parameters);
1099
-		$script=$this->js->_execOn($element, $event, $js, $preventDefault, $stopPropagation,$immediatly);
1099
+		$script=$this->js->_execOn($element, $event, $js, $preventDefault, $stopPropagation, $immediatly);
1100 1100
 		return $script;
1101 1101
 	}
1102 1102
 
@@ -1106,7 +1106,7 @@  discard block
 block discarded – undo
1106 1106
 
1107 1107
 	public function setCDNs($cdns) {
1108 1108
 		if (is_array($cdns)===false) {
1109
-			$cdns=array (
1109
+			$cdns=array(
1110 1110
 					$cdns
1111 1111
 			);
1112 1112
 		}
@@ -1118,9 +1118,9 @@  discard block
 block discarded – undo
1118 1118
 		$hasJQueryUI=false;
1119 1119
 		$hasBootstrap=false;
1120 1120
 		$hasSemantic=false;
1121
-		$result=array ();
1122
-		foreach ( $this->cdns as $cdn ) {
1123
-			switch(get_class($cdn)) {
1121
+		$result=array();
1122
+		foreach ($this->cdns as $cdn) {
1123
+			switch (get_class($cdn)) {
1124 1124
 				case "Ajax\lib\CDNJQuery":
1125 1125
 					$hasJQuery=true;
1126 1126
 					$result[0]=$cdn;
@@ -1130,11 +1130,11 @@  discard block
 block discarded – undo
1130 1130
 					$result[1]=$cdn;
1131 1131
 					break;
1132 1132
 				case "Ajax\lib\CDNCoreCss":
1133
-					if($cdn->getFramework()==="Bootstrap")
1133
+					if ($cdn->getFramework()==="Bootstrap")
1134 1134
 						$hasBootstrap=true;
1135
-					elseif($cdn->getFramework()==="Semantic")
1135
+					elseif ($cdn->getFramework()==="Semantic")
1136 1136
 						$hasSemantic=true;
1137
-					if($hasSemantic || $hasBootstrap)
1137
+					if ($hasSemantic || $hasBootstrap)
1138 1138
 						$result[2]=$cdn;
1139 1139
 					break;
1140 1140
 			}
@@ -1142,14 +1142,14 @@  discard block
 block discarded – undo
1142 1142
 		if ($hasJQuery===false) {
1143 1143
 			$result[0]=new CDNJQuery("x");
1144 1144
 		}
1145
-		if ($hasJQueryUI===false&&isset($this->_ui)) {
1145
+		if ($hasJQueryUI===false && isset($this->_ui)) {
1146 1146
 			$result[1]=new CDNGuiGen("x", $template);
1147 1147
 		}
1148
-		if ($hasBootstrap===false&&isset($this->_bootstrap)) {
1149
-			$result[2]=new CDNCoreCss("Bootstrap","x");
1148
+		if ($hasBootstrap===false && isset($this->_bootstrap)) {
1149
+			$result[2]=new CDNCoreCss("Bootstrap", "x");
1150 1150
 		}
1151
-		if ($hasSemantic===false&&isset($this->_semantic)) {
1152
-			$result[2]=new CDNCoreCss("Semantic","x");
1151
+		if ($hasSemantic===false && isset($this->_semantic)) {
1152
+			$result[2]=new CDNCoreCss("Semantic", "x");
1153 1153
 		}
1154 1154
 		ksort($result);
1155 1155
 		return implode("\n", $result);
@@ -1162,7 +1162,7 @@  discard block
 block discarded – undo
1162 1162
 			$this->_setDi($di);
1163 1163
 		}
1164 1164
 	}
1165
-} else {
1165
+}else {
1166 1166
 	class JsUtils extends _JsUtils {
1167 1167
 
1168 1168
 		public function setDi(DiInterface $di) {
Please login to merge, or discard this patch.
Ajax/semantic/html/base/constants/Social.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,5 +2,5 @@
 block discarded – undo
2 2
 namespace Ajax\semantic\html\base\constants;
3 3
 	use Ajax\common\BaseEnum;
4 4
 abstract class Social extends BaseEnum {
5
-	const FACEBOOK="facebook", TWITTER="twitter",GOOGLEPLUS="google plus",VK="vk",LINKEDIN="linkedin",INSTAGRAM="instagram",YOUTUBE="youtube";
5
+	const FACEBOOK="facebook", TWITTER="twitter", GOOGLEPLUS="google plus", VK="vk", LINKEDIN="linkedin", INSTAGRAM="instagram", YOUTUBE="youtube";
6 6
 }
7 7
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlAccordionMenuItem.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,11 +4,11 @@
 block discarded – undo
4 4
 
5 5
 
6 6
 class HtmlAccordionMenuItem extends HtmlMenuItem {
7
-	public function __construct($identifier,$title,$content) {
8
-		parent::__construct($identifier, new HtmlAccordionItem("accordion-".$identifier, $title,$content));
7
+	public function __construct($identifier, $title, $content) {
8
+		parent::__construct($identifier, new HtmlAccordionItem("accordion-".$identifier, $title, $content));
9 9
 	}
10 10
 
11
-	public function setActive($value=true){
11
+	public function setActive($value=true) {
12 12
 		$this->content->setActive($value);
13 13
 		return $this;
14 14
 	}
Please login to merge, or discard this patch.