Completed
Push — master ( 172c54...50fc65 )
by Jean-Christophe
04:31 queued 01:31
created
Ajax/semantic/html/collections/menus/HtmlMenu.php 1 patch
Braces   +16 added lines, -13 removed lines patch added patch discarded remove patch
@@ -58,9 +58,9 @@  discard block
 block discarded – undo
58 58
 	}
59 59
 
60 60
 	private function afterInsert($item) {
61
-		if (!$item instanceof HtmlMenu && $item->propertyContains("class", "header")===false)
62
-			$item->addToPropertyCtrl("class", "item", array ("item" ));
63
-		else {
61
+		if (!$item instanceof HtmlMenu && $item->propertyContains("class", "header")===false) {
62
+					$item->addToPropertyCtrl("class", "item", array ("item" ));
63
+		} else {
64 64
 			$this->setSecondary();
65 65
 		}
66 66
 		return $item;
@@ -146,10 +146,11 @@  discard block
 block discarded – undo
146 146
 	}
147 147
 
148 148
 	public function setSecondary($value=true) {
149
-		if($value)
150
-			$this->addToProperty("class", "secondary");
151
-		else
152
-			$this->removePropertyValue("class", "secondary");
149
+		if($value) {
150
+					$this->addToProperty("class", "secondary");
151
+		} else {
152
+					$this->removePropertyValue("class", "secondary");
153
+		}
153 154
 	}
154 155
 
155 156
 	public function setVertical() {
@@ -168,8 +169,9 @@  discard block
 block discarded – undo
168 169
 		$this->apply(function (HtmlDoubleElement &$item) {
169 170
 			$item->setTagName("a");
170 171
 		});
171
-		if ($vertical === true)
172
-			$this->setVertical();
172
+		if ($vertical === true) {
173
+					$this->setVertical();
174
+		}
173 175
 		return $this->addToProperty("class", "tabular");
174 176
 	}
175 177
 
@@ -198,10 +200,11 @@  discard block
 block discarded – undo
198 200
 	 */
199 201
 	public function fromDatabaseObject($object, $function) {
200 202
 		$return=$function($object);
201
-		if (\is_array($return))
202
-			$this->addItems($return);
203
-		else
204
-			$this->addItem($return);
203
+		if (\is_array($return)) {
204
+					$this->addItems($return);
205
+		} else {
206
+					$this->addItem($return);
207
+		}
205 208
 	}
206 209
 
207 210
 	/**
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlDropdownItem.php 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -17,12 +17,15 @@  discard block
 block discarded – undo
17 17
 		parent::__construct($identifier, "a");
18 18
 		$this->setClass("item");
19 19
 		$this->setContent($content);
20
-		if($value!==NULL)
21
-			$this->setData($value);
22
-		if($image!==NULL)
23
-			$this->asMiniAvatar($image);
24
-		if($description!==NULL)
25
-			$this->setDescription($description);
20
+		if($value!==NULL) {
21
+					$this->setData($value);
22
+		}
23
+		if($image!==NULL) {
24
+					$this->asMiniAvatar($image);
25
+		}
26
+		if($description!==NULL) {
27
+					$this->setDescription($description);
28
+		}
26 29
 	}
27 30
 
28 31
 	public function setDescription($description){
@@ -39,8 +42,9 @@  discard block
 block discarded – undo
39 42
 
40 43
 	public function asOption(){
41 44
 		$this->tagName="option";
42
-		if($this->getProperty("data-value")!==null)
43
-			$this->setProperty("value", $this->getProperty("data-value"));
45
+		if($this->getProperty("data-value")!==null) {
46
+					$this->setProperty("value", $this->getProperty("data-value"));
47
+		}
44 48
 	}
45 49
 
46 50
 	/**
Please login to merge, or discard this patch.
Ajax/semantic/html/content/InternalPopup.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,8 +47,9 @@
 block discarded – undo
47 47
 					if($item instanceof HtmlSemDoubleElement){
48 48
 						$comp=$item->compile($js);
49 49
 						$bs=$item->run($js);
50
-						if(isset($bs))
51
-							$this->params['onShow']=$bs->getScript();
50
+						if(isset($bs)) {
51
+													$this->params['onShow']=$bs->getScript();
52
+						}
52 53
 						$item=$comp;
53 54
 					}
54 55
 				});
Please login to merge, or discard this patch.