Completed
Push — master ( 781bd5...e04e71 )
by Jean-Christophe
03:39
created
Ajax/semantic/components/search/SearchCategories.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,8 +20,9 @@
 block discarded – undo
20 20
 		$result=array ();
21 21
 		foreach ( $this->categories as $category ) {
22 22
 			$r=$category->search($query, $field);
23
-			if ($r !== false)
24
-				$result[]=$r;
23
+			if ($r !== false) {
24
+							$result[]=$r;
25
+			}
25 26
 		}
26 27
 		$this->categories=$result;
27 28
 		return $this;
Please login to merge, or discard this patch.
Ajax/semantic/components/search/SearchResult.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -77,8 +77,9 @@
 block discarded – undo
77 77
 		$vars=get_object_vars($this);
78 78
 		$result=array ();
79 79
 		foreach ( $vars as $k => $v ) {
80
-			if (isset($v))
81
-				$result[$k]=$v;
80
+			if (isset($v)) {
81
+							$result[$k]=$v;
82
+			}
82 83
 		}
83 84
 		return $result;
84 85
 	}
Please login to merge, or discard this patch.
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/content/card/HtmlCardHeaderContent.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,9 @@
 block discarded – undo
18 18
 			foreach ( $metas as $meta ) {
19 19
 				$this->addMeta($meta);
20 20
 			}
21
-		} else
22
-			$this->addMeta($metas);
21
+		} else {
22
+					$this->addMeta($metas);
23
+		}
23 24
 		if (isset($description)) {
24 25
 			$this->setDescription($description);
25 26
 		}
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.