Completed
Push — master ( 751bb4...735cac )
by Jean-Christophe
04:44
created
Ajax/semantic/html/base/constants/CheckboxType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,5 +5,5 @@
 block discarded – undo
5 5
 use Ajax\common\BaseEnum;
6 6
 
7 7
 abstract class CheckboxType extends BaseEnum {
8
-	const STANDARD="",TOGGLE="toggle",SLIDER="slider";
8
+	const STANDARD="", TOGGLE="toggle", SLIDER="slider";
9 9
 }
10 10
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/base/HtmlSemCollection.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -9,10 +9,10 @@
 block discarded – undo
9 9
  * @author jc
10 10
  * @version 1.001
11 11
  */
12
-abstract class HtmlSemCollection extends HtmlCollection{
12
+abstract class HtmlSemCollection extends HtmlCollection {
13 13
 	use BaseTrait;
14
-	public function __construct( $identifier, $tagName="div",$baseClass=""){
15
-		parent::__construct( $identifier, $tagName);
14
+	public function __construct($identifier, $tagName="div", $baseClass="") {
15
+		parent::__construct($identifier, $tagName);
16 16
 		$this->_baseClass=$baseClass;
17 17
 		$this->setClass($baseClass);
18 18
 	}
Please login to merge, or discard this patch.
Ajax/common/html/html5/HtmlTextarea.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -7,26 +7,26 @@
 block discarded – undo
7 7
 
8 8
 class HtmlTextarea extends HtmlDoubleElement {
9 9
 
10
-	public function __construct($identifier,$value=NULL,$placeholder=NULL,$rows=NULL) {
10
+	public function __construct($identifier, $value=NULL, $placeholder=NULL, $rows=NULL) {
11 11
 		parent::__construct($identifier, "textarea");
12 12
 		$this->setValue($value);
13 13
 		$this->setPlaceholder($placeholder);
14
-		if(isset($rows))
14
+		if (isset($rows))
15 15
 			$this->setRows($rows);
16 16
 	}
17 17
 	public function setValue($value) {
18
-		if(isset($value))
18
+		if (isset($value))
19 19
 			$this->setContent($value);
20 20
 		return $this;
21 21
 	}
22 22
 
23
-	public function setPlaceholder($value){
24
-		if(JString::isNotNull($value))
23
+	public function setPlaceholder($value) {
24
+		if (JString::isNotNull($value))
25 25
 			$this->setProperty("placeholder", $value);
26 26
 		return $this;
27 27
 	}
28 28
 
29
-	public function setRows($count){
29
+	public function setRows($count) {
30 30
 		$this->setProperty("rows", $count);
31 31
 	}
32 32
 }
33 33
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/common/html/HtmlCollection.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -13,35 +13,35 @@  discard block
 block discarded – undo
13 13
  */
14 14
 abstract class HtmlCollection extends HtmlDoubleElement {
15 15
 
16
-	public function __construct($identifier,$tagName="div"){
17
-		parent::__construct($identifier,$tagName);
16
+	public function __construct($identifier, $tagName="div") {
17
+		parent::__construct($identifier, $tagName);
18 18
 		$this->content=array();
19 19
 	}
20 20
 
21
-	public function addItems($items){
22
-		if(JArray::isAssociative($items)){
23
-			foreach ($items as $k=>$v){
24
-				$this->addItem([$k,$v]);
21
+	public function addItems($items) {
22
+		if (JArray::isAssociative($items)) {
23
+			foreach ($items as $k=>$v) {
24
+				$this->addItem([$k, $v]);
25 25
 			}
26
-		}else{
27
-			foreach ($items as $item){
26
+		}else {
27
+			foreach ($items as $item) {
28 28
 				$this->addItem($item);
29 29
 			}
30 30
 		}
31 31
 	}
32 32
 
33
-	public function setItems($items){
33
+	public function setItems($items) {
34 34
 		$this->content=$items;
35 35
 		return $this;
36 36
 	}
37 37
 
38
-	public function getItems(){
38
+	public function getItems() {
39 39
 		return $this->content;
40 40
 	}
41 41
 
42
-	protected function getItemToAdd($item){
42
+	protected function getItemToAdd($item) {
43 43
 		$itemO=$item;
44
-		if($this->createCondition($item)===true){
44
+		if ($this->createCondition($item)===true) {
45 45
 			$itemO=$this->createItem($item);
46 46
 		}
47 47
 		return $itemO;
@@ -52,15 +52,15 @@  discard block
 block discarded – undo
52 52
 	 * @param HtmlDoubleElement|string $item
53 53
 	 * @return \Ajax\common\html\HtmlDoubleElement
54 54
 	 */
55
-	public function addItem($item){
55
+	public function addItem($item) {
56 56
 		$itemO=$this->getItemToAdd($item);
57 57
 		$this->addContent($itemO);
58 58
 		return $itemO;
59 59
 	}
60 60
 
61
-	public function insertItem($item,$position=0){
61
+	public function insertItem($item, $position=0) {
62 62
 		$itemO=$this->getItemToAdd($item);
63
-		\array_splice( $this->content, $position, 0, array($itemO));
63
+		\array_splice($this->content, $position, 0, array($itemO));
64 64
 		return $itemO;
65 65
 	}
66 66
 
@@ -83,11 +83,11 @@  discard block
 block discarded – undo
83 83
 		return $this;
84 84
 	}
85 85
 
86
-	public function removeItem($index){
86
+	public function removeItem($index) {
87 87
 		return array_splice($this->content, $index, 1);
88 88
 	}
89 89
 
90
-	public function count(){
90
+	public function count() {
91 91
 		return \sizeof($this->content);
92 92
 	}
93 93
 
@@ -98,8 +98,8 @@  discard block
 block discarded – undo
98 98
 		$this->addItem($function($object));
99 99
 	}
100 100
 
101
-	public function apply($callBack){
102
-		foreach ($this->content as $item){
101
+	public function apply($callBack) {
102
+		foreach ($this->content as $item) {
103 103
 			$callBack($item);
104 104
 		}
105 105
 	}
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	 */
118 118
 	protected abstract function createItem($value);
119 119
 
120
-	protected function createCondition($value){
120
+	protected function createCondition($value) {
121 121
 		return \is_object($value)===false;
122 122
 	}
123 123
 
@@ -132,8 +132,8 @@  discard block
 block discarded – undo
132 132
 		return $this->_bsComponent;
133 133
 	}
134 134
 
135
-	protected function contentAs($tagName){
136
-		foreach ($this->content as $item){
135
+	protected function contentAs($tagName) {
136
+		foreach ($this->content as $item) {
137 137
 			$item->setTagName($tagName);
138 138
 		}
139 139
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/HtmlFormTextarea.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,17 +8,17 @@
 block discarded – undo
8 8
 class HtmlFormTextarea extends HtmlFormField {
9 9
 	use TextFieldsTrait;
10 10
 
11
-	public function __construct($identifier, $label=NULL,$value=NULL,$placeholder=NULL,$rows=NULL) {
12
-		if(!isset($placeholder))
11
+	public function __construct($identifier, $label=NULL, $value=NULL, $placeholder=NULL, $rows=NULL) {
12
+		if (!isset($placeholder))
13 13
 			$placeholder=$label;
14
-		parent::__construct("field-".$identifier, new HtmlTextarea($identifier,$value,$placeholder,$rows), $label);
14
+		parent::__construct("field-".$identifier, new HtmlTextarea($identifier, $value, $placeholder, $rows), $label);
15 15
 	}
16 16
 
17 17
 	/**
18 18
 	 * Defines the textarea row count
19 19
 	 * @param int $count
20 20
 	 */
21
-	public function setRows($count){
21
+	public function setRows($count) {
22 22
 		$this->getField()->setRows($count);
23 23
 	}
24 24
 }
25 25
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/common/traits/JsUtilsAjaxTrait.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
 	 * @param string $jsCallback javascript code to execute after the request
18 18
 	 * @param boolean $hasLoader true for showing ajax loader. default : true
19 19
 	 */
20
-	public function get($url, $responseElement="", $params="{}", $jsCallback=NULL,$hasLoader=true) {
21
-		return $this->js->_get($url, $params, $responseElement, $jsCallback, NULL, $hasLoader,true);
20
+	public function get($url, $responseElement="", $params="{}", $jsCallback=NULL, $hasLoader=true) {
21
+		return $this->js->_get($url, $params, $responseElement, $jsCallback, NULL, $hasLoader, true);
22 22
 	}
23 23
 
24 24
 	/**
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
 	 * @param string $jsCallback javascript code to execute after the request
30 30
 	 * @param boolean $immediatly
31 31
 	 */
32
-	public function json($url, $method="get", $params="{}", $jsCallback=NULL, $attr="id", $context="document",$immediatly=false) {
33
-		return $this->js->_json($url, $method, $params, $jsCallback, $attr, $context,$immediatly);
32
+	public function json($url, $method="get", $params="{}", $jsCallback=NULL, $attr="id", $context="document", $immediatly=false) {
33
+		return $this->js->_json($url, $method, $params, $jsCallback, $attr, $context, $immediatly);
34 34
 	}
35 35
 
36 36
 	/**
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
 	 * @param string $url the request address
41 41
 	 * @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","params"=>"{}","method"=>"get","immediatly"=>true)
42 42
 	 */
43
-	public function jsonOn($event,$element, $url,$parameters=array()) {
44
-		return $this->js->_jsonOn($event, $element, $url,$parameters);
43
+	public function jsonOn($event, $element, $url, $parameters=array()) {
44
+		return $this->js->_jsonOn($event, $element, $url, $parameters);
45 45
 	}
46 46
 
47 47
 	/**
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
 	 * @param string $url the request url
86 86
 	 * @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","params"=>"{}","method"=>"get","immediatly"=>true)
87 87
 	 */
88
-	public function jsonArrayOn($event,$element,$maskSelector, $url,$parameters=array()) {
89
-		return $this->js->_jsonArrayOn($event,$element,$maskSelector, $url, $parameters);
88
+	public function jsonArrayOn($event, $element, $maskSelector, $url, $parameters=array()) {
89
+		return $this->js->_jsonArrayOn($event, $element, $maskSelector, $url, $parameters);
90 90
 	}
91 91
 
92 92
 	/**
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 * @param string $jsCallback javascript code to execute after the request
99 99
 	 * @param string $attr the html attribute added to the request
100 100
 	 */
101
-	public function getDeferred($url, $responseElement="", $params="{}", $jsCallback=NULL,$attr="id") {
101
+	public function getDeferred($url, $responseElement="", $params="{}", $jsCallback=NULL, $attr="id") {
102 102
 		return $this->js->_get($url, $params, $responseElement, $jsCallback, $attr, false);
103 103
 	}
104 104
 
@@ -136,8 +136,8 @@  discard block
 block discarded – undo
136 136
 	 * @param string $jsCallback javascript code to execute after the request
137 137
 	 * @param boolean $hasLoader true for showing ajax loader. default : true
138 138
 	 */
139
-	public function post($url, $responseElement="", $params="{}", $jsCallback=NULL,$hasLoader=true) {
140
-		return $this->js->_post($url, $params, $responseElement, $jsCallback, NULL, $hasLoader,true);
139
+	public function post($url, $responseElement="", $params="{}", $jsCallback=NULL, $hasLoader=true) {
140
+		return $this->js->_post($url, $params, $responseElement, $jsCallback, NULL, $hasLoader, true);
141 141
 	}
142 142
 
143 143
 	/**
@@ -150,8 +150,8 @@  discard block
 block discarded – undo
150 150
 	 * @param string $jsCallback javascript code to execute after the request
151 151
 	 * @param boolean $hasLoader true for showing ajax loader. default : true
152 152
 	 */
153
-	public function postDeferred($url, $responseElement="", $params="{}", $jsCallback=NULL, $attr="id",$hasLoader=true) {
154
-		return $this->js->_post($url, $params, $responseElement, $jsCallback, $attr, $hasLoader,false);
153
+	public function postDeferred($url, $responseElement="", $params="{}", $jsCallback=NULL, $attr="id", $hasLoader=true) {
154
+		return $this->js->_post($url, $params, $responseElement, $jsCallback, $attr, $hasLoader, false);
155 155
 	}
156 156
 
157 157
 	/**
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	 * @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"immediatly"=>true)
166 166
 	 */
167 167
 	public function postOn($event, $element, $url, $params="{}", $responseElement="", $parameters=array()) {
168
-		return $this->js->_postOn($event, $element,  $url, $params, $responseElement, $parameters);
168
+		return $this->js->_postOn($event, $element, $url, $params, $responseElement, $parameters);
169 169
 	}
170 170
 
171 171
 	/**
@@ -189,8 +189,8 @@  discard block
 block discarded – undo
189 189
 	 * @param string $jsCallback javascript code to execute after the request
190 190
 	 * @param boolean $hasLoader true for showing ajax loader. default : true
191 191
 	 */
192
-	public function postForm($url, $form, $responseElement, $validation=false, $jsCallback=NULL,$hasLoader=true) {
193
-		return $this->js->_postForm($url, $form, $responseElement, $validation, $jsCallback, NULL, $hasLoader,true);
192
+	public function postForm($url, $form, $responseElement, $validation=false, $jsCallback=NULL, $hasLoader=true) {
193
+		return $this->js->_postForm($url, $form, $responseElement, $validation, $jsCallback, NULL, $hasLoader, true);
194 194
 	}
195 195
 
196 196
 	/**
@@ -203,8 +203,8 @@  discard block
 block discarded – undo
203 203
 	 * @param string $attr the html attribute added to the request
204 204
 	 * @param boolean $hasLoader true for showing ajax loader. default : true
205 205
 	 */
206
-	public function postFormDeferred($url, $form, $responseElement, $validation=false, $jsCallback=NULL,$attr="id",$hasLoader=true) {
207
-		return $this->js->_postForm($url, $form, $responseElement, $validation, $jsCallback, $attr, $hasLoader,false);
206
+	public function postFormDeferred($url, $form, $responseElement, $validation=false, $jsCallback=NULL, $attr="id", $hasLoader=true) {
207
+		return $this->js->_postForm($url, $form, $responseElement, $validation, $jsCallback, $attr, $hasLoader, false);
208 208
 	}
209 209
 
210 210
 	/**
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 	 * @param array $parameters default : array("preventDefault"=>true,"stopPropagation"=>true,"validation"=>false,"jsCallback"=>NULL,"attr"=>"id","hasLoader"=>true,"immediatly"=>true)
219 219
 	 */
220 220
 	public function postFormOn($event, $element, $url, $form, $responseElement="", $parameters=array()) {
221
-		return $this->js->_postFormOn($event,$element, $url, $form, $responseElement, $parameters);
221
+		return $this->js->_postFormOn($event, $element, $url, $form, $responseElement, $parameters);
222 222
 	}
223 223
 
224 224
 	/**
Please login to merge, or discard this patch.
Ajax/common/traits/JsUtilsActionsTrait.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 	 * @return string
14 14
 	 */
15 15
 	public function addClass($element='this', $class='', $immediatly=false) {
16
-		return $this->js->_genericCallValue('addClass',$element, $class, $immediatly);
16
+		return $this->js->_genericCallValue('addClass', $element, $class, $immediatly);
17 17
 	}
18 18
 
19 19
 	/**
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
 	 * @param boolean $immediatly defers the execution if set to false
24 24
 	 * @return string
25 25
 	 */
26
-	public function after($to, $element, $immediatly=false){
27
-		return $this->js->_genericCallElement('after',$to, $element, $immediatly);
26
+	public function after($to, $element, $immediatly=false) {
27
+		return $this->js->_genericCallElement('after', $to, $element, $immediatly);
28 28
 	}
29 29
 
30 30
 	/**
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
 	 * @param boolean $immediatly defers the execution if set to false
35 35
 	 * @return string
36 36
 	 */
37
-	public function before($to, $element, $immediatly=false){
38
-		return $this->js->_genericCallElement('before',$to, $element, $immediatly);
37
+	public function before($to, $element, $immediatly=false) {
38
+		return $this->js->_genericCallElement('before', $to, $element, $immediatly);
39 39
 	}
40 40
 
41 41
 	/**
@@ -55,8 +55,8 @@  discard block
 block discarded – undo
55 55
 	 * @param string $value
56 56
 	 * @param boolean $immediatly defers the execution if set to false
57 57
 	 */
58
-	public function val($element='this',$value='',$immediatly=false){
59
-		return $this->js->_genericCallValue('val',$element,$value,$immediatly);
58
+	public function val($element='this', $value='', $immediatly=false) {
59
+		return $this->js->_genericCallValue('val', $element, $value, $immediatly);
60 60
 	}
61 61
 
62 62
 	/**
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 	 * @param boolean $immediatly defers the execution if set to false
67 67
 	 */
68 68
 	public function html($element='this', $value='', $immediatly=false) {
69
-		return $this->js->_genericCallValue('html',$element, $value, $immediatly);
69
+		return $this->js->_genericCallValue('html', $element, $value, $immediatly);
70 70
 	}
71 71
 
72 72
 	/**
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 	 * @return string
92 92
 	 */
93 93
 	public function append($to, $element, $immediatly=false) {
94
-		return $this->js->_genericCallElement('append',$to, $element, $immediatly);
94
+		return $this->js->_genericCallElement('append', $to, $element, $immediatly);
95 95
 	}
96 96
 
97 97
 	/**
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 	 * @return string
103 103
 	 */
104 104
 	public function prepend($to, $element, $immediatly=false) {
105
-		return $this->js->_genericCallElement('prepend',$to, $element, $immediatly);
105
+		return $this->js->_genericCallElement('prepend', $to, $element, $immediatly);
106 106
 	}
107 107
 
108 108
 	/**
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 	 * @return string
154 154
 	 */
155 155
 	public function removeClass($element='this', $class='', $immediatly=false) {
156
-		return $this->js->_genericCall('removeClass',$element, $class, $immediatly);
156
+		return $this->js->_genericCall('removeClass', $element, $class, $immediatly);
157 157
 	}
158 158
 
159 159
 	/**
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 	 * @return string
215 215
 	 */
216 216
 	public function toggleClass($element='this', $class='', $immediatly=false) {
217
-		return $this->js->_genericCallValue('toggleClass',$element, $class, $immediatly);
217
+		return $this->js->_genericCallValue('toggleClass', $element, $class, $immediatly);
218 218
 	}
219 219
 
220 220
 	/**
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 		$preventDefault=false;
291 291
 		$immediatly=true;
292 292
 		extract($parameters);
293
-		return $this->js->_doJQueryOn($event, $element, $elementToModify, $jqueryCall, $param, $preventDefault, $stopPropagation, $jsCallback,$immediatly);
293
+		return $this->js->_doJQueryOn($event, $element, $elementToModify, $jqueryCall, $param, $preventDefault, $stopPropagation, $jsCallback, $immediatly);
294 294
 	}
295 295
 
296 296
 	/**
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
 		$preventDefault=false;
318 318
 		$immediatly=true;
319 319
 		extract($parameters);
320
-		$script=$this->js->_execOn($element, $event, $js, $preventDefault, $stopPropagation,$immediatly);
320
+		$script=$this->js->_execOn($element, $event, $js, $preventDefault, $stopPropagation, $immediatly);
321 321
 		return $script;
322 322
 	}
323 323
 }
324 324
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/traits/TextFieldsTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3,11 +3,11 @@
 block discarded – undo
3 3
 namespace Ajax\semantic\html\collections\form;
4 4
 
5 5
 trait TextFieldsTrait {
6
-	public function setPlaceholder($value){
6
+	public function setPlaceholder($value) {
7 7
 		return $this->getField()->setPlaceholder($value);
8 8
 	}
9 9
 
10
-	public function setValue($value){
10
+	public function setValue($value) {
11 11
 		return $this->getField()->setValue($value);
12 12
 	}
13 13
 }
14 14
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/JsUtils.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
  * JsUtils Class : Phalcon service to be injected
26 26
  */
27 27
 abstract class _JsUtils implements InjectionAwareInterface {
28
-	use JsUtilsEventsTrait,JsUtilsActionsTrait,JsUtilsAjaxTrait;
28
+	use JsUtilsEventsTrait, JsUtilsActionsTrait, JsUtilsAjaxTrait;
29 29
 
30 30
 	protected $_di;
31 31
 	protected $js;
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
 	protected function _setDi($di) {
56 56
 		$this->_di=$di;
57
-		if ($this->js!=null&&$di!=null)
57
+		if ($this->js!=null && $di!=null)
58 58
 			$this->js->setDi($di);
59 59
 	}
60 60
 
@@ -147,18 +147,18 @@  discard block
 block discarded – undo
147 147
 
148 148
 
149 149
 	public function __construct($params=array()) {
150
-		$defaults=array (
150
+		$defaults=array(
151 151
 				'driver' => 'Jquery',
152 152
 				'debug' => true
153 153
 		);
154
-		foreach ( $defaults as $key => $val ) {
155
-			if (isset($params[$key])&&$params[$key]!=="") {
154
+		foreach ($defaults as $key => $val) {
155
+			if (isset($params[$key]) && $params[$key]!=="") {
156 156
 				$defaults[$key]=$params[$key];
157 157
 			}
158 158
 		}
159 159
 		extract($defaults);
160 160
 		$this->js=new Jquery($defaults);
161
-		$this->cdns=array ();
161
+		$this->cdns=array();
162 162
 	}
163 163
 
164 164
 	public function addToCompile($jsScript) {
@@ -196,11 +196,11 @@  discard block
 block discarded – undo
196 196
 	 */
197 197
 	public function compile($view=NULL, $view_var='script_foot', $script_tags=TRUE) {
198 198
 		$bs=$this->_bootstrap;
199
-		if (isset($bs)&&isset($view)) {
199
+		if (isset($bs) && isset($view)) {
200 200
 			$bs->compileHtml($this, $view);
201 201
 		}
202 202
 		$sem=$this->_semantic;
203
-		if (isset($sem)&&isset($view)) {
203
+		if (isset($sem) && isset($view)) {
204 204
 			$sem->compileHtml($this, $view);
205 205
 		}
206 206
 		return $this->js->_compile($view, $view_var, $script_tags);
@@ -280,27 +280,27 @@  discard block
 block discarded – undo
280 280
 				$json_result=$result->result_array();
281 281
 			} elseif (is_array($result)) {
282 282
 				$json_result=$result;
283
-			} else {
283
+			}else {
284 284
 				return $this->_prep_args($result);
285 285
 			}
286
-		} else {
286
+		}else {
287 287
 			return 'null';
288 288
 		}
289 289
 		return $this->_create_json($json_result, $match_array_type);
290 290
 	}
291 291
 
292 292
 	private function _create_json($json_result, $match_array_type) {
293
-		$json=array ();
293
+		$json=array();
294 294
 		$_is_assoc=TRUE;
295
-		if (!is_array($json_result)&&empty($json_result)) {
295
+		if (!is_array($json_result) && empty($json_result)) {
296 296
 			show_error("Generate JSON Failed - Illegal key, value pair.");
297 297
 		} elseif ($match_array_type) {
298 298
 			$_is_assoc=$this->_is_associative_array($json_result);
299 299
 		}
300
-		foreach ( $json_result as $k => $v ) {
300
+		foreach ($json_result as $k => $v) {
301 301
 			if ($_is_assoc) {
302 302
 				$json[]=$this->_prep_args($k, TRUE).':'.$this->generate_json($v, $match_array_type);
303
-			} else {
303
+			}else {
304 304
 				$json[]=$this->generate_json($v, $match_array_type);
305 305
 			}
306 306
 		}
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 	 * @return type
316 316
 	 */
317 317
 	public function _is_associative_array($arr) {
318
-		foreach ( array_keys($arr) as $key => $val ) {
318
+		foreach (array_keys($arr) as $key => $val) {
319 319
 			if ($key!==$val) {
320 320
 				return TRUE;
321 321
 			}
@@ -334,11 +334,11 @@  discard block
 block discarded – undo
334 334
 			return 'null';
335 335
 		} elseif (is_bool($result)) {
336 336
 			return ($result===TRUE) ? 'true' : 'false';
337
-		} elseif (is_string($result)||$is_key) {
338
-			return '"'.str_replace(array (
339
-					'\\',"\t","\n","\r",'"','/'
340
-			), array (
341
-					'\\\\','\\t','\\n',"\\r",'\"','\/'
337
+		} elseif (is_string($result) || $is_key) {
338
+			return '"'.str_replace(array(
339
+					'\\', "\t", "\n", "\r", '"', '/'
340
+			), array(
341
+					'\\\\', '\\t', '\\n', "\\r", '\"', '\/'
342 342
 			), $result).'"';
343 343
 		} elseif (is_scalar($result)) {
344 344
 			return $result;
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
 
352 352
 	public function setCDNs($cdns) {
353 353
 		if (is_array($cdns)===false) {
354
-			$cdns=array (
354
+			$cdns=array(
355 355
 					$cdns
356 356
 			);
357 357
 		}
@@ -363,9 +363,9 @@  discard block
 block discarded – undo
363 363
 		$hasJQueryUI=false;
364 364
 		$hasBootstrap=false;
365 365
 		$hasSemantic=false;
366
-		$result=array ();
367
-		foreach ( $this->cdns as $cdn ) {
368
-			switch(get_class($cdn)) {
366
+		$result=array();
367
+		foreach ($this->cdns as $cdn) {
368
+			switch (get_class($cdn)) {
369 369
 				case "Ajax\lib\CDNJQuery":
370 370
 					$hasJQuery=true;
371 371
 					$result[0]=$cdn;
@@ -375,11 +375,11 @@  discard block
 block discarded – undo
375 375
 					$result[1]=$cdn;
376 376
 					break;
377 377
 				case "Ajax\lib\CDNCoreCss":
378
-					if($cdn->getFramework()==="Bootstrap")
378
+					if ($cdn->getFramework()==="Bootstrap")
379 379
 						$hasBootstrap=true;
380
-					elseif($cdn->getFramework()==="Semantic")
380
+					elseif ($cdn->getFramework()==="Semantic")
381 381
 						$hasSemantic=true;
382
-					if($hasSemantic || $hasBootstrap)
382
+					if ($hasSemantic || $hasBootstrap)
383 383
 						$result[2]=$cdn;
384 384
 					break;
385 385
 			}
@@ -387,14 +387,14 @@  discard block
 block discarded – undo
387 387
 		if ($hasJQuery===false) {
388 388
 			$result[0]=new CDNJQuery("x");
389 389
 		}
390
-		if ($hasJQueryUI===false&&isset($this->_ui)) {
390
+		if ($hasJQueryUI===false && isset($this->_ui)) {
391 391
 			$result[1]=new CDNGuiGen("x", $template);
392 392
 		}
393
-		if ($hasBootstrap===false&&isset($this->_bootstrap)) {
394
-			$result[2]=new CDNCoreCss("Bootstrap","x");
393
+		if ($hasBootstrap===false && isset($this->_bootstrap)) {
394
+			$result[2]=new CDNCoreCss("Bootstrap", "x");
395 395
 		}
396
-		if ($hasSemantic===false&&isset($this->_semantic)) {
397
-			$result[2]=new CDNCoreCss("Semantic","x");
396
+		if ($hasSemantic===false && isset($this->_semantic)) {
397
+			$result[2]=new CDNCoreCss("Semantic", "x");
398 398
 		}
399 399
 		ksort($result);
400 400
 		return implode("\n", $result);
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
 			$this->_setDi($di);
408 408
 		}
409 409
 	}
410
-} else {
410
+}else {
411 411
 	class JsUtils extends _JsUtils {
412 412
 
413 413
 		public function setDi(DiInterface $di) {
Please login to merge, or discard this patch.