Completed
Push — master ( 98392d...8b7375 )
by Jean-Christophe
04:05
created
Ajax/semantic/html/modules/HtmlSearch.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,10 +22,12 @@
 block discarded – undo
22 22
 
23 23
 	private function createField($placeholder=NULL, $icon=NULL) {
24 24
 		$field=new HtmlInput($this->identifier);
25
-		if (isset($placeholder) === true)
26
-			$field->setPlaceholder($placeholder);
27
-		if (isset($icon) === true)
28
-			$field->addIcon($icon, Direction::RIGHT);
25
+		if (isset($placeholder) === true) {
26
+					$field->setPlaceholder($placeholder);
27
+		}
28
+		if (isset($icon) === true) {
29
+					$field->addIcon($icon, Direction::RIGHT);
30
+		}
29 31
 		$field->getField()->setClass("prompt");
30 32
 		$this->content["field"]=$field;
31 33
 		return $field;
Please login to merge, or discard this patch.
Ajax/semantic/components/search/SearchResults.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -38,8 +38,9 @@  discard block
 block discarded – undo
38 38
 			foreach ( $objects as $object ) {
39 39
 				$this->addResult([ "title" => $object ]);
40 40
 			}
41
-		} else
42
-			$this->elements=\array_merge($this->elements, $objects);
41
+		} else {
42
+					$this->elements=\array_merge($this->elements, $objects);
43
+		}
43 44
 		return $this;
44 45
 	}
45 46
 
@@ -47,8 +48,9 @@  discard block
 block discarded – undo
47 48
 		$result=array ();
48 49
 		foreach ( $this->elements as $element ) {
49 50
 			if ($element instanceof SearchResult) {
50
-				if ($element->search($query, $field) !== false)
51
-					$result[]=$element->asArray();
51
+				if ($element->search($query, $field) !== false) {
52
+									$result[]=$element->asArray();
53
+				}
52 54
 			} else {
53 55
 				if (\array_key_exists($field, $element)) {
54 56
 					$value=$element[$field];
@@ -66,8 +68,9 @@  discard block
 block discarded – undo
66 68
 
67 69
 	public function search($query, $field="title") {
68 70
 		$result=$this->_search($query, $field);
69
-		if ($result === false)
70
-			$result=NULL;
71
+		if ($result === false) {
72
+					$result=NULL;
73
+		}
71 74
 		return new SearchResults($result);
72 75
 	}
73 76
 
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlDimmer.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,8 +26,9 @@  discard block
 block discarded – undo
26 26
 	public function asIcon($icon, $title, $subHeader=NULL) {
27 27
 		$header=new HtmlHeader("header-" . $this->identifier);
28 28
 		$header->asIcon($icon, $title, $subHeader);
29
-		if ($this->_inverted === false)
30
-			$header->setInverted();
29
+		if ($this->_inverted === false) {
30
+					$header->setInverted();
31
+		}
31 32
 		return $this->setContent($header);
32 33
 	}
33 34
 
@@ -42,14 +43,16 @@  discard block
 block discarded – undo
42 43
 	}
43 44
 
44 45
 	public function run(JsUtils $js) {
45
-		if ($this->_container instanceof HtmlSingleElement)
46
-			$this->_bsComponent=$js->semantic()->dimmer("#" . $this->_container->getIdentifier(), $this->_params);
46
+		if ($this->_container instanceof HtmlSingleElement) {
47
+					$this->_bsComponent=$js->semantic()->dimmer("#" . $this->_container->getIdentifier(), $this->_params);
48
+		}
47 49
 		return parent::run($js);
48 50
 	}
49 51
 
50 52
 	public function jsShow() {
51
-		if (isset($this->_container) === true)
52
-			return '$("#.' . $this->_container->getIdentifier() . ').dimmer("show");';
53
+		if (isset($this->_container) === true) {
54
+					return '$("#.' . $this->_container->getIdentifier() . ').dimmer("show");';
55
+		}
53 56
 	}
54 57
 
55 58
 	public function setBlurring() {
Please login to merge, or discard this patch.
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/HtmlIcon.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -109,8 +109,9 @@  discard block
 block discarded – undo
109 109
 
110 110
 	public function setCircular($inverted=false) {
111 111
 		$invertedStr="";
112
-		if ($inverted !== false)
113
-			$invertedStr=" inverted";
112
+		if ($inverted !== false) {
113
+					$invertedStr=" inverted";
114
+		}
114 115
 		return $this->addToMember($this->attributes, "circular" . $invertedStr);
115 116
 	}
116 117
 
@@ -133,8 +134,9 @@  discard block
 block discarded – undo
133 134
 	 */
134 135
 	public function setBordered($inverted=false) {
135 136
 		$invertedStr="";
136
-		if ($inverted !== false)
137
-			$invertedStr=" inverted";
137
+		if ($inverted !== false) {
138
+					$invertedStr=" inverted";
139
+		}
138 140
 		return $this->addToMember($this->attributes, "bordered" . $invertedStr);
139 141
 	}
140 142
 
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.