Completed
Push — master ( ea2a7d...e9bdcb )
by Jean-Christophe
03:40
created
Ajax/semantic/html/collections/menus/HtmlMenu.php 1 patch
Braces   +11 added lines, -9 removed lines patch added patch discarded remove patch
@@ -55,9 +55,9 @@  discard block
 block discarded – undo
55 55
 	}
56 56
 
57 57
 	private function afterInsert($item) {
58
-		if (!$item instanceof HtmlMenu)
59
-			$item->addToPropertyCtrl("class", "item", array ("item" ));
60
-		else {
58
+		if (!$item instanceof HtmlMenu) {
59
+					$item->addToPropertyCtrl("class", "item", array ("item" ));
60
+		} else {
61 61
 			$this->setSecondary();
62 62
 		}
63 63
 		return $item;
@@ -155,8 +155,9 @@  discard block
 block discarded – undo
155 155
 		$this->apply(function (HtmlDoubleElement &$item) {
156 156
 			$item->setTagName("a");
157 157
 		});
158
-		if ($vertical === true)
159
-			$this->setVertical();
158
+		if ($vertical === true) {
159
+					$this->setVertical();
160
+		}
160 161
 		return $this->addToProperty("class", "tabular");
161 162
 	}
162 163
 
@@ -185,10 +186,11 @@  discard block
 block discarded – undo
185 186
 	 */
186 187
 	public function fromDatabaseObject($object, $function) {
187 188
 		$return=$function($object);
188
-		if (\is_array($return))
189
-			$this->addItems($return);
190
-		else
191
-			$this->addItem($return);
189
+		if (\is_array($return)) {
190
+					$this->addItems($return);
191
+		} else {
192
+					$this->addItem($return);
193
+		}
192 194
 	}
193 195
 
194 196
 	/**
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlButton.php 1 patch
Braces   +6 added lines, -5 removed lines patch added patch discarded remove patch
@@ -54,9 +54,9 @@  discard block
 block discarded – undo
54 54
 	}
55 55
 
56 56
 	public function setFocusable($value=true) {
57
-		if ($value === true)
58
-			$this->setProperty("tabindex", "0");
59
-		else {
57
+		if ($value === true) {
58
+					$this->setProperty("tabindex", "0");
59
+		} else {
60 60
 			$this->removeProperty("tabindex");
61 61
 		}
62 62
 		return $this;
@@ -181,8 +181,9 @@  discard block
 block discarded – undo
181 181
 	}
182 182
 
183 183
 	public static function social($identifier, $social, $value=NULL) {
184
-		if ($value === NULL)
185
-			$value=\ucfirst($social);
184
+		if ($value === NULL) {
185
+					$value=\ucfirst($social);
186
+		}
186 187
 		$return=new HtmlButton($identifier, $value);
187 188
 		$return->addIcon($social);
188 189
 		return $return->addToPropertyCtrl("class", $social, Social::getConstants());
Please login to merge, or discard this patch.
Ajax/semantic/html/base/traits/BaseTrait.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,8 +38,9 @@  discard block
 block discarded – undo
38 38
 	}
39 39
 
40 40
 	public function addVariations($variations=array()) {
41
-		if (\is_string($variations))
42
-			$variations=\explode(" ", $variations);
41
+		if (\is_string($variations)) {
42
+					$variations=\explode(" ", $variations);
43
+		}
43 44
 		foreach ( $variations as $variation ) {
44 45
 			$this->addVariation($variation);
45 46
 		}
@@ -47,8 +48,9 @@  discard block
 block discarded – undo
47 48
 	}
48 49
 
49 50
 	public function addStates($states=array()) {
50
-		if (\is_string($states))
51
-			$states=\explode(" ", $states);
51
+		if (\is_string($states)) {
52
+					$states=\explode(" ", $states);
53
+		}
52 54
 		foreach ( $states as $state ) {
53 55
 			$this->addState($state);
54 56
 		}
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlGridCol.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,9 @@
 block discarded – undo
19 19
 	public function __construct($identifier, $width=NULL) {
20 20
 		parent::__construct($identifier, "div");
21 21
 		$this->setClass("column");
22
-		if (isset($width))
23
-			$this->setWidth($width);
22
+		if (isset($width)) {
23
+					$this->setWidth($width);
24
+		}
24 25
 	}
25 26
 
26 27
 	/**
Please login to merge, or discard this patch.
Ajax/semantic/html/content/table/HtmlTableContent.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,8 +22,9 @@  discard block
 block discarded – undo
22 22
 	 */
23 23
 	public function __construct($identifier, $tagName="tbody", $rowCount=NULL, $colCount=NULL) {
24 24
 		parent::__construct($identifier, $tagName, "");
25
-		if (isset($rowCount) && isset($colCount))
26
-			$this->setRowCount($rowCount, $colCount);
25
+		if (isset($rowCount) && isset($colCount)) {
26
+					$this->setRowCount($rowCount, $colCount);
27
+		}
27 28
 	}
28 29
 
29 30
 	/**
@@ -119,8 +120,9 @@  discard block
 block discarded – undo
119 120
 			$values=\array_fill(0, $count, $values);
120 121
 			$isArray=false;
121 122
 		}
122
-		if (JArray::dimension($values) == 1 && $isArray)
123
-			$values=[ $values ];
123
+		if (JArray::dimension($values) == 1 && $isArray) {
124
+					$values=[ $values ];
125
+		}
124 126
 		
125 127
 		$count=\min(\sizeof($values), $count);
126 128
 		
@@ -190,8 +192,9 @@  discard block
 block discarded – undo
190 192
 	 */
191 193
 	public function getColCount() {
192 194
 		$result=0;
193
-		if ($this->count() > 0)
194
-			$result=$this->getItem(0)->getColCount();
195
+		if ($this->count() > 0) {
196
+					$result=$this->getItem(0)->getColCount();
197
+		}
195 198
 		return $result;
196 199
 	}
197 200
 
Please login to merge, or discard this patch.
Ajax/common/html/BaseHtml.php 1 patch
Braces   +26 added lines, -18 removed lines patch added patch discarded remove patch
@@ -51,17 +51,19 @@  discard block
 block discarded – undo
51 51
 	}
52 52
 
53 53
 	public function getProperty($name) {
54
-		if (array_key_exists($name, $this->properties))
55
-			return $this->properties[$name];
54
+		if (array_key_exists($name, $this->properties)) {
55
+					return $this->properties[$name];
56
+		}
56 57
 	}
57 58
 
58 59
 	public function addToProperty($name, $value, $separator=" ") {
59 60
 		if ($value !== "" && $this->propertyContains($name, $value) === false) {
60 61
 			$v=@$this->properties[$name];
61
-			if (isset($v) && $v !== "")
62
-				$v=$v . $separator . $value;
63
-			else
64
-				$v=$value;
62
+			if (isset($v) && $v !== "") {
63
+							$v=$v . $separator . $value;
64
+			} else {
65
+							$v=$value;
66
+			}
65 67
 			
66 68
 			return $this->setProperty($name, $v);
67 69
 		}
@@ -121,8 +123,9 @@  discard block
 block discarded – undo
121 123
 	}
122 124
 
123 125
 	protected function setPropertyCtrl($name, $value, $typeCtrl) {
124
-		if ($this->ctrl($name, $value, $typeCtrl) === true)
125
-			return $this->setProperty($name, $value);
126
+		if ($this->ctrl($name, $value, $typeCtrl) === true) {
127
+					return $this->setProperty($name, $value);
128
+		}
126 129
 		return $this;
127 130
 	}
128 131
 
@@ -152,8 +155,9 @@  discard block
 block discarded – undo
152 155
 	}
153 156
 
154 157
 	protected function removeProperty($name) {
155
-		if (\array_key_exists($name, $this->properties))
156
-			unset($this->properties[$name]);
158
+		if (\array_key_exists($name, $this->properties)) {
159
+					unset($this->properties[$name]);
160
+		}
157 161
 		return $this;
158 162
 	}
159 163
 
@@ -173,8 +177,9 @@  discard block
 block discarded – undo
173 177
 	}
174 178
 
175 179
 	protected function addToPropertyUnique($name, $value, $typeCtrl) {
176
-		if (@class_exists($typeCtrl, true))
177
-			$typeCtrl=$typeCtrl::getConstants();
180
+		if (@class_exists($typeCtrl, true)) {
181
+					$typeCtrl=$typeCtrl::getConstants();
182
+		}
178 183
 		if (is_array($typeCtrl)) {
179 184
 			$this->removeOldValues($this->properties[$name], $typeCtrl);
180 185
 		}
@@ -359,15 +364,18 @@  discard block
 block discarded – undo
359 364
 			$flag=false;
360 365
 			$index=0;
361 366
 			while ( !$flag && $index < sizeof($elements) ) {
362
-				if ($elements[$index] instanceof BaseHtml)
363
-					$flag=($elements[$index]->getIdentifier() === $identifier);
367
+				if ($elements[$index] instanceof BaseHtml) {
368
+									$flag=($elements[$index]->getIdentifier() === $identifier);
369
+				}
364 370
 				$index++;
365 371
 			}
366
-			if ($flag === true)
367
-				return $elements[$index - 1];
372
+			if ($flag === true) {
373
+							return $elements[$index - 1];
374
+			}
368 375
 		} elseif ($elements instanceof BaseHtml) {
369
-			if ($elements->getIdentifier() === $identifier)
370
-				return $elements;
376
+			if ($elements->getIdentifier() === $identifier) {
377
+							return $elements;
378
+			}
371 379
 		}
372 380
 		return null;
373 381
 	}
Please login to merge, or discard this patch.