Completed
Push — master ( 7abd10...04d259 )
by Jean-Christophe
03:18
created
Ajax/semantic/html/content/HtmlStepItem.php 2 patches
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -8,52 +8,52 @@
 block discarded – undo
8 8
 class HtmlStepItem extends HtmlAbsractItem {
9 9
 
10 10
 	public function __construct($identifier, $content) {
11
-		parent::__construct($identifier,"step",$content);
11
+		parent::__construct($identifier, "step", $content);
12 12
 	}
13
-	protected function initContent($content){
14
-		if(\is_array($content)){
15
-			if(JArray::isAssociative($content)===false){
13
+	protected function initContent($content) {
14
+		if (\is_array($content)) {
15
+			if (JArray::isAssociative($content)===false) {
16 16
 				$icon=@$content[0];
17 17
 				$title=@$content[1];
18 18
 				$desc=@$content[2];
19 19
 				$status=@$content[3];
20
-			}else{
20
+			} else {
21 21
 				$icon=@$content["icon"];
22 22
 				$title=@$content["title"];
23 23
 				$desc=@$content["description"];
24 24
 				$status=@$content["status"];
25 25
 			}
26
-			if(isset($icon)){
26
+			if (isset($icon)) {
27 27
 				$this->setIcon($icon);
28 28
 			}
29
-			if(isset($status)){
29
+			if (isset($status)) {
30 30
 				$this->setStatus($status);
31 31
 			}
32
-			if(isset($title)){
33
-				$this->setTitle($title,$desc);
32
+			if (isset($title)) {
33
+				$this->setTitle($title, $desc);
34 34
 			}
35
-		}else{
35
+		} else {
36 36
 			$this->setContent($content);
37 37
 		}
38 38
 	}
39 39
 
40
-	public function setActive($value=true){
41
-		if($value)
40
+	public function setActive($value=true) {
41
+		if ($value)
42 42
 			$this->setStatus(StepStatus::ACTIVE);
43 43
 		else
44 44
 			$this->setStatus(StepStatus::NONE);
45 45
 		return $this;
46 46
 	}
47 47
 
48
-	public function setCompleted(){
48
+	public function setCompleted() {
49 49
 		return $this->setStatus(StepStatus::COMPLETED);
50 50
 	}
51 51
 
52
-	public function setStatus($status){
52
+	public function setStatus($status) {
53 53
 		return $this->addToPropertyCtrl("class", $status, StepStatus::getConstants());
54 54
 	}
55 55
 
56
-	public function removeStatus(){
56
+	public function removeStatus() {
57 57
 		$this->removePropertyValues("class", StepStatus::getConstants());
58 58
 	}
59 59
 }
60 60
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +7 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 				$title=@$content[1];
18 18
 				$desc=@$content[2];
19 19
 				$status=@$content[3];
20
-			}else{
20
+			} else{
21 21
 				$icon=@$content["icon"];
22 22
 				$title=@$content["title"];
23 23
 				$desc=@$content["description"];
@@ -32,16 +32,17 @@  discard block
 block discarded – undo
32 32
 			if(isset($title)){
33 33
 				$this->setTitle($title,$desc);
34 34
 			}
35
-		}else{
35
+		} else{
36 36
 			$this->setContent($content);
37 37
 		}
38 38
 	}
39 39
 
40 40
 	public function setActive($value=true){
41
-		if($value)
42
-			$this->setStatus(StepStatus::ACTIVE);
43
-		else
44
-			$this->setStatus(StepStatus::NONE);
41
+		if($value) {
42
+					$this->setStatus(StepStatus::ACTIVE);
43
+		} else {
44
+					$this->setStatus(StepStatus::NONE);
45
+		}
45 46
 		return $this;
46 47
 	}
47 48
 
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlMenuItem.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -9,27 +9,27 @@
 block discarded – undo
9 9
 class HtmlMenuItem extends HtmlSemDoubleElement {
10 10
 	use MenuItemTrait;
11 11
 	public function __construct($identifier, $content) {
12
-		parent::__construct($identifier,"div","item",$content);
12
+		parent::__construct($identifier, "div", "item", $content);
13 13
 	}
14 14
 
15
-	protected function initContent($content){
16
-		if(\is_array($content)){
17
-			if(JArray::isAssociative($content)===false){
15
+	protected function initContent($content) {
16
+		if (\is_array($content)) {
17
+			if (JArray::isAssociative($content)===false) {
18 18
 				$icon=@$content[0];
19 19
 				$title=@$content[1];
20 20
 				$desc=@$content[2];
21
-			}else{
21
+			} else {
22 22
 				$icon=@$content["icon"];
23 23
 				$title=@$content["title"];
24 24
 				$desc=@$content["description"];
25 25
 			}
26
-			if(isset($icon)){
26
+			if (isset($icon)) {
27 27
 				$this->addIcon($icon);
28 28
 			}
29
-			if(isset($title)){
30
-				$this->setTitle($title,$desc);
29
+			if (isset($title)) {
30
+				$this->setTitle($title, $desc);
31 31
 			}
32
-		}else{
32
+		} else {
33 33
 			$this->setContent($content);
34 34
 		}
35 35
 	}
Please login to merge, or discard this 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
 				$icon=@$content[0];
19 19
 				$title=@$content[1];
20 20
 				$desc=@$content[2];
21
-			}else{
21
+			} else{
22 22
 				$icon=@$content["icon"];
23 23
 				$title=@$content["title"];
24 24
 				$desc=@$content["description"];
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 			if(isset($title)){
30 30
 				$this->setTitle($title,$desc);
31 31
 			}
32
-		}else{
32
+		} else{
33 33
 			$this->setContent($content);
34 34
 		}
35 35
 	}
Please login to merge, or discard this patch.
Ajax/Jquery.php 2 patches
Braces   +20 added lines, -13 removed lines patch added patch discarded remove patch
@@ -136,10 +136,12 @@  discard block
 block discarded – undo
136 136
 		if (isset($param)) {
137 137
 			$param=Javascript::prep_value($param);
138 138
 			$str="$({$element}).{$jQueryCall}({$param});";
139
-		} else
140
-			$str="$({$element}).{$jQueryCall}();";
141
-			if ($immediatly)
142
-				$this->jquery_code_for_compile[]=$str;
139
+		} else {
140
+					$str="$({$element}).{$jQueryCall}();";
141
+		}
142
+			if ($immediatly) {
143
+							$this->jquery_code_for_compile[]=$str;
144
+			}
143 145
 			return $str;
144 146
 	}
145 147
 	/**
@@ -154,8 +156,9 @@  discard block
 block discarded – undo
154 156
 		$to=Javascript::prep_element($to);
155 157
 		$element=Javascript::prep_element($element);
156 158
 		$str="$({$to}).{$jQueryCall}({$element});";
157
-		if ($immediatly)
158
-			$this->jquery_code_for_compile[]=$str;
159
+		if ($immediatly) {
160
+					$this->jquery_code_for_compile[]=$str;
161
+		}
159 162
 			return $str;
160 163
 	}
161 164
 
@@ -211,12 +214,14 @@  discard block
 block discarded – undo
211 214
 		if ($stopPropagation===true) {
212 215
 			$js="event.stopPropagation();\n".$js;
213 216
 		}
214
-		if (array_search($event, $this->jquery_events)===false)
215
-			$event="\n\t$(".Javascript::prep_element($element).").bind('{$event}',function(event){\n\t\t{$js}\n\t});\n";
216
-		else
217
-			$event="\n\t$(".Javascript::prep_element($element).").{$event}(function(event){\n\t\t{$js}\n\t});\n";
218
-		if($immediatly)
219
-			$this->jquery_code_for_compile[]=$event;
217
+		if (array_search($event, $this->jquery_events)===false) {
218
+					$event="\n\t$(".Javascript::prep_element($element).").bind('{$event}',function(event){\n\t\t{$js}\n\t});\n";
219
+		} else {
220
+					$event="\n\t$(".Javascript::prep_element($element).").{$event}(function(event){\n\t\t{$js}\n\t});\n";
221
+		}
222
+		if($immediatly) {
223
+					$this->jquery_code_for_compile[]=$event;
224
+		}
220 225
 		return $event;
221 226
 	}
222 227
 
@@ -296,7 +301,9 @@  discard block
 block discarded – undo
296 301
 	}
297 302
 
298 303
 	private function minify($input) {
299
-	if(trim($input) === "") return $input;
304
+	if(trim($input) === "") {
305
+		return $input;
306
+	}
300 307
 	return preg_replace(
301 308
 			array(
302 309
 					// Remove comment(s)
Please login to merge, or discard this patch.
Spacing   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -15,16 +15,16 @@  discard block
 block discarded – undo
15 15
  * @license Apache 2 http://www.apache.org/licenses/
16 16
  **/
17 17
 class Jquery {
18
-	use JqueryEventsTrait,JqueryAjaxTrait,JqueryActionsTrait;
18
+	use JqueryEventsTrait, JqueryAjaxTrait, JqueryActionsTrait;
19 19
 	protected $_ui;
20 20
 	protected $_bootstrap;
21 21
 	protected $_semantic;
22
-	protected $jquery_code_for_compile=array ();
22
+	protected $jquery_code_for_compile=array();
23 23
 	protected $jsUtils;
24 24
 	protected $params;
25 25
 
26
-	protected $jquery_events=array (
27
-			"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"
26
+	protected $jquery_events=array(
27
+			"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"
28 28
 	);
29 29
 
30 30
 	public function ui($ui=NULL) {
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
 		return $this->_semantic;
49 49
 	}
50 50
 
51
-	public function __construct($params,$jsUtils) {
51
+	public function __construct($params, $jsUtils) {
52 52
 		$this->params=array();
53
-		foreach ( $params as $key => $val ) {
53
+		foreach ($params as $key => $val) {
54 54
 				$this->params[$key]=$params[$key];
55 55
 		}
56 56
 		$this->jsUtils=$jsUtils;
@@ -114,12 +114,12 @@  discard block
 block discarded – undo
114 114
 	 */
115 115
 	public function _output($array_js='') {
116 116
 		if (!is_array($array_js)) {
117
-			$array_js=array (
117
+			$array_js=array(
118 118
 					$array_js
119 119
 			);
120 120
 		}
121 121
 
122
-		foreach ( $array_js as $js ) {
122
+		foreach ($array_js as $js) {
123 123
 			$this->jquery_code_for_compile[]="\t$js\n";
124 124
 		}
125 125
 	}
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 	 * @param string $param
132 132
 	 * @param boolean $immediatly delayed if false
133 133
 	 */
134
-	public function _genericCallValue($jQueryCall,$element='this', $param="", $immediatly=false) {
134
+	public function _genericCallValue($jQueryCall, $element='this', $param="", $immediatly=false) {
135 135
 		$element=Javascript::prep_element($element);
136 136
 		if (isset($param)) {
137 137
 			$param=Javascript::prep_value($param);
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 	 * @param boolean $immediatly delayed if false
151 151
 	 * @return string
152 152
 	 */
153
-	public function _genericCallElement($jQueryCall,$to='this', $element, $immediatly=false) {
153
+	public function _genericCallElement($jQueryCall, $to='this', $element, $immediatly=false) {
154 154
 		$to=Javascript::prep_element($to);
155 155
 		$element=Javascript::prep_element($element);
156 156
 		$str="$({$to}).{$jQueryCall}({$element});";
@@ -168,8 +168,8 @@  discard block
 block discarded – undo
168 168
 	 */
169 169
 	public function sortable($element, $options=array()) {
170 170
 		if (count($options)>0) {
171
-			$sort_options=array ();
172
-			foreach ( $options as $k => $v ) {
171
+			$sort_options=array();
172
+			foreach ($options as $k => $v) {
173 173
 				$sort_options[]="\n\t\t".$k.': '.$v."";
174 174
 			}
175 175
 			$sort_options=implode(",", $sort_options);
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 	 * @param boolean $stopPropagation Prevents the event from bubbling up the DOM tree, preventing any parent handlers from being notified of the event.
202 202
 	 * @return string
203 203
 	 */
204
-	public function _add_event($element, $js, $event, $preventDefault=false, $stopPropagation=false,$immediatly=true) {
204
+	public function _add_event($element, $js, $event, $preventDefault=false, $stopPropagation=false, $immediatly=true) {
205 205
 		if (\is_array($js)) {
206 206
 			$js=implode("\n\t\t", $js);
207 207
 		}
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 			$event="\n\t$(".Javascript::prep_element($element).").bind('{$event}',function(event){\n\t\t{$js}\n\t});\n";
216 216
 		else
217 217
 			$event="\n\t$(".Javascript::prep_element($element).").{$event}(function(event){\n\t\t{$js}\n\t});\n";
218
-		if($immediatly)
218
+		if ($immediatly)
219 219
 			$this->jquery_code_for_compile[]=$event;
220 220
 		return $event;
221 221
 	}
@@ -241,29 +241,29 @@  discard block
 block discarded – undo
241 241
 		$script='$(document).ready(function() {'."\n";
242 242
 		$script.=implode('', $this->jquery_code_for_compile);
243 243
 		$script.='})';
244
-		if($this->params["defer"]){
244
+		if ($this->params["defer"]) {
245 245
 			$script=$this->defer($script);
246 246
 		}
247 247
 		$script.=";";
248 248
 		$this->jquery_code_for_compile=array();
249
-		if($this->params["debug"]===false){
249
+		if ($this->params["debug"]===false) {
250 250
 			$script=$this->minify($script);
251 251
 		}
252 252
 		$output=($script_tags===FALSE) ? $script : $this->inline($script);
253 253
 
254
-		if ($view!==NULL){
255
-			$this->jsUtils->createScriptVariable($view,$view_var, $output);
254
+		if ($view!==NULL) {
255
+			$this->jsUtils->createScriptVariable($view, $view_var, $output);
256 256
 		}
257 257
 		return $output;
258 258
 	}
259 259
 
260
-	private function defer($script){
260
+	private function defer($script) {
261 261
 		$result="window.defer=function (method) {if (window.jQuery) method(); else setTimeout(function() { defer(method) }, 50);};";
262 262
 		$result.="window.defer(function(){".$script."})";
263 263
 		return $result;
264 264
 	}
265 265
 
266
-	private function _compileLibrary($library){
266
+	private function _compileLibrary($library) {
267 267
 		if ($library!=NULL) {
268 268
 			if ($library->isAutoCompile()) {
269 269
 				$library->compile(true);
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
 	 * @return void
282 282
 	 */
283 283
 	public function _clear_compile() {
284
-		$this->jquery_code_for_compile=array ();
284
+		$this->jquery_code_for_compile=array();
285 285
 	}
286 286
 
287 287
 	/**
@@ -290,18 +290,18 @@  discard block
 block discarded – undo
290 290
 	 */
291 291
 	public function _document_ready($js) {
292 292
 		if (!is_array($js)) {
293
-			$js=array (
293
+			$js=array(
294 294
 					$js
295 295
 			);
296 296
 		}
297 297
 
298
-		foreach ( $js as $script ) {
298
+		foreach ($js as $script) {
299 299
 			$this->jquery_code_for_compile[]=$script;
300 300
 		}
301 301
 	}
302 302
 
303 303
 	private function minify($input) {
304
-	if(trim($input) === "") return $input;
304
+	if (trim($input)==="") return $input;
305 305
 	return preg_replace(
306 306
 			array(
307 307
 					// Remove comment(s)
Please login to merge, or discard this patch.
Ajax/common/html/traits/BaseHtmlEventsTrait.php 2 patches
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	public function onCreate($jsCode){
53 53
 		if(isset($this->_events["_create"])){
54 54
 			$this->_events["_create"][]=$jsCode;
55
-		}else{
55
+		} else{
56 56
 			$this->_events["_create"]=[$jsCode];
57 57
 		}
58 58
 		return $this;
@@ -87,8 +87,9 @@  discard block
 block discarded – undo
87 87
 			if(\is_array($create)){
88 88
 				$create=\implode("", $create);
89 89
 			}
90
-			if(isset($js) && $create!=="")
91
-				$js->exec($create,true);
90
+			if(isset($js) && $create!=="") {
91
+							$js->exec($create,true);
92
+			}
92 93
 			unset($this->_events["_create"]);
93 94
 		}
94 95
 	}
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -11,9 +11,9 @@  discard block
 block discarded – undo
11 11
  * @property SimpleExtComponent $_bsComponent
12 12
  * @property string identifier
13 13
  */
14
-trait BaseHtmlEventsTrait{
14
+trait BaseHtmlEventsTrait {
15 15
 
16
-	protected $_events=array ();
16
+	protected $_events=array();
17 17
 
18 18
 	/**
19 19
 	 * @param string $event
@@ -23,11 +23,11 @@  discard block
 block discarded – undo
23 23
 	 * @return \Ajax\common\html\BaseHtml
24 24
 	 */
25 25
 	public function addEvent($event, $jsCode, $stopPropagation=false, $preventDefault=false) {
26
-		if ($stopPropagation === true) {
27
-			$jsCode="event.stopPropagation();" . $jsCode;
26
+		if ($stopPropagation===true) {
27
+			$jsCode="event.stopPropagation();".$jsCode;
28 28
 		}
29
-		if ($preventDefault === true) {
30
-			$jsCode="event.preventDefault();" . $jsCode;
29
+		if ($preventDefault===true) {
30
+			$jsCode="event.preventDefault();".$jsCode;
31 31
 		}
32 32
 		return $this->_addEvent($event, $jsCode);
33 33
 	}
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 			if (\is_array($this->_events[$event])) {
43 43
 				$this->_events[$event][]=$jsCode;
44 44
 			} else {
45
-				$this->_events[$event]=array ($this->_events[$event],$jsCode );
45
+				$this->_events[$event]=array($this->_events[$event], $jsCode);
46 46
 			}
47 47
 		} else {
48 48
 			$this->_events[$event]=$jsCode;
@@ -69,10 +69,10 @@  discard block
 block discarded – undo
69 69
 		return $this->onClick($jsCode);
70 70
 	}
71 71
 
72
-	public function onCreate($jsCode){
73
-		if(isset($this->_events["_create"])){
72
+	public function onCreate($jsCode) {
73
+		if (isset($this->_events["_create"])) {
74 74
 			$this->_events["_create"][]=$jsCode;
75
-		}else{
75
+		} else {
76 76
 			$this->_events["_create"]=[$jsCode];
77 77
 		}
78 78
 		return $this;
@@ -81,15 +81,15 @@  discard block
 block discarded – undo
81 81
 	public function addEventsOnRun(JsUtils $js=NULL) {
82 82
 		$this->_eventsOnCreate($js);
83 83
 		if (isset($this->_bsComponent)) {
84
-			foreach ( $this->_events as $event => $jsCode ) {
84
+			foreach ($this->_events as $event => $jsCode) {
85 85
 				$code=$jsCode;
86 86
 				if (\is_array($jsCode)) {
87 87
 					$code="";
88
-					foreach ( $jsCode as $jsC ) {
88
+					foreach ($jsCode as $jsC) {
89 89
 						if ($jsC instanceof AjaxCall) {
90
-							$code.="\n" . $jsC->compile($js);
90
+							$code.="\n".$jsC->compile($js);
91 91
 						} else {
92
-							$code.="\n" . $jsC;
92
+							$code.="\n".$jsC;
93 93
 						}
94 94
 					}
95 95
 				} elseif ($jsCode instanceof AjaxCall) {
@@ -97,18 +97,18 @@  discard block
 block discarded – undo
97 97
 				}
98 98
 				$this->_bsComponent->addEvent($event, $code);
99 99
 			}
100
-			$this->_events=array ();
100
+			$this->_events=array();
101 101
 		}
102 102
 	}
103 103
 
104
-	protected function _eventsOnCreate(JsUtils $js=NULL){
105
-		if(isset($this->_events["_create"])){
104
+	protected function _eventsOnCreate(JsUtils $js=NULL) {
105
+		if (isset($this->_events["_create"])) {
106 106
 			$create=$this->_events["_create"];
107
-			if(\is_array($create)){
107
+			if (\is_array($create)) {
108 108
 				$create=\implode("", $create);
109 109
 			}
110
-			if(isset($js) && $create!=="")
111
-				$js->exec($create,true);
110
+			if (isset($js) && $create!=="")
111
+				$js->exec($create, true);
112 112
 			unset($this->_events["_create"]);
113 113
 		}
114 114
 	}
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
 	 * @return BaseHtml
123 123
 	 */
124 124
 	public function _ajaxOn($operation, $event, $url, $responseElement="", $parameters=array()) {
125
-		$params=array ("url" => $url,"responseElement" => $responseElement );
125
+		$params=array("url" => $url, "responseElement" => $responseElement);
126 126
 		$params=array_merge($params, $parameters);
127 127
 		$this->_addEvent($event, new AjaxCall($operation, $params));
128 128
 		return $this;
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 	}
156 156
 
157 157
 	public function jsDoJquery($jqueryCall, $param="") {
158
-		return "$('#" . $this->identifier . "')." . $jqueryCall . "(" . Javascript::prep_value($param) . ");";
158
+		return "$('#".$this->identifier."').".$jqueryCall."(".Javascript::prep_value($param).");";
159 159
 	}
160 160
 
161 161
 	public function executeOnRun($jsCode) {
Please login to merge, or discard this patch.
Ajax/common/html/html5/HtmlLinkTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 trait HtmlLinkTrait {
6 6
 
7
-	abstract public function setProperty($name,$value);
7
+	abstract public function setProperty($name, $value);
8 8
 	abstract public function getProperty($name);
9 9
 
10 10
 	public function setHref($value) {
Please login to merge, or discard this patch.
Ajax/semantic/html/base/traits/AttachedTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,8 @@
 block discarded – undo
14 14
 	 */
15 15
 	public function setAttachment($toElement, $side=Side::BOTH) {
16 16
 		if (isset($toElement)) {
17
-			$toElement->addToPropertyCtrl("class", "attached", array ("attached" ));
17
+			$toElement->addToPropertyCtrl("class", "attached", array("attached"));
18 18
 		}
19
-		return $this->addToPropertyCtrl("class", $side . " attached", Side::getConstantValues("attached"));
19
+		return $this->addToPropertyCtrl("class", $side." attached", Side::getConstantValues("attached"));
20 20
 	}
21 21
 }
22 22
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/base/traits/LabeledIconTrait.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 trait LabeledIconTrait {
14 14
 
15 15
 	abstract public function addToProperty($name, $value, $separator=" ");
16
-	abstract public function addContent($content,$before=false);
16
+	abstract public function addContent($content, $before=false);
17 17
 
18 18
 	/**
19 19
 	 * Adds an icon before or after
@@ -22,17 +22,17 @@  discard block
 block discarded – undo
22 22
 	 * @param boolean $labeled
23 23
 	 * @return \Ajax\semantic\html\elements\HtmlIcon
24 24
 	 */
25
-	public function addIcon($icon,$before=true,$labeled=false){
25
+	public function addIcon($icon, $before=true, $labeled=false) {
26 26
 		$iconO=$icon;
27
-		if(\is_string($icon)){
27
+		if (\is_string($icon)) {
28 28
 			$iconO=new HtmlIcon("icon-".$this->identifier, $icon);
29 29
 		}
30
-		if($labeled!==false){
31
-			$direction=($before===true)?Direction::LEFT:Direction::RIGHT;
30
+		if ($labeled!==false) {
31
+			$direction=($before===true) ? Direction::LEFT : Direction::RIGHT;
32 32
 			$this->addToProperty("class", $direction." labeled icon");
33 33
 			$this->tagName="div";
34 34
 		}
35
-		$this->addContent($iconO,$before);
35
+		$this->addContent($iconO, $before);
36 36
 		return $iconO;
37 37
 	}
38 38
 }
39 39
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/html5/HtmlImg.php 2 patches
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,9 @@
 block discarded – undo
14 14
 	}
15 15
 
16 16
 	public function asAvatar($caption=NULL) {
17
-		if (isset($caption))
18
-			$this->wrap("", $caption);
17
+		if (isset($caption)) {
18
+					$this->wrap("", $caption);
19
+		}
19 20
 			return $this->addToProperty("class", "avatar");
20 21
 	}
21 22
 
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -7,6 +7,9 @@
 block discarded – undo
7 7
 class HtmlImg extends \Ajax\common\html\html5\HtmlImg {
8 8
 	use BaseTrait;
9 9
 
10
+	/**
11
+	 * @param string $identifier
12
+	 */
10 13
 	public function __construct($identifier, $src="", $alt="") {
11 14
 		parent::__construct($identifier, $src, $alt);
12 15
 		$this->_baseClass="ui image";
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlDimmer.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,14 +18,14 @@  discard block
 block discarded – undo
18 18
 	}
19 19
 
20 20
 	public function setContent($content) {
21
-		$this->content=new HtmlSemDoubleElement("content-" . $this->identifier, "div", "content", new HtmlSemDoubleElement("", "div", "center", $content));
21
+		$this->content=new HtmlSemDoubleElement("content-".$this->identifier, "div", "content", new HtmlSemDoubleElement("", "div", "center", $content));
22 22
 		return $this;
23 23
 	}
24 24
 
25 25
 	public function asIcon($icon, $title, $subHeader=NULL) {
26
-		$header=new HtmlHeader("header-" . $this->identifier);
26
+		$header=new HtmlHeader("header-".$this->identifier);
27 27
 		$header->asIcon($icon, $title, $subHeader);
28
-		if ($this->_inverted === false)
28
+		if ($this->_inverted===false)
29 29
 			$header->setInverted();
30 30
 		return $this->setContent($header);
31 31
 	}
@@ -42,13 +42,13 @@  discard block
 block discarded – undo
42 42
 
43 43
 	public function run(JsUtils $js) {
44 44
 		if ($this->_container instanceof HtmlSingleElement)
45
-			$this->_bsComponent=$js->semantic()->dimmer("#" . $this->_container->getIdentifier(), $this->_params);
45
+			$this->_bsComponent=$js->semantic()->dimmer("#".$this->_container->getIdentifier(), $this->_params);
46 46
 		return parent::run($js);
47 47
 	}
48 48
 
49 49
 	public function jsShow() {
50 50
 		if (isset($this->_container))
51
-			return '$("#.' . $this->_container->getIdentifier() . ').dimmer("show");';
51
+			return '$("#.'.$this->_container->getIdentifier().').dimmer("show");';
52 52
 	}
53 53
 
54 54
 	public function setBlurring() {
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -25,8 +25,9 @@  discard block
 block discarded – undo
25 25
 	public function asIcon($icon, $title, $subHeader=NULL) {
26 26
 		$header=new HtmlHeader("header-" . $this->identifier);
27 27
 		$header->asIcon($icon, $title, $subHeader);
28
-		if ($this->_inverted === false)
29
-			$header->setInverted();
28
+		if ($this->_inverted === false) {
29
+					$header->setInverted();
30
+		}
30 31
 		return $this->setContent($header);
31 32
 	}
32 33
 
@@ -41,14 +42,16 @@  discard block
 block discarded – undo
41 42
 	}
42 43
 
43 44
 	public function run(JsUtils $js) {
44
-		if ($this->_container instanceof HtmlSingleElement)
45
-			$this->_bsComponent=$js->semantic()->dimmer("#" . $this->_container->getIdentifier(), $this->_params);
45
+		if ($this->_container instanceof HtmlSingleElement) {
46
+					$this->_bsComponent=$js->semantic()->dimmer("#" . $this->_container->getIdentifier(), $this->_params);
47
+		}
46 48
 		return parent::run($js);
47 49
 	}
48 50
 
49 51
 	public function jsShow() {
50
-		if (isset($this->_container))
51
-			return '$("#.' . $this->_container->getIdentifier() . ').dimmer("show");';
52
+		if (isset($this->_container)) {
53
+					return '$("#.' . $this->_container->getIdentifier() . ').dimmer("show");';
54
+		}
52 55
 	}
53 56
 
54 57
 	public function setBlurring() {
Please login to merge, or discard this patch.