Completed
Push — master ( db460e...6ada0e )
by Jean-Christophe
04:52
created
Ajax/semantic/html/base/HtmlSemDoubleElement.php 1 patch
Braces   +15 added lines, -10 removed lines patch added patch discarded remove patch
@@ -31,8 +31,9 @@  discard block
 block discarded – undo
31 31
 	}
32 32
 
33 33
 	public function setPopupAttributes($variation=NULL, $popupEvent=NULL) {
34
-		if (isset($this->_popup))
35
-			$this->_popup->setAttributes($variation, $popupEvent);
34
+		if (isset($this->_popup)) {
35
+					$this->_popup->setAttributes($variation, $popupEvent);
36
+		}
36 37
 	}
37 38
 
38 39
 	public function addPopup($title="", $content="", $variation=NULL, $params=array()) {
@@ -59,8 +60,9 @@  discard block
 block discarded – undo
59 60
 		$labelO=$label;
60 61
 		if (\is_object($label) === false) {
61 62
 			$labelO=new HtmlLabel("label-" . $this->identifier, $label);
62
-			if (isset($icon))
63
-				$labelO->addIcon($icon);
63
+			if (isset($icon)) {
64
+							$labelO->addIcon($icon);
65
+			}
64 66
 		} else {
65 67
 			$labelO->addToPropertyCtrl("class", "label", array ("label" ));
66 68
 		}
@@ -79,21 +81,24 @@  discard block
 block discarded – undo
79 81
 	 * @return \Ajax\semantic\html\base\HtmlSemDoubleElement
80 82
 	 */
81 83
 	public function asLink($href=NULL) {
82
-		if (isset($href))
83
-			$this->setProperty("href", $href);
84
+		if (isset($href)) {
85
+					$this->setProperty("href", $href);
86
+		}
84 87
 		return $this->setTagName("a");
85 88
 	}
86 89
 
87 90
 	public function jsShowDimmer($show=true) {
88 91
 		$status="hide";
89
-		if ($show === true)
90
-			$status="show";
92
+		if ($show === true) {
93
+					$status="show";
94
+		}
91 95
 		return '$("#.' . $this->identifier . ').dimmer("' . $status . '");';
92 96
 	}
93 97
 
94 98
 	public function compile(JsUtils $js=NULL, $view=NULL) {
95
-		if (isset($this->_popup))
96
-			$this->_popup->compile();
99
+		if (isset($this->_popup)) {
100
+					$this->_popup->compile();
101
+		}
97 102
 		return parent::compile($js, $view);
98 103
 	}
99 104
 
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlMenuItem.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 				$title=JArray::getValue($content, "title",1);
19 19
 				$desc=JArray::getValue($content, "description",2);
20 20
 				$status=JArray::getValue($content, "status",3);
21
-			}else{
21
+			} else{
22 22
 				$icon=@$content["icon"];
23 23
 				$title=@$content["title"];
24 24
 				$desc=@$content["description"];
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
 			if(isset($title)===true){
34 34
 				$this->setTitle($title,$desc);
35 35
 			}
36
-		}else{
36
+		} else{
37 37
 			$this->setContent($content);
38 38
 		}
39 39
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlListItem.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 				$icon=@$content[0];
18 18
 				$title=@$content[1];
19 19
 				$desc=@$content[2];
20
-			}else{
20
+			} else{
21 21
 				$icon=@$content["icon"];
22 22
 				$image=@$content["image"];
23 23
 				$title=@$content["title"];
@@ -33,13 +33,13 @@  discard block
 block discarded – undo
33 33
 			}
34 34
 			if(isset($title)===true){
35 35
 				$this->setTitle($title,$desc);
36
-			}elseif (isset($header)===true){
36
+			} elseif (isset($header)===true){
37 37
 				$this->setTitle($header,$desc,"header");
38 38
 			}
39 39
 			if(isset($items)===true){
40 40
 				$this->addList($items);
41 41
 			}
42
-		}else{
42
+		} else{
43 43
 			$this->setContent($content);
44 44
 		}
45 45
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlAbsractItem.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,8 +60,9 @@  discard block
 block discarded – undo
60 60
 
61 61
 	public function asLink($href=NULL,$part=NULL){
62 62
 		$this->setTagName("a");
63
-		if(isset($href))
64
-			$this->setProperty("href", $href);
63
+		if(isset($href)) {
64
+					$this->setProperty("href", $href);
65
+		}
65 66
 		return $this;
66 67
 	}
67 68
 
@@ -72,8 +73,9 @@  discard block
 block discarded – undo
72 73
 	 * @see \Ajax\semantic\html\base\HtmlSemDoubleElement::compile()
73 74
 	 */
74 75
 	public function compile(JsUtils $js=NULL, $view=NULL) {
75
-		if(\is_array($this->content))
76
-			$this->content=JArray::sortAssociative($this->content, [ "icon","image","content" ]);
76
+		if(\is_array($this->content)) {
77
+					$this->content=JArray::sortAssociative($this->content, [ "icon","image","content" ]);
78
+		}
77 79
 		return parent::compile($js, $view);
78 80
 	}
79 81
 }
80 82
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/php/phalcon/JsUtils.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -56,8 +56,9 @@
 block discarded – undo
56 56
 		if(\sizeof($params)>0 || \strtolower($action)!="index" ){
57 57
 			$items[]=$action;
58 58
 			foreach ($params as $p){
59
-				if(\is_object($p)===false)
60
-					$items[]=$p;
59
+				if(\is_object($p)===false) {
60
+									$items[]=$p;
61
+				}
61 62
 			}
62 63
 		}
63 64
 		return $items;
Please login to merge, or discard this patch.
Ajax/Jquery.php 1 patch
Braces   +23 added lines, -15 removed lines patch added patch discarded remove patch
@@ -147,10 +147,12 @@  discard block
 block discarded – undo
147 147
 		if (isset($param)) {
148 148
 			$param=$this->_prep_value($param);
149 149
 			$str="$({$element}).{$jQueryCall}({$param});";
150
-		} else
151
-			$str="$({$element}).{$jQueryCall}();";
152
-			if ($immediatly)
153
-				$this->jquery_code_for_compile[]=$str;
150
+		} else {
151
+					$str="$({$element}).{$jQueryCall}();";
152
+		}
153
+			if ($immediatly) {
154
+							$this->jquery_code_for_compile[]=$str;
155
+			}
154 156
 			return $str;
155 157
 	}
156 158
 	/**
@@ -165,8 +167,9 @@  discard block
 block discarded – undo
165 167
 		$to=$this->_prep_element($to);
166 168
 		$element=$this->_prep_element($element);
167 169
 		$str="$({$to}).{$jQueryCall}({$element});";
168
-		if ($immediatly)
169
-			$this->jquery_code_for_compile[]=$str;
170
+		if ($immediatly) {
171
+					$this->jquery_code_for_compile[]=$str;
172
+		}
170 173
 			return $str;
171 174
 	}
172 175
 
@@ -222,12 +225,14 @@  discard block
 block discarded – undo
222 225
 		if ($stopPropagation===true) {
223 226
 			$js="event.stopPropagation();\n".$js;
224 227
 		}
225
-		if (array_search($event, $this->jquery_events)===false)
226
-			$event="\n\t$(".$this->_prep_element($element).").bind('{$event}',function(event){\n\t\t{$js}\n\t});\n";
227
-		else
228
-			$event="\n\t$(".$this->_prep_element($element).").{$event}(function(event){\n\t\t{$js}\n\t});\n";
229
-		if($immediatly)
230
-			$this->jquery_code_for_compile[]=$event;
228
+		if (array_search($event, $this->jquery_events)===false) {
229
+					$event="\n\t$(".$this->_prep_element($element).").bind('{$event}',function(event){\n\t\t{$js}\n\t});\n";
230
+		} else {
231
+					$event="\n\t$(".$this->_prep_element($element).").{$event}(function(event){\n\t\t{$js}\n\t});\n";
232
+		}
233
+		if($immediatly) {
234
+					$this->jquery_code_for_compile[]=$event;
235
+		}
231 236
 		return $event;
232 237
 	}
233 238
 
@@ -286,8 +291,9 @@  discard block
 block discarded – undo
286 291
 		}
287 292
 		$output=($script_tags===FALSE) ? $script : $this->inline($script);
288 293
 
289
-		if ($view!=NULL)
290
-			$this->jsUtils->createScriptVariable($view,$view_var, $output);
294
+		if ($view!=NULL) {
295
+					$this->jsUtils->createScriptVariable($view,$view_var, $output);
296
+		}
291 297
 		return $output;
292 298
 	}
293 299
 
@@ -354,7 +360,9 @@  discard block
 block discarded – undo
354 360
 	}
355 361
 
356 362
 	private function minify($input) {
357
-	if(trim($input) === "") return $input;
363
+	if(trim($input) === "") {
364
+		return $input;
365
+	}
358 366
 	return preg_replace(
359 367
 			array(
360 368
 					// Remove comment(s)
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/HtmlBreadcrumb.php 1 patch
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -165,8 +165,9 @@  discard block
 block discarded – undo
165 165
 
166 166
 	public function _ajaxOn($operation, $event, $url, $responseElement="", $parameters=array()) {
167 167
 		foreach ( $this->content as $element ) {
168
-			if ($element->getProperty($this->attr) != NULL)
169
-				$element->_ajaxOn($operation, $event, $url, $responseElement, $parameters);
168
+			if ($element->getProperty($this->attr) != NULL) {
169
+							$element->_ajaxOn($operation, $event, $url, $responseElement, $parameters);
170
+			}
170 171
 		}
171 172
 		return $this;
172 173
 	}
@@ -180,9 +181,9 @@  discard block
 block discarded – undo
180 181
 	protected function createItem($value) {
181 182
 		$count=$this->count();
182 183
 		$itemO=new HtmlSemDoubleElement("item-" . $this->identifier . "-" . $count, "a", "section");
183
-		if (\is_array($value))
184
-			$itemO->fromArray($value);
185
-		else {
184
+		if (\is_array($value)) {
185
+					$itemO->fromArray($value);
186
+		} else {
186 187
 			$itemO->setContent($value);
187 188
 		}
188 189
 		return $itemO;
Please login to merge, or discard this patch.