Passed
Push — master ( 3d3660...f6786e )
by Jean-Christophe
01:38
created
Ajax/semantic/html/modules/HtmlDropdown.php 1 patch
Braces   +18 added lines, -12 removed lines patch added patch discarded remove patch
@@ -141,8 +141,9 @@  discard block
 block discarded – undo
141 141
 	}
142 142
 
143 143
 	public function addInput($name) {
144
-		if (! isset($name))
145
-			$name = "input-" . $this->identifier;
144
+		if (! isset($name)) {
145
+					$name = "input-" . $this->identifier;
146
+		}
146 147
 		$this->setAction("activate");
147 148
 		$this->input = new HtmlInput($name, "hidden");
148 149
 		$this->input->setIdentifier("input-" . $this->identifier);
@@ -293,24 +294,27 @@  discard block
 block discarded – undo
293 294
 
294 295
 	public function asButton($floating = false) {
295 296
 		$this->removeArrow();
296
-		if ($floating)
297
-			$this->addToProperty("class", "floating");
297
+		if ($floating) {
298
+					$this->addToProperty("class", "floating");
299
+		}
298 300
 		$this->removePropertyValue("class", "selection");
299 301
 		return $this->addToProperty("class", "button");
300 302
 	}
301 303
 
302 304
 	public function asSelect($name = NULL, $multiple = false, $selection = true) {
303 305
 		$this->_multiple = $multiple;
304
-		if (isset($name))
305
-			$this->addInput($name);
306
+		if (isset($name)) {
307
+					$this->addInput($name);
308
+		}
306 309
 		if ($multiple) {
307 310
 			$this->addToProperty("class", "multiple");
308 311
 		}
309 312
 		if ($selection) {
310
-			if ($this->propertyContains("class", "button") === false)
311
-				$this->addToPropertyCtrl("class", "selection", array(
313
+			if ($this->propertyContains("class", "button") === false) {
314
+							$this->addToPropertyCtrl("class", "selection", array(
312 315
 					"selection"
313 316
 				));
317
+			}
314 318
 		}
315 319
 		return $this;
316 320
 	}
@@ -322,8 +326,9 @@  discard block
 block discarded – undo
322 326
 
323 327
 	public function setSelect($name = NULL, $multiple = false) {
324 328
 		$this->_template = '<%tagName% id="%identifier%" %properties%>%items%</%tagName%>';
325
-		if (! isset($name))
326
-			$name = "select-" . $this->identifier;
329
+		if (! isset($name)) {
330
+					$name = "select-" . $this->identifier;
331
+		}
327 332
 		$this->input = null;
328 333
 		if ($multiple) {
329 334
 			$this->setProperty("multiple", true);
@@ -368,8 +373,9 @@  discard block
 block discarded – undo
368 373
 			$this->setProperty("value", $value);
369 374
 		}
370 375
 		$textElement = $this->getElementById("text-" . $this->identifier, $this->content);
371
-		if (isset($textElement) && ($textElement instanceof HtmlDoubleElement) && ! $this->_multiple)
372
-			$textElement->setContent($value);
376
+		if (isset($textElement) && ($textElement instanceof HtmlDoubleElement) && ! $this->_multiple) {
377
+					$textElement->setContent($value);
378
+		}
373 379
 		return $this;
374 380
 	}
375 381
 
Please login to merge, or discard this patch.