Completed
Push — master ( 0a6efd...18e8f7 )
by Jean-Christophe
02:37
created
Ajax/semantic/html/content/table/HtmlTableContent.php 1 patch
Braces   +18 added lines, -12 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
 	/**
@@ -148,8 +149,9 @@  discard block
 block discarded – undo
148 149
 			$values=\array_fill(0, $count, $values);
149 150
 			$isArray=false;
150 151
 		}
151
-		if (JArray::dimension($values) == 1 && $isArray)
152
-			$values=[ $values ];
152
+		if (JArray::dimension($values) == 1 && $isArray) {
153
+					$values=[ $values ];
154
+		}
153 155
 
154 156
 		$count=\min(\sizeof($values), $count);
155 157
 
@@ -193,8 +195,9 @@  discard block
 block discarded – undo
193 195
 		$count=$this->count();
194 196
 		for($i=0; $i < $count; $i++) {
195 197
 			$index=$this->content[$i]->getColPosition($colIndex);
196
-			if ($index !== NULL)
197
-				$this->getCell($i, $index)->$function();
198
+			if ($index !== NULL) {
199
+							$this->getCell($i, $index)->$function();
200
+			}
198 201
 		}
199 202
 		return $this;
200 203
 	}
@@ -225,8 +228,9 @@  discard block
 block discarded – undo
225 228
 	 */
226 229
 	public function getColCount() {
227 230
 		$result=0;
228
-		if ($this->count() > 0)
229
-			$result=$this->getItem(0)->count();
231
+		if ($this->count() > 0) {
232
+					$result=$this->getItem(0)->count();
233
+		}
230 234
 		return $result;
231 235
 	}
232 236
 
@@ -250,8 +254,9 @@  discard block
 block discarded – undo
250 254
 
251 255
 	public function toDelete($rowIndex, $colIndex){
252 256
 		$row=$this->getItem($rowIndex);
253
-		if (isset($row) === true)
254
-			$row->toDelete($colIndex);
257
+		if (isset($row) === true) {
258
+					$row->toDelete($colIndex);
259
+		}
255 260
 		return $this;
256 261
 	}
257 262
 
@@ -349,8 +354,9 @@  discard block
 block discarded – undo
349 354
 		foreach ( $rows as $row ) {
350 355
 			$cell=$row->getItem($colIndex);
351 356
 			$value=$cell->getContent();
352
-			if($functionExists)
353
-				$value=\call_user_func($function,$value);
357
+			if($functionExists) {
358
+							$value=\call_user_func($function,$value);
359
+			}
354 360
 			if($value!==$identiqual){
355 361
 				if($counter>0 && isset($cellToMerge)){
356 362
 					$cellToMerge->setRowspan($counter);
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
@@ -84,15 +84,17 @@  discard block
 block discarded – undo
84 84
 
85 85
 	public function getColspan() {
86 86
 		$colspan=1;
87
-		if (\array_key_exists("colspan", $this->properties))
88
-			$colspan=$this->getProperty("colspan");
87
+		if (\array_key_exists("colspan", $this->properties)) {
88
+					$colspan=$this->getProperty("colspan");
89
+		}
89 90
 		return $colspan;
90 91
 	}
91 92
 
92 93
 	public function getRowspan() {
93 94
 		$rowspan=1;
94
-		if (\array_key_exists("rowspan", $this->properties))
95
-			$rowspan=$this->getProperty("rowspan");
95
+		if (\array_key_exists("rowspan", $this->properties)) {
96
+					$rowspan=$this->getProperty("rowspan");
97
+		}
96 98
 		return $rowspan;
97 99
 	}
98 100
 
@@ -129,8 +131,9 @@  discard block
 block discarded – undo
129 131
 	}
130 132
 
131 133
 	public function compile(JsUtils $js=NULL, &$view=NULL) {
132
-		if(!$this->_deleted)
133
-			return parent::compile();
134
+		if(!$this->_deleted) {
135
+					return parent::compile();
136
+		}
134 137
 		return;
135 138
 	}
136 139
 }
Please login to merge, or discard this patch.