Completed
Push — master ( 98392d...8b7375 )
by Jean-Christophe
04:05
created
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.
Ajax/semantic/html/collections/HtmlGrid.php 1 patch
Braces   +21 added lines, -14 removed lines patch added patch discarded remove patch
@@ -77,8 +77,9 @@  discard block
 block discarded – undo
77 77
 	public function addCol($width=NULL) {
78 78
 		$colCount=$this->colCount() + 1;
79 79
 		$this->setColsCount($colCount, true, $width);
80
-		if ($this->hasOnlyCols($this->count()))
81
-			return $this->content[$colCount - 1];
80
+		if ($this->hasOnlyCols($this->count())) {
81
+					return $this->content[$colCount - 1];
82
+		}
82 83
 		return $this;
83 84
 	}
84 85
 
@@ -166,8 +167,9 @@  discard block
 block discarded – undo
166 167
 	 */
167 168
 	public function rowCount() {
168 169
 		$count=$this->count();
169
-		if ($this->hasOnlyCols($count))
170
-			return 0;
170
+		if ($this->hasOnlyCols($count)) {
171
+					return 0;
172
+		}
171 173
 		return $count;
172 174
 	}
173 175
 
@@ -177,10 +179,12 @@  discard block
 block discarded – undo
177 179
 	 */
178 180
 	public function colCount() {
179 181
 		$count=$this->count();
180
-		if ($this->hasOnlyCols($count))
181
-			return $count;
182
-		if ($count > 0)
183
-			return $this->getItem(0)->count();
182
+		if ($this->hasOnlyCols($count)) {
183
+					return $count;
184
+		}
185
+		if ($count > 0) {
186
+					return $this->getItem(0)->count();
187
+		}
184 188
 		return 0;
185 189
 	}
186 190
 
@@ -191,8 +195,9 @@  discard block
 block discarded – undo
191 195
 	 * @return \Ajax\semantic\html\collections\HtmlGridCol
192 196
 	 */
193 197
 	public function getCell($row, $col) {
194
-		if ($row < 2 && $this->hasOnlyCols($this->count()))
195
-			return $this->getItem($col);
198
+		if ($row < 2 && $this->hasOnlyCols($this->count())) {
199
+					return $this->getItem($col);
200
+		}
196 201
 		$row=$this->getItem($row);
197 202
 		if (isset($row)) {
198 203
 			$col=$row->getItem($col);
@@ -241,8 +246,9 @@  discard block
 block discarded – undo
241 246
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
242 247
 	 */
243 248
 	public function setPadded($value=NULL) {
244
-		if (isset($value))
245
-			$this->addToPropertyCtrl("class", $value, array ("vertically","horizontally" ));
249
+		if (isset($value)) {
250
+					$this->addToPropertyCtrl("class", $value, array ("vertically","horizontally" ));
251
+		}
246 252
 		return $this->addToProperty("class", "padded");
247 253
 	}
248 254
 
@@ -267,8 +273,9 @@  discard block
 block discarded – undo
267 273
 	 * @see \Ajax\common\html\HtmlCollection::createItem()
268 274
 	 */
269 275
 	protected function createItem($value) {
270
-		if ($this->_createCols === false)
271
-			$value=null;
276
+		if ($this->_createCols === false) {
277
+					$value=null;
278
+		}
272 279
 		$item=new HtmlGridRow($this->identifier . "-row-" . ($this->count() + 1), $value, $this->_colSizing, $this->_implicitRows);
273 280
 		return $item;
274 281
 	}
Please login to merge, or discard this patch.