Completed
Push — master ( 691772...2b1feb )
by Jean-Christophe
03:46
created
Ajax/common/components/SimpleComponent.php 1 patch
Braces   +11 added lines, -8 removed lines patch added patch discarded remove patch
@@ -28,9 +28,9 @@  discard block
 block discarded – undo
28 28
 			//echo $itemSelector.":::".$jsCode."<br>";
29 29
 			if($event=="execute"){
30 30
 				$this->jquery_code_for_compile []=$jsCode;
31
-			}else if($event=="beforeExecute"){
31
+			} else if($event=="beforeExecute"){
32 32
 				\array_unshift($this->jquery_code_for_compile, $jsCode);
33
-			}else{
33
+			} else{
34 34
 				$selector=$this->_createSelector($itemSelector, $this->attachTo);
35 35
 				$this->jquery_code_for_compile []="$( \"".$selector."\" ).on(\"".$event."\" , function( event, data ) {".$jsCode."});";
36 36
 			}
@@ -38,10 +38,12 @@  discard block
 block discarded – undo
38 38
 	}
39 39
 
40 40
 	protected function _createSelector($itemSelector,$selector){
41
-		if(!isset($itemSelector))
42
-			$itemSelector=$this->itemSelector;
43
-		if(isset($itemSelector) && $itemSelector!=="")
44
-			$selector.=" ".$itemSelector;
41
+		if(!isset($itemSelector)) {
42
+					$itemSelector=$this->itemSelector;
43
+		}
44
+		if(isset($itemSelector) && $itemSelector!=="") {
45
+					$selector.=" ".$itemSelector;
46
+		}
45 47
 		return $selector;
46 48
 	}
47 49
 
@@ -84,8 +86,9 @@  discard block
 block discarded – undo
84 86
 
85 87
 	protected function setParamCtrl($key, $value, $typeCtrl) {
86 88
 		if (\is_array($typeCtrl)) {
87
-			if (array_search($value, $typeCtrl)===false)
88
-				throw new \Exception("La valeur passée a propriété `".$key."` pour le composant `".$this->uiName."` ne fait pas partie des valeurs possibles : {".implode(",", $typeCtrl)."}");
89
+			if (array_search($value, $typeCtrl)===false) {
90
+							throw new \Exception("La valeur passée a propriété `".$key."` pour le composant `".$this->uiName."` ne fait pas partie des valeurs possibles : {".implode(",", $typeCtrl)."}");
91
+			}
89 92
 		} else {
90 93
 			if (!$typeCtrl($value)) {
91 94
 				throw new \Exception("La fonction ".$typeCtrl." a retourné faux pour l'affectation de la propriété ".$key." au composant ".$this->uiName);
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/menus/HtmlMenu.php 1 patch
Braces   +22 added lines, -17 removed lines patch added patch discarded remove patch
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
 	}
61 61
 
62 62
 	private function afterInsert($item) {
63
-		if (!$item instanceof HtmlMenu && $item->propertyContains("class", "header")===false)
64
-			$item->addToPropertyCtrl("class", "item", array ("item" ));
65
-		else {
63
+		if (!$item instanceof HtmlMenu && $item->propertyContains("class", "header")===false) {
64
+					$item->addToPropertyCtrl("class", "item", array ("item" ));
65
+		} else {
66 66
 			$this->setSecondary();
67 67
 		}
68 68
 		return $item;
@@ -77,8 +77,9 @@  discard block
 block discarded – undo
77 77
 	public function addItem($item) {
78 78
 		$number=$item;
79 79
 		$item=parent::addItem($this->getItemToInsert($item));
80
-		if(\is_int($number))
81
-			$item->setProperty("data-page", $number);
80
+		if(\is_int($number)) {
81
+					$item->setProperty("data-page", $number);
82
+		}
82 83
 		return $this->afterInsert($item);
83 84
 	}
84 85
 
@@ -151,10 +152,11 @@  discard block
 block discarded – undo
151 152
 	}
152 153
 
153 154
 	public function setSecondary($value=true) {
154
-		if($value)
155
-			$this->addToProperty("class", "secondary");
156
-		else
157
-			$this->removePropertyValue("class", "secondary");
155
+		if($value) {
156
+					$this->addToProperty("class", "secondary");
157
+		} else {
158
+					$this->removePropertyValue("class", "secondary");
159
+		}
158 160
 		return $this;
159 161
 	}
160 162
 
@@ -174,8 +176,9 @@  discard block
 block discarded – undo
174 176
 		$this->apply(function (HtmlDoubleElement &$item) {
175 177
 			$item->setTagName("a");
176 178
 		});
177
-		if ($vertical === true)
178
-			$this->setVertical();
179
+		if ($vertical === true) {
180
+					$this->setVertical();
181
+		}
179 182
 		return $this->addToProperty("class", "tabular");
180 183
 	}
181 184
 
@@ -204,10 +207,11 @@  discard block
 block discarded – undo
204 207
 	 */
205 208
 	public function fromDatabaseObject($object, $function) {
206 209
 		$return=$function($object);
207
-		if (\is_array($return))
208
-			$this->addItems($return);
209
-		else
210
-			$this->addItem($return);
210
+		if (\is_array($return)) {
211
+					$this->addItems($return);
212
+		} else {
213
+					$this->addItem($return);
214
+		}
211 215
 	}
212 216
 
213 217
 	/**
@@ -240,8 +244,9 @@  discard block
 block discarded – undo
240 244
 	}
241 245
 
242 246
 	public function run(JsUtils $js){
243
-		if($this->identifier!=="" && !isset($this->_bsComponent))
244
-			$this->onClick('if(!$(this).hasClass("dropdown")&&!$(this).hasClass("no-active")){$(this).addClass("active").siblings().removeClass("active");}',false,false);
247
+		if($this->identifier!=="" && !isset($this->_bsComponent)) {
248
+					$this->onClick('if(!$(this).hasClass("dropdown")&&!$(this).hasClass("no-active")){$(this).addClass("active").siblings().removeClass("active");}',false,false);
249
+		}
245 250
 		$result= parent::run($js);
246 251
 		return $result->setItemSelector(".item");
247 252
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/traits/FormTrait.php 1 patch
Braces   +12 added lines, -9 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 			foreach ($ajaxSubmit as $ajaxSubmitItem){
49 49
 				$compilation.=$ajaxSubmitItem->compile($js);
50 50
 			}
51
-		}elseif($ajaxSubmit instanceof AjaxCall){
51
+		} elseif($ajaxSubmit instanceof AjaxCall){
52 52
 			$compilation=$ajaxSubmit->compile($js);
53 53
 		}
54 54
 		$compilation=str_ireplace("\"","%quote%", $compilation);
@@ -66,8 +66,9 @@  discard block
 block discarded – undo
66 66
 
67 67
 	public function setAttached($value=true){
68 68
 		$form=$this->getForm();
69
-		if($value)
70
-			$form->addToPropertyCtrl("class", "attached", array ("attached" ));
69
+		if($value) {
70
+					$form->addToPropertyCtrl("class", "attached", array ("attached" ));
71
+		}
71 72
 		return $form;
72 73
 	}
73 74
 
@@ -89,10 +90,11 @@  discard block
 block discarded – undo
89 90
 	 */
90 91
 	public function submitOn($event,$identifierOrElement,$url,$responseElement,$parameters=NULL){
91 92
 		$form=$this->getForm();
92
-		if($identifierOrElement  instanceof BaseHtml)
93
-			$elem=$identifierOrElement;
94
-		else
95
-			$elem=$form->getElementById($identifierOrElement, $form->getContent());
93
+		if($identifierOrElement  instanceof BaseHtml) {
94
+					$elem=$identifierOrElement;
95
+		} else {
96
+					$elem=$form->getElementById($identifierOrElement, $form->getContent());
97
+		}
96 98
 		if(isset($elem)){
97 99
 			$this->_buttonAsSubmit($elem, $event,$url,$responseElement,$parameters);
98 100
 		}
@@ -120,8 +122,9 @@  discard block
 block discarded – undo
120 122
 	public function setSubmitParams($url,$responseElement=NULL,$parameters=NULL){
121 123
 		$form=$this->getForm();
122 124
 		$params=["form"=>$form->getIdentifier(),"responseElement"=>$responseElement,"url"=>$url,"stopPropagation"=>true];
123
-		if(\is_array($parameters))
124
-			$params=\array_merge($params,$parameters);
125
+		if(\is_array($parameters)) {
126
+					$params=\array_merge($params,$parameters);
127
+		}
125 128
 		$form->addValidationParam("_ajaxSubmit", new AjaxCall("postForm", $params));
126 129
 		return $this;
127 130
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/modules/HtmlDropdown.php 1 patch
Braces   +25 added lines, -18 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 		}
102 102
 		if(!$item instanceof HtmlDropdownItem){
103 103
 			$itemO=new HtmlDropdownItem("dd-item-".$this->identifier."-".\sizeof($this->items),$item,$value,$image,$description);
104
-		}elseif($itemO instanceof HtmlDropdownItem){
104
+		} elseif($itemO instanceof HtmlDropdownItem){
105 105
 			$this->addToProperty("class", "vertical");
106 106
 		}
107 107
 		return $itemO;
@@ -115,8 +115,9 @@  discard block
 block discarded – undo
115 115
 	}
116 116
 
117 117
 	public function addInput($name){
118
-		if(!isset($name))
119
-			$name="input-".$this->identifier;
118
+		if(!isset($name)) {
119
+					$name="input-".$this->identifier;
120
+		}
120 121
 		$this->setAction("activate");
121 122
 		$this->input=new HtmlInput($name,"hidden");
122 123
 	}
@@ -173,7 +174,7 @@  discard block
 block discarded – undo
173 174
 			foreach ($items as $k=>$v){
174 175
 				$this->addItem($v)->setData($k);
175 176
 			}
176
-		}else{
177
+		} else{
177 178
 			foreach ($items as $item){
178 179
 				$this->addItem($item);
179 180
 			}
@@ -197,7 +198,7 @@  discard block
 block discarded – undo
197 198
 		if($dropdown===false){
198 199
 			$this->_template=include dirname(__FILE__).'/../templates/tplDropdownMenu.php';
199 200
 			$dropdown="menu";
200
-		}else{
201
+		} else{
201 202
 			$dropdown="dropdown";
202 203
 			$this->mClass="menu";
203 204
 		}
@@ -218,20 +219,24 @@  discard block
 block discarded – undo
218 219
 
219 220
 	public function asButton($floating=false){
220 221
 		$this->removeArrow();
221
-		if($floating)
222
-			$this->addToProperty("class", "floating");
222
+		if($floating) {
223
+					$this->addToProperty("class", "floating");
224
+		}
223 225
 		$this->removePropertyValue("class", "selection");
224 226
 		return $this->addToProperty("class", "button");
225 227
 	}
226 228
 
227 229
 	public function asSelect($name=NULL,$multiple=false,$selection=true){
228
-		if(isset($name))
229
-			$this->addInput($name);
230
-		if($multiple)
231
-			$this->addToProperty("class", "multiple");
230
+		if(isset($name)) {
231
+					$this->addInput($name);
232
+		}
233
+		if($multiple) {
234
+					$this->addToProperty("class", "multiple");
235
+		}
232 236
 		if ($selection){
233
-			if($this->propertyContains("class", "button")===false)
234
-				$this->addToPropertyCtrl("class", "selection",array("selection"));
237
+			if($this->propertyContains("class", "button")===false) {
238
+							$this->addToPropertyCtrl("class", "selection",array("selection"));
239
+			}
235 240
 		}
236 241
 		return $this;
237 242
 	}
@@ -242,8 +247,9 @@  discard block
 block discarded – undo
242 247
 	}
243 248
 
244 249
 	public function setSelect($name=NULL,$multiple=false){
245
-		if(!isset($name))
246
-			$name="select-".$this->identifier;
250
+		if(!isset($name)) {
251
+					$name="select-".$this->identifier;
252
+		}
247 253
 		$this->input=null;
248 254
 		if($multiple){
249 255
 			$this->setProperty("multiple", true);
@@ -279,12 +285,13 @@  discard block
 block discarded – undo
279 285
 		$value=$this->value;
280 286
 		if(isset($this->input) && isset($value)){
281 287
 			$this->input->setProperty("value", $value);
282
-		}else{
288
+		} else{
283 289
 			$this->setProperty("value", $value);
284 290
 		}
285 291
 			$textElement=$this->getElementById("text-".$this->identifier, $this->content);
286
-			if(isset($textElement))
287
-				$textElement->setContent($value);
292
+			if(isset($textElement)) {
293
+							$textElement->setContent($value);
294
+			}
288 295
 		return $this;
289 296
 	}
290 297
 
Please login to merge, or discard this patch.
Ajax/semantic/html/elements/HtmlButtonGroups.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -17,8 +17,9 @@  discard block
 block discarded – undo
17 17
 	protected $_dropdown;
18 18
 	public function __construct($identifier, $elements=array(), $asIcons=false) {
19 19
 		parent::__construct($identifier, "div", "ui buttons");
20
-		if ($asIcons === true)
21
-			$this->asIcons();
20
+		if ($asIcons === true) {
21
+					$this->asIcons();
22
+		}
22 23
 		$this->addElements($elements, $asIcons);
23 24
 	}
24 25
 	protected function createItem($value){
@@ -39,8 +40,9 @@  discard block
 block discarded – undo
39 40
 
40 41
 	public function addElement($element, $asIcon=false) {
41 42
 		$item=$this->addItem($element);
42
-		if($asIcon)
43
-			$item->asIcon($element);
43
+		if($asIcon) {
44
+					$item->asIcon($element);
45
+		}
44 46
 		return $item;
45 47
 	}
46 48
 
@@ -68,8 +70,9 @@  discard block
 block discarded – undo
68 70
 
69 71
 	public function asIcons() {
70 72
 		foreach ( $this->content as $item ) {
71
-			if($item instanceof HtmlButton)
72
-			$item->asIcon($item->getContent());
73
+			if($item instanceof HtmlButton) {
74
+						$item->asIcon($item->getContent());
75
+			}
73 76
 		}
74 77
 		return $this->addToProperty("class", "icons");
75 78
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/table/HtmlTable.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -330,8 +330,9 @@  discard block
 block discarded – undo
330 330
 			$result= $this->getBody()->_addRow($result);
331 331
 		}
332 332
 		if(isset($this->_afterCompileEvents["onNewRow"])){
333
-			if(\is_callable($this->_afterCompileEvents["onNewRow"]))
334
-				$this->_afterCompileEvents["onNewRow"]($result,$object);
333
+			if(\is_callable($this->_afterCompileEvents["onNewRow"])) {
334
+							$this->_afterCompileEvents["onNewRow"]($result,$object);
335
+			}
335 336
 		}
336 337
 		return $result;
337 338
 	}
@@ -353,8 +354,9 @@  discard block
 block discarded – undo
353 354
 
354 355
 	public function run(JsUtils $js){
355 356
 		$result= parent::run($js);
356
-		if(isset($this->_footer))
357
-			$this->_footer->run($js);
357
+		if(isset($this->_footer)) {
358
+					$this->_footer->run($js);
359
+		}
358 360
 		return $result;
359 361
 	}
360 362
 
@@ -394,8 +396,9 @@  discard block
 block discarded – undo
394 396
 
395 397
 	public function setColWidth($colIndex,$width){
396 398
 		$part=$this->_getFirstPart();
397
-		if($part!==null && $part->count()>0)
398
-			$part->getCell(0, $colIndex)->setWidth($width);
399
+		if($part!==null && $part->count()>0) {
400
+					$part->getCell(0, $colIndex)->setWidth($width);
401
+		}
399 402
 		return $this;
400 403
 	}
401 404
 
Please login to merge, or discard this patch.
Ajax/semantic/widgets/datatable/DataTable.php 1 patch
Braces   +38 added lines, -26 removed lines patch added patch discarded remove patch
@@ -57,10 +57,12 @@  discard block
 block discarded – undo
57 57
 			$js->execOn("mouseover", "#".$this->identifier." tr", "$(event.target).closest('tr').find('.visibleover').css('visibility', 'visible');",["preventDefault"=>false,"stopPropagation"=>true]);
58 58
 			$js->execOn("mouseout", "#".$this->identifier." tr", "$(event.target).closest('tr').find('.visibleover').css('visibility', 'hidden');",["preventDefault"=>false,"stopPropagation"=>true]);
59 59
 		}
60
-		if(\is_array($this->_deleteBehavior))
61
-			$this->_generateBehavior("delete",$this->_deleteBehavior, $js);
62
-		if(\is_array($this->_editBehavior))
63
-			$this->_generateBehavior("edit",$this->_editBehavior,$js);
60
+		if(\is_array($this->_deleteBehavior)) {
61
+					$this->_generateBehavior("delete",$this->_deleteBehavior, $js);
62
+		}
63
+		if(\is_array($this->_editBehavior)) {
64
+					$this->_generateBehavior("edit",$this->_editBehavior,$js);
65
+		}
64 66
 		return parent::run($js);
65 67
 	}
66 68
 
@@ -93,12 +95,14 @@  discard block
 block discarded – undo
93 95
 			$table->setRowCount(0, \sizeof($captions));
94 96
 			$this->_generateHeader($table,$captions);
95 97
 
96
-			if(isset($this->_compileParts))
97
-				$table->setCompileParts($this->_compileParts);
98
+			if(isset($this->_compileParts)) {
99
+							$table->setCompileParts($this->_compileParts);
100
+			}
98 101
 
99 102
 			if(isset($this->_searchField) && isset($js)){
100
-				if(isset($this->_urls["refresh"]))
101
-					$this->_searchField->postOn("change", $this->_urls["refresh"],"{'s':$(this).val()}","#".$this->identifier." tbody",["preventDefault"=>false,"jqueryDone"=>"replaceWith"]);
103
+				if(isset($this->_urls["refresh"])) {
104
+									$this->_searchField->postOn("change", $this->_urls["refresh"],"{'s':$(this).val()}","#".$this->identifier." tbody",["preventDefault"=>false,"jqueryDone"=>"replaceWith"]);
105
+				}
102 106
 			}
103 107
 
104 108
 			$this->_generateContent($table);
@@ -123,8 +127,9 @@  discard block
 block discarded – undo
123 127
 	}
124 128
 
125 129
 	protected function _applyStyleAttributes($table){
126
-		if(isset($this->_hiddenColumns))
127
-			$this->_hideColumns();
130
+		if(isset($this->_hiddenColumns)) {
131
+					$this->_hideColumns();
132
+		}
128 133
 			if(isset($this->_colWidths)){
129 134
 				foreach ($this->_colWidths as $colIndex=>$width){
130 135
 					$table->setColWidth($colIndex,$width);
@@ -176,8 +181,9 @@  discard block
 block discarded – undo
176 181
 			$field=$ck->getField();
177 182
 			$field->setProperty("value",$id);
178 183
 			$field->setProperty("name", "selection[]");
179
-			if(isset($checkedClass))
180
-				$field->setClass($checkedClass);
184
+			if(isset($checkedClass)) {
185
+							$field->setClass($checkedClass);
186
+			}
181 187
 			\array_unshift($values, $ck);
182 188
 		}
183 189
 		$result=$table->newRow();
@@ -190,8 +196,9 @@  discard block
 block discarded – undo
190 196
 
191 197
 	protected function _generatePagination($table,$js=NULL){
192 198
 		if(isset($this->_toolbar)){
193
-			if($this->_toolbarPosition==PositionInTable::FOOTER)
194
-				$this->_toolbar->setFloated("left");
199
+			if($this->_toolbarPosition==PositionInTable::FOOTER) {
200
+							$this->_toolbar->setFloated("left");
201
+			}
195 202
 		}
196 203
 		$footer=$table->getFooter();
197 204
 		$footer->mergeCol();
@@ -210,8 +217,9 @@  discard block
 block discarded – undo
210 217
 
211 218
 	protected function _getFieldName($index){
212 219
 		$fieldName=parent::_getFieldName($index);
213
-		if(\is_object($fieldName))
214
-			$fieldName="field-".$index;
220
+		if(\is_object($fieldName)) {
221
+					$fieldName="field-".$index;
222
+		}
215 223
 		return $fieldName."[]";
216 224
 	}
217 225
 
@@ -251,7 +259,7 @@  discard block
 block discarded – undo
251 259
 		$hasPart=$table->hasPart($part);
252 260
 		if($hasPart){
253 261
 			$row=$table->getPart($part)->addRow(\sizeof($captions));
254
-		}else{
262
+		} else{
255 263
 			$row=$table->getPart($part)->getRow(0);
256 264
 		}
257 265
 		$row->mergeCol();
@@ -276,7 +284,7 @@  discard block
 block discarded – undo
276 284
 			$this->_urls["refresh"]=JArray::getValue($urls, "refresh",0);
277 285
 			$this->_urls["edit"]=JArray::getValue($urls, "edit",1);
278 286
 			$this->_urls["delete"]=JArray::getValue($urls, "delete",2);
279
-		}else{
287
+		} else{
280 288
 			$this->_urls=["refresh"=>$urls,"edit"=>$urls,"delete"=>$urls];
281 289
 		}
282 290
 		return $this;
@@ -350,8 +358,9 @@  discard block
 block discarded – undo
350 358
 
351 359
 	protected function getTargetSelector() {
352 360
 		$result=$this->_targetSelector;
353
-		if(!isset($result))
354
-			$result="#".$this->identifier;
361
+		if(!isset($result)) {
362
+					$result="#".$this->identifier;
363
+		}
355 364
 		return $result;
356 365
 	}
357 366
 
@@ -366,8 +375,9 @@  discard block
 block discarded – undo
366 375
 	}
367 376
 
368 377
 	public function getRefreshSelector() {
369
-		if(isset($this->_refreshSelector))
370
-			return $this->_refreshSelector;
378
+		if(isset($this->_refreshSelector)) {
379
+					return $this->_refreshSelector;
380
+		}
371 381
 		return "#".$this->identifier." tbody";
372 382
 	}
373 383
 
@@ -386,8 +396,9 @@  discard block
 block discarded – undo
386 396
 	 */
387 397
 	public function show($modelInstance){
388 398
 		if(\is_array($modelInstance)){
389
-			if(\is_array(array_values($modelInstance)[0]))
390
-				$modelInstance=\json_decode(\json_encode($modelInstance), FALSE);
399
+			if(\is_array(array_values($modelInstance)[0])) {
400
+							$modelInstance=\json_decode(\json_encode($modelInstance), FALSE);
401
+			}
391 402
 		}
392 403
 		$this->_modelInstance=$modelInstance;
393 404
 	}
@@ -427,8 +438,9 @@  discard block
 block discarded – undo
427 438
 	}
428 439
 
429 440
 	public function hideColumn($colIndex){
430
-		if(!\is_array($this->_hiddenColumns))
431
-			$this->_hiddenColumns=[];
441
+		if(!\is_array($this->_hiddenColumns)) {
442
+					$this->_hiddenColumns=[];
443
+		}
432 444
 		$this->_hiddenColumns[]=$colIndex;
433 445
 		return $this;
434 446
 	}
Please login to merge, or discard this patch.
Ajax/semantic/html/content/table/HtmlTableContent.php 1 patch
Braces   +12 added lines, -8 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
 
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/table/traits/TableTrait.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,15 +22,17 @@
 block discarded – undo
22 22
 
23 23
 	public function setBasic($very=false) {
24 24
 		$table=$this->_self;
25
-		if ($very)
26
-			$table->addToPropertyCtrl("class", "very", array ("very" ));
25
+		if ($very) {
26
+					$table->addToPropertyCtrl("class", "very", array ("very" ));
27
+		}
27 28
 		return $table->addToPropertyCtrl("class", "basic", array ("basic" ));
28 29
 	}
29 30
 
30 31
 	public function setCompact($very=false) {
31 32
 		$table=$this->_self;
32
-		if ($very)
33
-			$table->addToPropertyCtrl("class", "very", array ("very" ));
33
+		if ($very) {
34
+					$table->addToPropertyCtrl("class", "very", array ("very" ));
35
+		}
34 36
 		return $table->addToPropertyCtrl("class", "compact", array ("compact" ));
35 37
 	}
36 38
 
Please login to merge, or discard this patch.