Passed
Push — master ( 0da08b...5a8334 )
by Jean-Christophe
01:41
created
Ajax/semantic/html/modules/checkbox/AbstractCheckbox.php 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -15,8 +15,9 @@  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
 		$this->setLibraryId($identifier);
21 22
 	}
22 23
 
@@ -40,8 +41,9 @@  discard block
 block discarded – undo
40 41
 			$labelO->setContent($label);
41 42
 			$labelO->setProperty("for", $this->getField()
42 43
 				->getIdentifier());
43
-			if (isset($value))
44
-				$labelO->setProperty("data-value", $value);
44
+			if (isset($value)) {
45
+							$labelO->setProperty("data-value", $value);
46
+			}
45 47
 		}
46 48
 		$this->content["label"] = $labelO;
47 49
 	}
@@ -56,8 +58,9 @@  discard block
 block discarded – undo
56 58
 	 * @return mixed
57 59
 	 */
58 60
 	public function getLabel() {
59
-		if (\array_key_exists("label", $this->content))
60
-			return $this->content["label"];
61
+		if (\array_key_exists("label", $this->content)) {
62
+					return $this->content["label"];
63
+		}
61 64
 	}
62 65
 
63 66
 	/**
@@ -138,8 +141,9 @@  discard block
 block discarded – undo
138 141
 	}
139 142
 
140 143
 	public function run(JsUtils $js) {
141
-		if (! isset($this->_bsComponent))
142
-			$this->_bsComponent = $js->semantic()->checkbox("#" . $this->identifier, $this->_params);
144
+		if (! isset($this->_bsComponent)) {
145
+					$this->_bsComponent = $js->semantic()->checkbox("#" . $this->identifier, $this->_params);
146
+		}
143 147
 		return parent::run($js);
144 148
 	}
145 149
 }
Please login to merge, or discard this patch.