Completed
Push — master ( 525ea5...e3c757 )
by Jean-Christophe
03:48
created
Ajax/common/html/HtmlCollection.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 			foreach ($items as $k=>$v){
18 18
 				$this->addItem([$k,$v]);
19 19
 			}
20
-		}else{
20
+		} else{
21 21
 			foreach ($items as $item){
22 22
 				$this->addItem($item);
23 23
 			}
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
 	 * @return \Ajax\common\html\HtmlDoubleElement
54 54
 	 */
55 55
 	public function getItem($index) {
56
-		if (is_int($index))
57
-			return $this->content[$index];
58
-		else {
56
+		if (is_int($index)) {
57
+					return $this->content[$index];
58
+		} else {
59 59
 			$elm=$this->getElementById($index, $this->content);
60 60
 			return $elm;
61 61
 		}
Please login to merge, or discard this patch.
Ajax/semantic/html/base/traits/IconTrait.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 			$this->addToPropertyCtrl("class", $direction." icon", Direction::getConstantValues("icon"));
17 17
 			$this->addContent($iconO,false);
18 18
 			$this->_hasIcon=true;
19
-		}else{
19
+		} else{
20 20
 			$iconO=$this->getIcon();
21 21
 			$iconO->setIcon($icon);
22 22
 			$this->addToPropertyCtrl("class", $direction." icon", Direction::getConstantValues("icon"));
@@ -27,8 +27,9 @@  discard block
 block discarded – undo
27 27
 	public function getIcon(){
28 28
 		if(\is_array($this->content)){
29 29
 			foreach ($this->content as $item){
30
-				if($item instanceof HtmlIcon)
31
-					return $item;
30
+				if($item instanceof HtmlIcon) {
31
+									return $item;
32
+				}
32 33
 			}
33 34
 		}
34 35
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/base/HtmlSemNavElement.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -96,10 +96,11 @@
 block discarded – undo
96 96
 
97 97
 	protected function setDivider($divider,$index){
98 98
 		if(isset($index)){
99
-			if(\is_array($this->_contentSeparator)===false)
100
-				$this->_contentSeparator=array_fill (0, $this->count()-1,$this->_contentSeparator);
99
+			if(\is_array($this->_contentSeparator)===false) {
100
+							$this->_contentSeparator=array_fill (0, $this->count()-1,$this->_contentSeparator);
101
+			}
101 102
 			$this->_contentSeparator[$index]=$divider;
102
-		}else{
103
+		} else{
103 104
 			$this->_contentSeparator=$divider;
104 105
 		}
105 106
 		return $this;
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlAccordion.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,9 @@
 block discarded – undo
34 34
 	 * @see BaseHtml::run()
35 35
 	 */
36 36
 	public function run(JsUtils $js) {
37
-		if(isset($this->_bsComponent)===false)
38
-			$this->_bsComponent=$js->semantic()->accordion("#".$this->identifier,$this->params);
37
+		if(isset($this->_bsComponent)===false) {
38
+					$this->_bsComponent=$js->semantic()->accordion("#".$this->identifier,$this->params);
39
+		}
39 40
 			$this->addEventsOnRun($js);
40 41
 			return $this->_bsComponent;
41 42
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlAccordionItem.php 1 patch
Braces   +8 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,8 +31,9 @@  discard block
 block discarded – undo
31 31
 	protected function createTitleElement(){
32 32
 		$element=new HtmlSemDoubleElement("title-".$this->identifier,"div","title");
33 33
 		$element->setContent(array(new HtmlIcon("", $this->_icon),$this->_title));
34
-		if($this->_active===true)
35
-			$element->addToProperty("class", "active");
34
+		if($this->_active===true) {
35
+					$element->addToProperty("class", "active");
36
+		}
36 37
 		return $element;
37 38
 	}
38 39
 
@@ -43,10 +44,11 @@  discard block
 block discarded – undo
43 44
 
44 45
 	public function setActive($value=true){
45 46
 		$this->_active=$value;
46
-		if($value===true)
47
-			$this->addToPropertyCtrl("class", "active", array("active"));
48
-		else
49
-			$this->removePropertyValue("class", "active");
47
+		if($value===true) {
48
+					$this->addToPropertyCtrl("class", "active", array("active"));
49
+		} else {
50
+					$this->removePropertyValue("class", "active");
51
+		}
50 52
 		return $this;
51 53
 	}
52 54
 }
53 55
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/menus/HtmlAccordionMenu.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -34,8 +34,9 @@
 block discarded – undo
34 34
 	 * @see BaseHtml::run()
35 35
 	 */
36 36
 	public function run(JsUtils $js) {
37
-		if(isset($this->_bsComponent)===false)
38
-			$this->_bsComponent=$js->semantic()->accordion("#".$this->identifier,$this->params);
37
+		if(isset($this->_bsComponent)===false) {
38
+					$this->_bsComponent=$js->semantic()->accordion("#".$this->identifier,$this->params);
39
+		}
39 40
 			$this->addEventsOnRun($js);
40 41
 			return $this->_bsComponent;
41 42
 	}
Please login to merge, or discard this patch.
Ajax/common/html/html5/HtmlTextarea.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,18 +11,21 @@
 block discarded – undo
11 11
 		parent::__construct($identifier, "textarea");
12 12
 		$this->setValue($value);
13 13
 		$this->setPlaceholder($placeholder);
14
-		if(isset($rows))
15
-			$this->setRows($rows);
14
+		if(isset($rows)) {
15
+					$this->setRows($rows);
16
+		}
16 17
 	}
17 18
 	public function setValue($value) {
18
-		if(isset($value))
19
-			$this->setContent($value);
19
+		if(isset($value)) {
20
+					$this->setContent($value);
21
+		}
20 22
 		return $this;
21 23
 	}
22 24
 
23 25
 	public function setPlaceholder($value){
24
-		if(JString::isNotNull($value))
25
-			$this->setProperty("placeholder", $value);
26
+		if(JString::isNotNull($value)) {
27
+					$this->setProperty("placeholder", $value);
28
+		}
26 29
 		return $this;
27 30
 	}
28 31
 
Please login to merge, or discard this patch.
Ajax/common/traits/JqueryActionsTrait.php 1 patch
Braces   +51 added lines, -34 removed lines patch added patch discarded remove patch
@@ -16,10 +16,12 @@  discard block
 block discarded – undo
16 16
 		if (isset($value)) {
17 17
 			$value=$this->_prep_value($value);
18 18
 			$str="$({$element}).attr(\"$attributeName\",{$value});";
19
-		} else
20
-			$str="$({$element}).attr(\"$attributeName\");";
21
-			if ($immediatly)
22
-				$this->jquery_code_for_compile[]=$str;
19
+		} else {
20
+					$str="$({$element}).attr(\"$attributeName\");";
21
+		}
22
+			if ($immediatly) {
23
+							$this->jquery_code_for_compile[]=$str;
24
+			}
23 25
 				return $str;
24 26
 	}
25 27
 
@@ -34,8 +36,9 @@  discard block
 block discarded – undo
34 36
 		$element=$this->_prep_element($element);
35 37
 		$value=$this->_prep_value($value);
36 38
 		$str="$({$element}).after({$value});";
37
-		if ($immediatly)
38
-			$this->jquery_code_for_compile[]=$str;
39
+		if ($immediatly) {
40
+					$this->jquery_code_for_compile[]=$str;
41
+		}
39 42
 			return $str;
40 43
 	}
41 44
 
@@ -71,8 +74,9 @@  discard block
 block discarded – undo
71 74
 
72 75
 		$str="$({$element}).animate({\n$animations\n\t\t}".$speed.$extra.");";
73 76
 
74
-		if ($immediatly)
75
-			$this->jquery_code_for_compile[]=$str;
77
+		if ($immediatly) {
78
+					$this->jquery_code_for_compile[]=$str;
79
+		}
76 80
 			return $str;
77 81
 	}
78 82
 
@@ -97,8 +101,9 @@  discard block
 block discarded – undo
97 101
 
98 102
 		$str="$({$element}).fadeIn({$speed}{$callback});";
99 103
 
100
-		if ($immediatly)
101
-			$this->jquery_code_for_compile[]=$str;
104
+		if ($immediatly) {
105
+					$this->jquery_code_for_compile[]=$str;
106
+		}
102 107
 			return $str;
103 108
 	}
104 109
 
@@ -123,8 +128,9 @@  discard block
 block discarded – undo
123 128
 
124 129
 		$str="$({$element}).fadeOut({$speed}{$callback});";
125 130
 
126
-		if ($immediatly)
127
-			$this->jquery_code_for_compile[]=$str;
131
+		if ($immediatly) {
132
+					$this->jquery_code_for_compile[]=$str;
133
+		}
128 134
 			return $str;
129 135
 	}
130 136
 
@@ -149,8 +155,9 @@  discard block
 block discarded – undo
149 155
 
150 156
 		$str="$({$element}).hide({$speed}{$callback});";
151 157
 
152
-		if ($immediatly)
153
-			$this->jquery_code_for_compile[]=$str;
158
+		if ($immediatly) {
159
+					$this->jquery_code_for_compile[]=$str;
160
+		}
154 161
 			return $str;
155 162
 	}
156 163
 
@@ -177,8 +184,9 @@  discard block
 block discarded – undo
177 184
 
178 185
 		$str="$({$element}).slideUp({$speed}{$callback});";
179 186
 
180
-		if ($immediatly)
181
-			$this->jquery_code_for_compile[]=$str;
187
+		if ($immediatly) {
188
+					$this->jquery_code_for_compile[]=$str;
189
+		}
182 190
 			return $str;
183 191
 	}
184 192
 
@@ -203,8 +211,9 @@  discard block
 block discarded – undo
203 211
 
204 212
 		$str="$({$element}).slideDown({$speed}{$callback});";
205 213
 
206
-		if ($immediatly)
207
-			$this->jquery_code_for_compile[]=$str;
214
+		if ($immediatly) {
215
+					$this->jquery_code_for_compile[]=$str;
216
+		}
208 217
 			return $str;
209 218
 	}
210 219
 
@@ -229,8 +238,9 @@  discard block
 block discarded – undo
229 238
 
230 239
 		$str="$({$element}).slideToggle({$speed}{$callback});";
231 240
 
232
-		if ($immediatly)
233
-			$this->jquery_code_for_compile[]=$str;
241
+		if ($immediatly) {
242
+					$this->jquery_code_for_compile[]=$str;
243
+		}
234 244
 			return $str;
235 245
 	}
236 246
 
@@ -247,8 +257,9 @@  discard block
 block discarded – undo
247 257
 		$element=$this->_prep_element($element);
248 258
 		$str="$({$element}).toggle();";
249 259
 
250
-		if ($immediatly)
251
-			$this->jquery_code_for_compile[]=$str;
260
+		if ($immediatly) {
261
+					$this->jquery_code_for_compile[]=$str;
262
+		}
252 263
 			return $str;
253 264
 	}
254 265
 
@@ -264,8 +275,9 @@  discard block
 block discarded – undo
264 275
 		$element=$this->_prep_element($element);
265 276
 		$str="$({$element}).trigger(\"$event\");";
266 277
 
267
-		if ($immediatly)
268
-			$this->jquery_code_for_compile[]=$str;
278
+		if ($immediatly) {
279
+					$this->jquery_code_for_compile[]=$str;
280
+		}
269 281
 			return $str;
270 282
 	}
271 283
 
@@ -290,8 +302,9 @@  discard block
 block discarded – undo
290 302
 
291 303
 		$str="$({$element}).show({$speed}{$callback});";
292 304
 
293
-		if ($immediatly)
294
-			$this->jquery_code_for_compile[]=$str;
305
+		if ($immediatly) {
306
+					$this->jquery_code_for_compile[]=$str;
307
+		}
295 308
 			return $str;
296 309
 	}
297 310
 
@@ -309,8 +322,9 @@  discard block
 block discarded – undo
309 322
 			$str.="else{".$jsCodeIfFalse."}";
310 323
 		}
311 324
 
312
-		if ($immediatly)
313
-			$this->jquery_code_for_compile[]=$str;
325
+		if ($immediatly) {
326
+					$this->jquery_code_for_compile[]=$str;
327
+		}
314 328
 			return $str;
315 329
 	}
316 330
 
@@ -327,11 +341,13 @@  discard block
 block discarded – undo
327 341
 	public function _doJQuery($element, $jqueryCall, $param="", $jsCallback="", $immediatly=false) {
328 342
 		$param=$this->_prep_value($param);
329 343
 		$callback="";
330
-		if ($jsCallback!="")
331
-			$callback=", function(event){\n{$jsCallback}\n}";
344
+		if ($jsCallback!="") {
345
+					$callback=", function(event){\n{$jsCallback}\n}";
346
+		}
332 347
 			$script="$(".$this->_prep_element($element).").".$jqueryCall."(".$param.$callback.");\n";
333
-			if ($immediatly)
334
-				$this->jquery_code_for_compile[]=$script;
348
+			if ($immediatly) {
349
+							$this->jquery_code_for_compile[]=$script;
350
+			}
335 351
 				return $script;
336 352
 	}
337 353
 
@@ -360,8 +376,9 @@  discard block
 block discarded – undo
360 376
 	 */
361 377
 	public function _exec($js, $immediatly=false) {
362 378
 		$script=$js."\n";
363
-		if ($immediatly)
364
-			$this->jquery_code_for_compile[]=$script;
379
+		if ($immediatly) {
380
+					$this->jquery_code_for_compile[]=$script;
381
+		}
365 382
 			return $script;
366 383
 	}
367 384
 
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/traits/FieldsTrait.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,9 @@
 block discarded – undo
13 13
 		if(\is_array($value)){
14 14
 			$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 15
 			return $itemO;
16
-		}else
17
-			return new HtmlFormInput($value);
16
+		} else {
17
+					return new HtmlFormInput($value);
18
+		}
18 19
 	}
19 20
 
20 21
 	public function addInputs($inputs,$fieldslabel=null){
Please login to merge, or discard this patch.