Passed
Push — master ( b5945e...160666 )
by Jean-Christophe
02:42
created
Ajax/semantic/html/elements/HtmlList.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -72,8 +72,9 @@  discard block
 block discarded – undo
72 72
 
73 73
 	protected function getItemToAdd($item) {
74 74
 		$itemO = parent::getItemToAdd($item);
75
-		if ($itemO instanceof AbstractCheckbox)
76
-			$itemO->addClass("item");
75
+		if ($itemO instanceof AbstractCheckbox) {
76
+					$itemO->addClass("item");
77
+		}
77 78
 		return $itemO;
78 79
 	}
79 80
 
@@ -179,8 +180,9 @@  discard block
 block discarded – undo
179 180
 		if (isset($masterItem)) {
180 181
 			if (\is_array($masterItem)) {
181 182
 				$masterO = new HtmlFormCheckbox("master-" . $identifier, @$masterItem[0], @$masterItem[1]);
182
-				if (isset($name))
183
-					$masterO->setName($name);
183
+				if (isset($name)) {
184
+									$masterO->setName($name);
185
+				}
184 186
 				if (isset($masterItem[1])) {
185 187
 					if (\array_search($masterItem[1], $values) !== false) {
186 188
 						$masterO->getDataField()->setProperty("checked", "");
@@ -204,8 +206,9 @@  discard block
 block discarded – undo
204 206
 			if (\array_search($val, $values) !== false) {
205 207
 				$itemO->getDataField()->setProperty("checked", "");
206 208
 			}
207
-			if (isset($name))
208
-				$itemO->setName($name);
209
+			if (isset($name)) {
210
+							$itemO->setName($name);
211
+			}
209 212
 			$itemO->setClass("item");
210 213
 			$fields[] = $itemO;
211 214
 		}
Please login to merge, or discard this patch.
Ajax/semantic/html/content/table/HtmlTR.php 1 patch
Braces   +15 added lines, -10 removed lines patch added patch discarded remove patch
@@ -151,25 +151,29 @@  discard block
 block discarded – undo
151 151
 	}
152 152
 
153 153
 	public function getColPosition($colIndex) {
154
-		if ($this->_container->_isMerged() !== true)
155
-			return $colIndex;
154
+		if ($this->_container->_isMerged() !== true) {
155
+					return $colIndex;
156
+		}
156 157
 		$pos = 0;
157 158
 		$rows = $this->_container->getContent();
158 159
 		for ($i = 0; $i < $this->_row; $i ++) {
159 160
 			$max = \min($colIndex, $rows[$i]->count());
160 161
 			for ($j = 0; $j < $max; $j ++) {
161 162
 				$rowspan = $rows[$i]->getItem($j)->getRowspan();
162
-				if ($rowspan + $i > $this->_row)
163
-					$pos ++;
163
+				if ($rowspan + $i > $this->_row) {
164
+									$pos ++;
165
+				}
164 166
 			}
165 167
 		}
166
-		if ($pos > $colIndex)
167
-			return NULL;
168
+		if ($pos > $colIndex) {
169
+					return NULL;
170
+		}
168 171
 		$count = $this->count();
169 172
 		for ($i = 0; $i < $count; $i ++) {
170 173
 			$pos += $this->content[$i]->getColspan();
171
-			if ($pos >= $colIndex + 1)
172
-				return $i;
174
+			if ($pos >= $colIndex + 1) {
175
+							return $i;
176
+			}
173 177
 		}
174 178
 		return null;
175 179
 	}
@@ -192,8 +196,9 @@  discard block
 block discarded – undo
192 196
 	public function containsStr($needle) {
193 197
 		$cells = $this->content;
194 198
 		foreach ($cells as $cell) {
195
-			if (\strpos($cell->getContent(), $needle) !== false)
196
-				return true;
199
+			if (\strpos($cell->getContent(), $needle) !== false) {
200
+							return true;
201
+			}
197 202
 		}
198 203
 		return false;
199 204
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/content/table/HtmlTD.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -108,15 +108,17 @@  discard block
 block discarded – undo
108 108
 
109 109
 	public function getColspan() {
110 110
 		$colspan = 1;
111
-		if (\array_key_exists("colspan", $this->properties))
112
-			$colspan = $this->getProperty("colspan");
111
+		if (\array_key_exists("colspan", $this->properties)) {
112
+					$colspan = $this->getProperty("colspan");
113
+		}
113 114
 		return $colspan;
114 115
 	}
115 116
 
116 117
 	public function getRowspan() {
117 118
 		$rowspan = 1;
118
-		if (\array_key_exists("rowspan", $this->properties))
119
-			$rowspan = $this->getProperty("rowspan");
119
+		if (\array_key_exists("rowspan", $this->properties)) {
120
+					$rowspan = $this->getProperty("rowspan");
121
+		}
120 122
 		return $rowspan;
121 123
 	}
122 124
 
@@ -155,7 +157,8 @@  discard block
 block discarded – undo
155 157
 	}
156 158
 
157 159
 	public function compile(JsUtils $js = NULL, &$view = NULL) {
158
-		if (! $this->_deleted)
159
-			return parent::compile($js, $view);
160
+		if (! $this->_deleted) {
161
+					return parent::compile($js, $view);
162
+		}
160 163
 	}
161 164
 }
Please login to merge, or discard this patch.
Ajax/bootstrap/html/HtmlGridSystem.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
 	public function getRow($index,$force=true){
44 44
 		if($index<sizeof($this->rows)){
45 45
 			$result=$this->rows[$index-1];
46
-		}else if ($force){
46
+		} else if ($force){
47 47
 			$this->setNumRows($index);
48 48
 			$result=$this->rows[$index-1];
49 49
 		}
Please login to merge, or discard this patch.
Ajax/ui/components/Accordion.php 1 patch
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,9 +53,9 @@
 block discarded – undo
53 53
 	 * @return $this
54 54
 	 */
55 55
 	public function setAnimate($value) {
56
-		if ($value instanceof Animation)
57
-			$value = $value->getParams();
58
-		else if (is_string($value)) {
56
+		if ($value instanceof Animation) {
57
+					$value = $value->getParams();
58
+		} else if (is_string($value)) {
59 59
 			$animation = new Animation();
60 60
 			$animation->setEasing($value);
61 61
 		}
Please login to merge, or discard this patch.
Ajax/ui/components/DialogButton.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,8 +14,9 @@
 block discarded – undo
14 14
 class DialogButton extends BaseComponent {
15 15
 
16 16
 	private function addFunction($jsCode) {
17
-		if (! JString::startsWith($jsCode, "function"))
18
-			$jsCode = "%function(){" . $jsCode . "}%";
17
+		if (! JString::startsWith($jsCode, "function")) {
18
+					$jsCode = "%function(){" . $jsCode . "}%";
19
+		}
19 20
 		return $jsCode;
20 21
 	}
21 22
 
Please login to merge, or discard this patch.
Ajax/ui/properties/Position.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,8 +84,9 @@
 block discarded – undo
84 84
 	protected function setParamCtrl($key, $value, $typeCtrl) {
85 85
 		if (! $typeCtrl($value)) {
86 86
 			throw new \Exception("La fonction " . $typeCtrl . " a retourné faux pour l'affectation de la propriété " . $key . " à la position");
87
-		} else
88
-			$this->setParam($key, $value);
87
+		} else {
88
+					$this->setParam($key, $value);
89
+		}
89 90
 	}
90 91
 
91 92
 	/*
Please login to merge, or discard this patch.
Ajax/semantic/html/base/HtmlSemDoubleElement.php 1 patch
Braces   +15 added lines, -10 removed lines patch added patch discarded remove patch
@@ -49,8 +49,9 @@  discard block
 block discarded – undo
49 49
 	 * @param string $popupEvent
50 50
 	 */
51 51
 	public function setPopupAttributes($variation = NULL, $popupEvent = NULL) {
52
-		if (isset($this->_popup))
53
-			$this->_popup->setAttributes($variation, $popupEvent);
52
+		if (isset($this->_popup)) {
53
+					$this->_popup->setAttributes($variation, $popupEvent);
54
+		}
54 55
 	}
55 56
 
56 57
 	/**
@@ -109,8 +110,9 @@  discard block
 block discarded – undo
109 110
 		$labelO = $label;
110 111
 		if (\is_object($label) === false) {
111 112
 			$labelO = new HtmlLabel("label-" . $this->identifier, $label);
112
-			if (isset($icon))
113
-				$labelO->addIcon($icon);
113
+			if (isset($icon)) {
114
+							$labelO->addIcon($icon);
115
+			}
114 116
 		} else {
115 117
 			$labelO->addToPropertyCtrl("class", "label", array(
116 118
 				"label"
@@ -141,10 +143,12 @@  discard block
 block discarded – undo
141 143
 	 * @return HtmlSemDoubleElement
142 144
 	 */
143 145
 	public function asLink($href = NULL, $target = NULL) {
144
-		if (isset($href))
145
-			$this->setProperty("href", $href);
146
-		if (isset($target))
147
-			$this->setProperty("target", $target);
146
+		if (isset($href)) {
147
+					$this->setProperty("href", $href);
148
+		}
149
+		if (isset($target)) {
150
+					$this->setProperty("target", $target);
151
+		}
148 152
 		return $this->setTagName("a");
149 153
 	}
150 154
 
@@ -156,8 +160,9 @@  discard block
 block discarded – undo
156 160
 	 */
157 161
 	public function jsShowDimmer($show = true) {
158 162
 		$status = "hide";
159
-		if ($show === true)
160
-			$status = "show";
163
+		if ($show === true) {
164
+					$status = "show";
165
+		}
161 166
 		return '$("#.' . $this->identifier . ').dimmer("' . $status . '");';
162 167
 	}
163 168
 
Please login to merge, or discard this patch.
Ajax/service/AjaxCall.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,8 +15,9 @@
 block discarded – undo
15 15
 	}
16 16
 
17 17
 	public function compile(JsUtils $js = null) {
18
-		if ($js === null)
19
-			return;
18
+		if ($js === null) {
19
+					return;
20
+		}
20 21
 		$params = "{}";
21 22
 		$stopPropagation = true;
22 23
 		$preventDefault = true;
Please login to merge, or discard this patch.