Completed
Push — master ( 189ad5...73e21a )
by Jean-Christophe
04:04
created
Ajax/semantic/html/elements/HtmlList.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,9 @@
 block discarded – undo
21 21
 		if (\is_array($value)) {
22 22
 			$item=new HtmlListItem("item-" . $this->identifier . "-" . $count, $value[0]);
23 23
 			$item->addIcon($value[1]);
24
-		} else
25
-			$item=new HtmlListItem("item-" . $this->identifier . "-" . $count, $value);
24
+		} else {
25
+					$item=new HtmlListItem("item-" . $this->identifier . "-" . $count, $value);
26
+		}
26 27
 		return $item;
27 28
 	}
28 29
 
Please login to merge, or discard this patch.
Ajax/semantic/html/base/HtmlSemDoubleElement.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,8 +29,9 @@  discard block
 block discarded – undo
29 29
 	}
30 30
 
31 31
 	public function setPopupAttributes($variation=NULL, $popupEvent=NULL) {
32
-		if (isset($this->_popup))
33
-			$this->_popup->setAttributes($variation, $popupEvent);
32
+		if (isset($this->_popup)) {
33
+					$this->_popup->setAttributes($variation, $popupEvent);
34
+		}
34 35
 	}
35 36
 
36 37
 	public function addPopup($title="", $content="", $variation=NULL, $params=array()) {
@@ -53,14 +54,16 @@  discard block
 block discarded – undo
53 54
 
54 55
 	public function jsShowDimmer($show=true) {
55 56
 		$status="hide";
56
-		if ($show === true)
57
-			$status="show";
57
+		if ($show === true) {
58
+					$status="show";
59
+		}
58 60
 		return '$("#.' . $this->identifier . ').dimmer("' . $status . '");';
59 61
 	}
60 62
 
61 63
 	public function compile(JsUtils $js=NULL, View $view=NULL) {
62
-		if (isset($this->_popup))
63
-			$this->_popup->compile();
64
+		if (isset($this->_popup)) {
65
+					$this->_popup->compile();
66
+		}
64 67
 		return parent::compile($js, $view);
65 68
 	}
66 69
 
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/HtmlBreadcrumb.php 1 patch
Braces   +9 added lines, -7 removed lines patch added patch discarded remove patch
@@ -100,8 +100,9 @@  discard block
 block discarded – undo
100 100
 		if (\sizeof($params) > 0 || \strtolower($action) != "index") {
101 101
 			$items[]=$action;
102 102
 			foreach ( $params as $p ) {
103
-				if (\is_object($p) === false)
104
-					$items[]=$p;
103
+				if (\is_object($p) === false) {
104
+									$items[]=$p;
105
+				}
105 106
 			}
106 107
 		}
107 108
 		return $this->addItems($items);
@@ -175,8 +176,9 @@  discard block
 block discarded – undo
175 176
 
176 177
 	public function _ajaxOn($operation, $event, $url, $responseElement="", $parameters=array()) {
177 178
 		foreach ( $this->content as $element ) {
178
-			if ($element->getProperty($this->attr) != NULL)
179
-				$element->_ajaxOn($operation, $event, $url, $responseElement, $parameters);
179
+			if ($element->getProperty($this->attr) != NULL) {
180
+							$element->_ajaxOn($operation, $event, $url, $responseElement, $parameters);
181
+			}
180 182
 		}
181 183
 		return $this;
182 184
 	}
@@ -190,9 +192,9 @@  discard block
 block discarded – undo
190 192
 	protected function createItem($value) {
191 193
 		$count=$this->count();
192 194
 		$itemO=new HtmlSemDoubleElement("item-" . $this->identifier . "-" . $count, "a", "section");
193
-		if (\is_array($value))
194
-			$itemO->fromArray($value);
195
-		else {
195
+		if (\is_array($value)) {
196
+					$itemO->fromArray($value);
197
+		} else {
196 198
 			$itemO->setContent($value);
197 199
 			$itemO->setProperty($this->attr, $this->getHref($count));
198 200
 		}
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlImage.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -11,8 +11,9 @@  discard block
 block discarded – undo
11 11
 	public function __construct($identifier, $src="", $alt="", $size=NULL) {
12 12
 		$image=new HtmlImg("img-", $src, $alt);
13 13
 		parent::__construct($identifier, "div", "ui image", $image);
14
-		if (isset($size))
15
-			$this->setSize($size);
14
+		if (isset($size)) {
15
+					$this->setSize($size);
16
+		}
16 17
 	}
17 18
 
18 19
 	public function setCircular() {
@@ -20,8 +21,9 @@  discard block
 block discarded – undo
20 21
 	}
21 22
 
22 23
 	public function asAvatar($caption=NULL) {
23
-		if (isset($caption))
24
-			$this->wrap("", $caption);
24
+		if (isset($caption)) {
25
+					$this->wrap("", $caption);
26
+		}
25 27
 		return $this->addToProperty("class", "avatar");
26 28
 	}
27 29
 
Please login to merge, or discard this patch.
Ajax/common/html/PropertyWrapper.php 1 patch
Braces   +9 added lines, -7 removed lines patch added patch discarded remove patch
@@ -25,8 +25,9 @@  discard block
 block discarded – undo
25 25
 
26 26
 	private static function containsElement($input) {
27 27
 		foreach ( $input as $v ) {
28
-			if (\is_object($v) === true || \is_array($v))
29
-				return true;
28
+			if (\is_object($v) === true || \is_array($v)) {
29
+							return true;
30
+			}
30 31
 		}
31 32
 		return false;
32 33
 	}
@@ -44,12 +45,13 @@  discard block
 block discarded – undo
44 45
 
45 46
 	public static function wrapObjects($input, $js=NULL, $separator=' ', $valueQuote='"') {
46 47
 		return implode($separator, array_map(function ($v) use($js, $separator, $valueQuote) {
47
-			if (is_object($v))
48
-				return $v->compile($js);
49
-			elseif (\is_array($v)) {
48
+			if (is_object($v)) {
49
+							return $v->compile($js);
50
+			} elseif (\is_array($v)) {
50 51
 				return self::wrap($v, $js, $separator, $valueQuote);
51
-			} else
52
-				return $v;
52
+			} else {
53
+							return $v;
54
+			}
53 55
 		}, $input));
54 56
 	}
55 57
 }
56 58
\ No newline at end of file
Please login to merge, or discard this patch.
Ajax/common/BaseEnum.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@
 block discarded – undo
24 24
 	}
25 25
 
26 26
 	public static function getConstantValues($postFix="") {
27
-		if ($postFix == "")
28
-			return \array_values(self::getConstants());
29
-		else {
27
+		if ($postFix == "") {
28
+					return \array_values(self::getConstants());
29
+		} else {
30 30
 			return \array_map(function ($elem) use($postFix) {
31 31
 				return $elem . " " . $postFix;
32 32
 			}, \array_values(self::getConstants()));
Please login to merge, or discard this patch.
Ajax/semantic/html/views/HtmlCardGroups.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
 			$metas=JArray::getValue($value, "metas", 1);
20 20
 			$description=JArray::getValue($value, "description", 2);
21 21
 			$result->addCardHeaderContent($header, $metas, $description);
22
-		} else
23
-			$result->addCardContent($value);
22
+		} else {
23
+					$result->addCardContent($value);
24
+		}
24 25
 		return $result;
25 26
 	}
26 27
 
Please login to merge, or discard this patch.
Ajax/semantic/html/content/card/HtmlCardContent.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -34,8 +34,9 @@  discard block
 block discarded – undo
34 34
 
35 35
 	public function addImage($src="", $alt="", $size=NULL) {
36 36
 		$image=new HtmlImg("img-", $src, $alt);
37
-		if (isset($size))
38
-			$image->setSize($size);
37
+		if (isset($size)) {
38
+					$image->setSize($size);
39
+		}
39 40
 		$this->content["image"]=$image;
40 41
 		return $image;
41 42
 	}
@@ -45,8 +46,9 @@  discard block
 block discarded – undo
45 46
 			foreach ( $metas as $meta ) {
46 47
 				$this->addMeta($meta);
47 48
 			}
48
-		} else
49
-			$this->addMeta($metas);
49
+		} else {
50
+					$this->addMeta($metas);
51
+		}
50 52
 		return $this;
51 53
 	}
52 54
 
@@ -73,8 +75,9 @@  discard block
 block discarded – undo
73 75
 			$result=new HtmlSemDoubleElement("", "span", "", $caption);
74 76
 			$this->addContent($result);
75 77
 			$result->setFloated($direction);
76
-		} else
77
-			$result=$this->addContent($caption);
78
+		} else {
79
+					$result=$this->addContent($caption);
80
+		}
78 81
 		return $result;
79 82
 	}
80 83
 
Please login to merge, or discard this patch.
Ajax/semantic/html/views/HtmlCard.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,9 @@
 block discarded – undo
36 36
 
37 37
 	private function getPart($part, $index=NULL) {
38 38
 		if (\array_key_exists($part, $this->content)) {
39
-			if (isset($index))
40
-				return $this->content[$part][$index];
39
+			if (isset($index)) {
40
+							return $this->content[$part][$index];
41
+			}
41 42
 			return $this->content[$part];
42 43
 		}
43 44
 		return NULL;
Please login to merge, or discard this patch.