Passed
Push — master ( af3469...21fb75 )
by Jean-Christophe
02:16
created
Ajax/semantic/widgets/datatable/DataTableFieldAsTrait.php 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -63,15 +63,17 @@  discard block
 block discarded – undo
63 63
 	 */
64 64
 	private function getFieldButton($caption,$visibleHover=true){
65 65
 		$bt= new HtmlButton($this->cleanIdentifier($caption),$caption);
66
-		if($visibleHover)
67
-			$this->_visibleOver($bt);
66
+		if($visibleHover) {
67
+					$this->_visibleOver($bt);
68
+		}
68 69
 		return $bt;
69 70
 	}
70 71
 
71 72
 	private function getFieldButtons($buttons,$visibleHover=true){
72 73
 		$bts=new HtmlButtonGroups("",$buttons);
73
-		if($visibleHover)
74
-			$this->_visibleOver($bts);
74
+		if($visibleHover) {
75
+					$this->_visibleOver($bts);
76
+		}
75 77
 		return $bts;
76 78
 	}
77 79
 
@@ -88,8 +90,9 @@  discard block
 block discarded – undo
88 90
 		return $this->_fieldAs(function($id,$name,$value,$caption) use ($url,$responseElement,$cssStyle,$attributes){
89 91
 			$button=new HtmlButton($id,$value,$cssStyle);
90 92
 			$button->postOnClick($url,"$(event.target).closest('tr').find(':input').serialize()",$responseElement,$attributes["ajax"]);
91
-			if(!isset($attributes["visibleHover"]) || $attributes["visibleHover"])
92
-				$this->_visibleOver($button);
93
+			if(!isset($attributes["visibleHover"]) || $attributes["visibleHover"]) {
94
+							$this->_visibleOver($button);
95
+			}
93 96
 				return $button;
94 97
 		}, $index,$attributes);
95 98
 	}
@@ -160,8 +163,9 @@  discard block
 block discarded – undo
160 163
 	private function getDefaultButton($icon,$class=null,$visibleHover=true){
161 164
 		$bt=$this->getFieldButton("",$visibleHover);
162 165
 		$bt->asIcon($icon);
163
-		if(isset($class))
164
-			$bt->addClass($class);
166
+		if(isset($class)) {
167
+					$bt->addClass($class);
168
+		}
165 169
 		return $bt;
166 170
 	}
167 171
 
Please login to merge, or discard this patch.
Ajax/semantic/html/content/HtmlMenuItem.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 			if(JArray::isAssociative($content)===false){
18 18
 				$icon=@$content[0];
19 19
 				$title=@$content[1];
20
-			}else{
20
+			} else{
21 21
 				$icon=@$content["icon"];
22 22
 				$title=@$content["title"];
23 23
 			}
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 			if(isset($title)){
28 28
 				$this->setTitle($title);
29 29
 			}
30
-		}else{
30
+		} else{
31 31
 			$this->setContent($content);
32 32
 		}
33 33
 	}
Please login to merge, or discard this patch.
Ajax/bootstrap/html/content/HtmlListgroupItem.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,9 @@
 block discarded – undo
40 40
 	 * @return HtmlBsDoubleElement default : "list-group-item-default"
41 41
 	 */
42 42
 	public function setStyle($cssStyle) {
43
-		if (!JString::startsWith($cssStyle, "list-group-item"))
44
-			$cssStyle="list-group-item".$cssStyle;
43
+		if (!JString::startsWith($cssStyle, "list-group-item")) {
44
+					$cssStyle="list-group-item".$cssStyle;
45
+		}
45 46
 		$this->element->addToPropertyCtrl("class", $cssStyle, CssRef::Styles("list-group-item"));
46 47
 		return $this->element;
47 48
 	}
Please login to merge, or discard this patch.
Ajax/semantic/widgets/datatable/DataTable.php 1 patch
Braces   +35 added lines, -24 removed lines patch added patch discarded remove patch
@@ -58,10 +58,12 @@  discard block
 block discarded – undo
58 58
 			$js->execOn("mouseover", "#".$this->identifier." tr", "$(event.target).closest('tr').find('.visibleover').css('visibility', 'visible');",["preventDefault"=>false,"stopPropagation"=>true]);
59 59
 			$js->execOn("mouseout", "#".$this->identifier." tr", "$(event.target).closest('tr').find('.visibleover').css('visibility', 'hidden');",["preventDefault"=>false,"stopPropagation"=>true]);
60 60
 		}
61
-		if(\is_array($this->_deleteBehavior))
62
-			$this->_generateBehavior("delete",$this->_deleteBehavior, $js);
63
-		if(\is_array($this->_editBehavior))
64
-			$this->_generateBehavior("edit",$this->_editBehavior,$js);
61
+		if(\is_array($this->_deleteBehavior)) {
62
+					$this->_generateBehavior("delete",$this->_deleteBehavior, $js);
63
+		}
64
+		if(\is_array($this->_editBehavior)) {
65
+					$this->_generateBehavior("edit",$this->_editBehavior,$js);
66
+		}
65 67
 		parent::run($js);
66 68
 	}
67 69
 
@@ -94,8 +96,9 @@  discard block
 block discarded – undo
94 96
 			$table->setRowCount(0, \sizeof($captions));
95 97
 			$this->_generateHeader($table,$captions);
96 98
 
97
-			if(isset($this->_compileParts))
98
-				$table->setCompileParts($this->_compileParts);
99
+			if(isset($this->_compileParts)) {
100
+							$table->setCompileParts($this->_compileParts);
101
+			}
99 102
 
100 103
 			$this->_generateContent($table);
101 104
 
@@ -126,8 +129,9 @@  discard block
 block discarded – undo
126 129
 	}
127 130
 
128 131
 	protected function _applyStyleAttributes($table){
129
-		if(isset($this->_hiddenColumns))
130
-			$this->_hideColumns();
132
+		if(isset($this->_hiddenColumns)) {
133
+					$this->_hideColumns();
134
+		}
131 135
 			if(isset($this->_colWidths)){
132 136
 				foreach ($this->_colWidths as $colIndex=>$width){
133 137
 					$table->setColWidth($colIndex,$width);
@@ -186,8 +190,9 @@  discard block
 block discarded – undo
186 190
 			$field=$ck->getField();
187 191
 			$field->setProperty("value",$dataAjax);
188 192
 			$field->setProperty("name", "selection[]");
189
-			if(isset($checkedClass))
190
-				$field->setClass($checkedClass);
193
+			if(isset($checkedClass)) {
194
+							$field->setClass($checkedClass);
195
+			}
191 196
 			\array_unshift($values, $ck);
192 197
 		}
193 198
 		$result=$table->newRow();
@@ -200,8 +205,9 @@  discard block
 block discarded – undo
200 205
 
201 206
 	protected function _generatePagination($table,$js=NULL){
202 207
 		if(isset($this->_toolbar)){
203
-			if($this->_toolbarPosition==PositionInTable::FOOTER)
204
-				$this->_toolbar->setFloated("left");
208
+			if($this->_toolbarPosition==PositionInTable::FOOTER) {
209
+							$this->_toolbar->setFloated("left");
210
+			}
205 211
 		}
206 212
 		$footer=$table->getFooter();
207 213
 		$footer->mergeCol();
@@ -220,8 +226,9 @@  discard block
 block discarded – undo
220 226
 
221 227
 	protected function _getFieldName($index){
222 228
 		$fieldName=parent::_getFieldName($index);
223
-		if(\is_object($fieldName))
224
-			$fieldName="field-".$index;
229
+		if(\is_object($fieldName)) {
230
+					$fieldName="field-".$index;
231
+		}
225 232
 		return $fieldName."[]";
226 233
 	}
227 234
 
@@ -261,7 +268,7 @@  discard block
 block discarded – undo
261 268
 		$hasPart=$table->hasPart($part);
262 269
 		if($hasPart){
263 270
 			$row=$table->getPart($part)->addRow(\sizeof($captions));
264
-		}else{
271
+		} else{
265 272
 			$row=$table->getPart($part)->getRow(0);
266 273
 		}
267 274
 		$row->mergeCol();
@@ -292,7 +299,7 @@  discard block
 block discarded – undo
292 299
 			$this->_urls["refresh"]=JArray::getValue($urls, "refresh",0);
293 300
 			$this->_urls["edit"]=JArray::getValue($urls, "edit",1);
294 301
 			$this->_urls["delete"]=JArray::getValue($urls, "delete",2);
295
-		}else{
302
+		} else{
296 303
 			$this->_urls=["refresh"=>$urls,"edit"=>$urls,"delete"=>$urls];
297 304
 		}
298 305
 		return $this;
@@ -375,8 +382,9 @@  discard block
 block discarded – undo
375 382
 
376 383
 	protected function getTargetSelector($op) {
377 384
 		$result=$this->_targetSelector;
378
-		if(!isset($result[$op]))
379
-			$result="#".$this->identifier;
385
+		if(!isset($result[$op])) {
386
+					$result="#".$this->identifier;
387
+		}
380 388
 		return $result[$op];
381 389
 	}
382 390
 
@@ -394,8 +402,9 @@  discard block
 block discarded – undo
394 402
 	}
395 403
 
396 404
 	public function getRefreshSelector() {
397
-		if(isset($this->_refreshSelector))
398
-			return $this->_refreshSelector;
405
+		if(isset($this->_refreshSelector)) {
406
+					return $this->_refreshSelector;
407
+		}
399 408
 		return "#".$this->identifier." tbody";
400 409
 	}
401 410
 
@@ -414,8 +423,9 @@  discard block
 block discarded – undo
414 423
 	 */
415 424
 	public function show($modelInstance){
416 425
 		if(\is_array($modelInstance)){
417
-			if(isset($modelInstance[0]) && \is_array(array_values($modelInstance)[0]))
418
-				$modelInstance=\json_decode(\json_encode($modelInstance), FALSE);
426
+			if(isset($modelInstance[0]) && \is_array(array_values($modelInstance)[0])) {
427
+							$modelInstance=\json_decode(\json_encode($modelInstance), FALSE);
428
+			}
419 429
 		}
420 430
 		$this->_modelInstance=$modelInstance;
421 431
 	}
@@ -455,8 +465,9 @@  discard block
 block discarded – undo
455 465
 	}
456 466
 
457 467
 	public function hideColumn($colIndex){
458
-		if(!\is_array($this->_hiddenColumns))
459
-			$this->_hiddenColumns=[];
468
+		if(!\is_array($this->_hiddenColumns)) {
469
+					$this->_hiddenColumns=[];
470
+		}
460 471
 		$this->_hiddenColumns[]=$colIndex;
461 472
 		return $this;
462 473
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/content/table/HtmlTableContent.php 1 patch
Braces   +22 added lines, -15 removed lines patch added patch discarded remove patch
@@ -26,8 +26,9 @@  discard block
 block discarded – undo
26 26
 	 */
27 27
 	public function __construct($identifier, $tagName="tbody", $rowCount=NULL, $colCount=NULL) {
28 28
 		parent::__construct($identifier, $tagName, "");
29
-		if (isset($rowCount) && isset($colCount))
30
-			$this->setRowCount($rowCount, $colCount);
29
+		if (isset($rowCount) && isset($colCount)) {
30
+					$this->setRowCount($rowCount, $colCount);
31
+		}
31 32
 	}
32 33
 
33 34
 	/**
@@ -103,7 +104,7 @@  discard block
 block discarded – undo
103 104
 		$row=$this->getItem($row);
104 105
 		if (isset($row) && $row instanceof HtmlCollection) {
105 106
 			$col=$row->getItem($col);
106
-		}else{
107
+		} else{
107 108
 			$col=$row;
108 109
 		}
109 110
 		return $col;
@@ -161,8 +162,9 @@  discard block
 block discarded – undo
161 162
 			$values=\array_fill(0, $count, $values);
162 163
 			$isArray=false;
163 164
 		}
164
-		if (JArray::dimension($values) == 1 && $isArray)
165
-			$values=[ $values ];
165
+		if (JArray::dimension($values) == 1 && $isArray) {
166
+					$values=[ $values ];
167
+		}
166 168
 
167 169
 		$count=\min(\sizeof($values), $count);
168 170
 
@@ -189,8 +191,9 @@  discard block
 block discarded – undo
189 191
 		$count=$this->count();
190 192
 		for($i=0; $i < $count; $i++) {
191 193
 			$cell=$this->getCell($i, $colIndex);
192
-			if($cell instanceof BaseTrait)
193
-				$cell->addVariations($variations);
194
+			if($cell instanceof BaseTrait) {
195
+							$cell->addVariations($variations);
196
+			}
194 197
 		}
195 198
 		return $this;
196 199
 	}
@@ -208,8 +211,9 @@  discard block
 block discarded – undo
208 211
 		$count=$this->count();
209 212
 		for($i=0; $i < $count; $i++) {
210 213
 			$index=$this->content[$i]->getColPosition($colIndex);
211
-			if ($index !== NULL)
212
-				$this->getCell($i, $index)->$function();
214
+			if ($index !== NULL) {
215
+							$this->getCell($i, $index)->$function();
216
+			}
213 217
 		}
214 218
 		return $this;
215 219
 	}
@@ -240,8 +244,9 @@  discard block
 block discarded – undo
240 244
 	 */
241 245
 	public function getColCount() {
242 246
 		$result=0;
243
-		if ($this->count() > 0)
244
-			$result=$this->getItem(0)->count();
247
+		if ($this->count() > 0) {
248
+					$result=$this->getItem(0)->count();
249
+		}
245 250
 		return $result;
246 251
 	}
247 252
 
@@ -265,8 +270,9 @@  discard block
 block discarded – undo
265 270
 
266 271
 	public function toDelete($rowIndex, $colIndex){
267 272
 		$row=$this->getItem($rowIndex);
268
-		if (isset($row) === true)
269
-			$row->toDelete($colIndex);
273
+		if (isset($row) === true) {
274
+					$row->toDelete($colIndex);
275
+		}
270 276
 		return $this;
271 277
 	}
272 278
 
@@ -364,8 +370,9 @@  discard block
 block discarded – undo
364 370
 		foreach ( $rows as $row ) {
365 371
 			$cell=$row->getItem($colIndex);
366 372
 			$value=$cell->getContent();
367
-			if($functionExists)
368
-				$value=\call_user_func($function,$value);
373
+			if($functionExists) {
374
+							$value=\call_user_func($function,$value);
375
+			}
369 376
 			if($value!==$identiqual){
370 377
 				if($counter>0 && isset($cellToMerge)){
371 378
 					$cellToMerge->setRowspan($counter);
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/HtmlGrid.php 1 patch
Braces   +27 added lines, -18 removed lines patch added patch discarded remove patch
@@ -29,8 +29,9 @@  discard block
 block discarded – undo
29 29
 			$this->_colSizing=false;
30 30
 			$this->setWide($numCols);
31 31
 		}
32
-		if($createCols)
33
-			$this->setRowsCount($numRows, $numCols);
32
+		if($createCols) {
33
+					$this->setRowsCount($numRows, $numCols);
34
+		}
34 35
 	}
35 36
 
36 37
 	public function asSegment() {
@@ -82,8 +83,9 @@  discard block
 block discarded – undo
82 83
 	public function addCol($width=NULL) {
83 84
 		$colCount=$this->colCount() + 1;
84 85
 		$this->setColsCount($colCount, true, $width);
85
-		if ($this->hasOnlyCols($this->count()))
86
-			return $this->content[$colCount - 1];
86
+		if ($this->hasOnlyCols($this->count())) {
87
+					return $this->content[$colCount - 1];
88
+		}
87 89
 		return $this;
88 90
 	}
89 91
 
@@ -178,8 +180,9 @@  discard block
 block discarded – undo
178 180
 	 */
179 181
 	public function rowCount() {
180 182
 		$count=$this->count();
181
-		if ($this->hasOnlyCols($count))
182
-			return 0;
183
+		if ($this->hasOnlyCols($count)) {
184
+					return 0;
185
+		}
183 186
 		return $count;
184 187
 	}
185 188
 
@@ -189,10 +192,12 @@  discard block
 block discarded – undo
189 192
 	 */
190 193
 	public function colCount() {
191 194
 		$count=$this->count();
192
-		if ($this->hasOnlyCols($count))
193
-			return $count;
194
-		if ($count > 0)
195
-			return $this->getItem(0)->count();
195
+		if ($this->hasOnlyCols($count)) {
196
+					return $count;
197
+		}
198
+		if ($count > 0) {
199
+					return $this->getItem(0)->count();
200
+		}
196 201
 		return 0;
197 202
 	}
198 203
 
@@ -203,8 +208,9 @@  discard block
 block discarded – undo
203 208
 	 * @return HtmlGridCol|HtmlGridRow
204 209
 	 */
205 210
 	public function getCell($row, $col) {
206
-		if ($row < 2 && $this->hasOnlyCols($this->count()))
207
-			return $this->getItem($col);
211
+		if ($row < 2 && $this->hasOnlyCols($this->count())) {
212
+					return $this->getItem($col);
213
+		}
208 214
 		$rowO=$this->getItem($row);
209 215
 		if (isset($rowO)) {
210 216
 			$colO=$rowO->getItem($col);
@@ -253,8 +259,9 @@  discard block
 block discarded – undo
253 259
 	 * @return \Ajax\semantic\html\collections\HtmlGrid
254 260
 	 */
255 261
 	public function setPadded($value=NULL) {
256
-		if (isset($value))
257
-			$this->addToPropertyCtrl("class", $value, array ("vertically","horizontally" ));
262
+		if (isset($value)) {
263
+					$this->addToPropertyCtrl("class", $value, array ("vertically","horizontally" ));
264
+		}
258 265
 		return $this->addToProperty("class", "padded");
259 266
 	}
260 267
 
@@ -279,8 +286,9 @@  discard block
 block discarded – undo
279 286
 	 * @see \Ajax\common\html\HtmlCollection::createItem()
280 287
 	 */
281 288
 	protected function createItem($value) {
282
-		if ($this->_createCols === false)
283
-			$value=null;
289
+		if ($this->_createCols === false) {
290
+					$value=null;
291
+		}
284 292
 		$item=new HtmlGridRow($this->identifier . "-row-" . ($this->count() + 1), $value, $this->_colSizing, $this->_implicitRows);
285 293
 		return $item;
286 294
 	}
@@ -328,8 +336,9 @@  discard block
 block discarded – undo
328 336
 	 */
329 337
 	public function addDivider($afterColIndex, $vertical=true, $content=NULL) {
330 338
 		$col=$this->getCell(0, $afterColIndex);
331
-		if($col instanceof HtmlGridCol)
332
-			$col->addDivider($vertical, $content);
339
+		if($col instanceof HtmlGridCol) {
340
+					$col->addDivider($vertical, $content);
341
+		}
333 342
 		return $this;
334 343
 	}
335 344
 }
Please login to merge, or discard this patch.
Ajax/common/traits/JsUtilsInternalTrait.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,8 +16,9 @@  discard block
 block discarded – undo
16 16
 	 * @param mixed $view
17 17
 	 */
18 18
 	protected function _compileLibrary(BaseGui $library, &$view=NULL){
19
-		if(isset($view))
20
-			$library->compileHtml($this, $view);
19
+		if(isset($view)) {
20
+					$library->compileHtml($this, $view);
21
+		}
21 22
 		if ($library->isAutoCompile()) {
22 23
 			$library->compile(true);
23 24
 		}
@@ -36,7 +37,9 @@  discard block
 block discarded – undo
36 37
 	}
37 38
 
38 39
 	protected function minify($input) {
39
-		if(trim($input) === "") return $input;
40
+		if(trim($input) === "") {
41
+			return $input;
42
+		}
40 43
 		return preg_replace(
41 44
 				array(
42 45
 						// Remove comment(s)
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlButton.php 1 patch
Braces   +17 added lines, -13 removed lines patch added patch discarded remove patch
@@ -56,9 +56,9 @@  discard block
 block discarded – undo
56 56
 	}
57 57
 
58 58
 	public function setFocusable($value=true) {
59
-		if ($value === true)
60
-			$this->setProperty("tabindex", "0");
61
-		else {
59
+		if ($value === true) {
60
+					$this->setProperty("tabindex", "0");
61
+		} else {
62 62
 			$this->removeProperty("tabindex");
63 63
 		}
64 64
 		return $this;
@@ -106,8 +106,9 @@  discard block
 block discarded – undo
106 106
 	 */
107 107
 	public function addLabel($label, $before=false, $icon=NULL) {
108 108
 		$this->tagName="div";$prefix="";
109
-		if($before)
110
-			$prefix="left ";
109
+		if($before) {
110
+					$prefix="left ";
111
+		}
111 112
 		$this->addToProperty("class", $prefix."labeled");
112 113
 		$isIcon=(isset($this->content[0]) && $this->content[0] instanceof HtmlIcon);
113 114
 		$this->content=new HtmlButton("button-" . $this->identifier, $this->content);
@@ -144,12 +145,13 @@  discard block
 block discarded – undo
144 145
 	public function setColor($color){
145 146
 		if(\is_array($this->content)){
146 147
 			foreach ($this->content as $content){
147
-				if($content instanceof HtmlButton)
148
-					$content->setColor($color);
148
+				if($content instanceof HtmlButton) {
149
+									$content->setColor($color);
150
+				}
149 151
 			}
152
+		} else {
153
+					parent::setColor($color);
150 154
 		}
151
-		else
152
-			parent::setColor($color);
153 155
 		return $this;
154 156
 	}
155 157
 
@@ -202,8 +204,9 @@  discard block
 block discarded – undo
202 204
 	 * @return HtmlButton
203 205
 	 */
204 206
 	public static function social($identifier, $social, $value=NULL) {
205
-		if ($value === NULL)
206
-			$value=\ucfirst($social);
207
+		if ($value === NULL) {
208
+					$value=\ucfirst($social);
209
+		}
207 210
 		$return=new HtmlButton($identifier, $value);
208 211
 		$return->addIcon($social);
209 212
 		return $return->addToPropertyCtrl("class", $social, Social::getConstants());
@@ -256,8 +259,9 @@  discard block
 block discarded – undo
256 259
 	public static function dropdown($identifier,$value,$items=[],$asCombo=false,$icon=null){
257 260
 		$result=new HtmlButtonGroups($identifier,[$value]);
258 261
 		$dd=$result->addDropdown($items,$asCombo);
259
-		if(isset($icon) && $dd instanceof HtmlDropdown)
260
-			$dd->setIcon($icon);
262
+		if(isset($icon) && $dd instanceof HtmlDropdown) {
263
+					$dd->setIcon($icon);
264
+		}
261 265
 		return $result;
262 266
 	}
263 267
 }
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlButtonGroups.php 1 patch
Braces   +12 added lines, -8 removed lines patch added patch discarded remove patch
@@ -18,8 +18,9 @@  discard block
 block discarded – undo
18 18
 	protected $_dropdown;
19 19
 	public function __construct($identifier, $elements=array(), $asIcons=false) {
20 20
 		parent::__construct($identifier, "div", "ui buttons");
21
-		if ($asIcons === true)
22
-			$this->asIcons();
21
+		if ($asIcons === true) {
22
+					$this->asIcons();
23
+		}
23 24
 		$this->addElements($elements, $asIcons);
24 25
 	}
25 26
 	protected function createItem($value){
@@ -50,8 +51,9 @@  discard block
 block discarded – undo
50 51
 	 */
51 52
 	public function addElement($element, $asIcon=false) {
52 53
 		$item=$this->addItem($element);
53
-		if($asIcon && $item instanceof HtmlButton)
54
-			$item->asIcon($element);
54
+		if($asIcon && $item instanceof HtmlButton) {
55
+					$item->asIcon($element);
56
+		}
55 57
 		return $item;
56 58
 	}
57 59
 
@@ -79,8 +81,9 @@  discard block
 block discarded – undo
79 81
 
80 82
 	public function asIcons() {
81 83
 		foreach ( $this->content as $item ) {
82
-			if($item instanceof HtmlButton)
83
-			$item->asIcon($item->getContent());
84
+			if($item instanceof HtmlButton) {
85
+						$item->asIcon($item->getContent());
86
+			}
84 87
 		}
85 88
 		return $this->addToProperty("class", "icons");
86 89
 	}
@@ -92,8 +95,9 @@  discard block
 block discarded – undo
92 95
 	 */
93 96
 	public function addIcons($icons){
94 97
 		foreach ( $this->content as $index=>$item ) {
95
-			if($item instanceof HtmlButton && isset($icons[$index]))
96
-				$item->addIcon($icons[$index]);
98
+			if($item instanceof HtmlButton && isset($icons[$index])) {
99
+							$item->addIcon($icons[$index]);
100
+			}
97 101
 		}
98 102
 		return $this;
99 103
 	}
Please login to merge, or discard this patch.