Passed
Push — master ( afb7ea...2c24bb )
by Jean-Christophe
02:47
created
Ajax/semantic/html/modules/checkbox/AbstractCheckbox.php 1 patch
Braces   +13 added lines, -9 removed lines patch added patch discarded remove patch
@@ -15,14 +15,15 @@  discard block
 block discarded – undo
15 15
 		$field=new \Ajax\common\html\html5\HtmlInput($identifier, $inputType, $value);
16 16
 		$field->setProperty("name", $name);
17 17
 		$this->setField($field);
18
-		if (isset($label))
19
-			$this->setLabel($label,$value);
18
+		if (isset($label)) {
19
+					$this->setLabel($label,$value);
20
+		}
20 21
 	}
21 22
 
22 23
 	public function setChecked($value=true){
23 24
 		if($value===true){
24 25
 			$this->getField()->setProperty("checked", "checked");
25
-		}else{
26
+		} else{
26 27
 			$this->getField()->removeProperty("checked");
27 28
 		}
28 29
 		return $this;
@@ -38,8 +39,9 @@  discard block
 block discarded – undo
38 39
 			$labelO=new HtmlSemDoubleElement("", "label", "");
39 40
 			$labelO->setContent($label);
40 41
 			$labelO->setProperty("for", $this->getField()->getIdentifier());
41
-			if(isset($value))
42
-				$labelO->setProperty("data-value", $value);
42
+			if(isset($value)) {
43
+							$labelO->setProperty("data-value", $value);
44
+			}
43 45
 		}
44 46
 		$this->content["label"]=$labelO;
45 47
 	}
@@ -53,8 +55,9 @@  discard block
 block discarded – undo
53 55
 	 * @return mixed
54 56
 	 */
55 57
 	public function getLabel() {
56
-		if (\array_key_exists("label", $this->content))
57
-			return $this->content["label"];
58
+		if (\array_key_exists("label", $this->content)) {
59
+					return $this->content["label"];
60
+		}
58 61
 	}
59 62
 
60 63
 	/**
@@ -129,8 +132,9 @@  discard block
 block discarded – undo
129 132
 	}
130 133
 
131 134
 	public function run(JsUtils $js) {
132
-		if(!isset($this->_bsComponent))
133
-			$this->_bsComponent=$js->semantic()->checkbox("#" . $this->identifier, $this->_params);
135
+		if(!isset($this->_bsComponent)) {
136
+					$this->_bsComponent=$js->semantic()->checkbox("#" . $this->identifier, $this->_params);
137
+		}
134 138
 		return parent::run($js);
135 139
 	}
136 140
 }
Please login to merge, or discard this patch.