Completed
Push — master ( 489615...9fed17 )
by Jean-Christophe
03:15
created
Ajax/semantic/html/collections/form/HtmlForm.php 1 patch
Braces   +25 added lines, -17 removed lines patch added patch discarded remove patch
@@ -52,8 +52,9 @@  discard block
 block discarded – undo
52 52
 	 */
53 53
 	public function addHeader($title, $niveau=1, $dividing=true) {
54 54
 		$header=new HtmlHeader("", $niveau, $title);
55
-		if ($dividing)
56
-			$header->setDividing();
55
+		if ($dividing) {
56
+					$header->setDividing();
57
+		}
57 58
 		return $this->addItem($header);
58 59
 	}
59 60
 
@@ -74,14 +75,16 @@  discard block
 block discarded – undo
74 75
 					if (\is_string($end)) {
75 76
 						$label=$end;
76 77
 						\array_pop($fields);
77
-					} else
78
-						$label=NULL;
78
+					} else {
79
+											$label=NULL;
80
+					}
79 81
 				}
80 82
 				$this->_fields=\array_merge($this->_fields, $fields);
81 83
 				$fields=new HtmlFormFields("fields-" . $this->identifier . "-" . $this->count(), $fields);
82 84
 			}
83
-			if (isset($label))
84
-				$fields=new HtmlFormField("", $fields, $label);
85
+			if (isset($label)) {
86
+							$fields=new HtmlFormField("", $fields, $label);
87
+			}
85 88
 		} else {
86 89
 			$fields=new HtmlFormFields("fields-" . $this->identifier . "-" . $this->count());
87 90
 		}
@@ -134,27 +137,31 @@  discard block
 block discarded – undo
134 137
 	 */
135 138
 	public function addMessage($identifier, $content, $header=NULL, $icon=NULL, $type=NULL) {
136 139
 		$message=new HtmlMessage($identifier, $content);
137
-		if (isset($header))
138
-			$message->addHeader($header);
139
-		if (isset($icon))
140
-			$message->setIcon($icon);
141
-		if (isset($type))
142
-			$message->setStyle($type);
140
+		if (isset($header)) {
141
+					$message->addHeader($header);
142
+		}
143
+		if (isset($icon)) {
144
+					$message->setIcon($icon);
145
+		}
146
+		if (isset($type)) {
147
+					$message->setStyle($type);
148
+		}
143 149
 		return $this->addItem($message);
144 150
 	}
145 151
 
146 152
 
147 153
 
148 154
 	public function compile(JsUtils $js=NULL,&$view=NULL){
149
-		if(\sizeof($this->_validationParams)>0)
150
-			$this->setProperty("novalidate", "");
155
+		if(\sizeof($this->_validationParams)>0) {
156
+					$this->setProperty("novalidate", "");
157
+		}
151 158
 		return parent::compile($js,$view);
152 159
 	}
153 160
 
154 161
 	public function run(JsUtils $js) {
155 162
 		if(isset($js)){
156 163
 			$compo=$js->semantic()->form("#".$this->identifier);
157
-		}else{
164
+		} else{
158 165
 			$compo=new Form();
159 166
 			$compo->attach("#".$this->identifier);
160 167
 		}
@@ -167,8 +174,9 @@  discard block
 block discarded – undo
167 174
 			if($field instanceof HtmlFormFields){
168 175
 				$items=$field->getItems();
169 176
 				foreach ($items as $_field){
170
-					if($_field instanceof HtmlFormField)
171
-						$compo=$this->addCompoValidation($compo, $_field);
177
+					if($_field instanceof HtmlFormField) {
178
+											$compo=$this->addCompoValidation($compo, $_field);
179
+					}
172 180
 				}
173 181
 			}
174 182
 		}
Please login to merge, or discard this patch.
Ajax/semantic/widgets/base/FieldAsTrait.php 1 patch
Braces   +14 added lines, -11 removed lines patch added patch discarded remove patch
@@ -57,8 +57,7 @@  discard block
 block discarded – undo
57 57
 			$rules=$attributes["rules"];
58 58
 			if(\is_array($rules)){
59 59
 				$element->addRules($rules);
60
-			}
61
-			else{
60
+			} else{
62 61
 				$element->addRule($rules);
63 62
 			}
64 63
 			unset($attributes["rules"]);
@@ -118,8 +117,9 @@  discard block
 block discarded – undo
118 117
 	public function fieldAsHeader($index,$niveau=1,$icon=NULL,$attributes=NULL){
119 118
 		return $this->_fieldAs(function($id,$name,$value) use($niveau,$icon){
120 119
 			$header=new HtmlHeader($id,$niveau,$value);
121
-			if(isset($icon))
122
-				$header->asIcon($icon, $value);
120
+			if(isset($icon)) {
121
+							$header->asIcon($icon, $value);
122
+			}
123 123
 			return $header;
124 124
 		}, $index,$attributes,"header");
125 125
 	}
@@ -127,7 +127,9 @@  discard block
 block discarded – undo
127 127
 
128 128
 	public function fieldAsImage($index,$size=Size::MINI,$circular=false){
129 129
 		$this->setValueFunction($index,function($img) use($size,$circular){
130
-			$image=new HtmlImage($this->_getFieldIdentifier("image"),$img);$image->setSize($size);if($circular)$image->setCircular();
130
+			$image=new HtmlImage($this->_getFieldIdentifier("image"),$img);$image->setSize($size);if($circular) {
131
+				$image->setCircular();
132
+			}
131 133
 			return $image;
132 134
 		});
133 135
 			return $this;
@@ -209,12 +211,13 @@  discard block
 block discarded – undo
209 211
 		$i=0;
210 212
 		if(JArray::isAssociative($types)){
211 213
 			foreach ($types as $type=>$attributes){
212
-				if(\is_int($type))
213
-					$this->fieldAs($i++,$attributes,[]);
214
-				else
215
-					$this->fieldAs($i++,$type,$attributes);
214
+				if(\is_int($type)) {
215
+									$this->fieldAs($i++,$attributes,[]);
216
+				} else {
217
+									$this->fieldAs($i++,$type,$attributes);
218
+				}
216 219
 			}
217
-		}else{
220
+		} else{
218 221
 			foreach ($types as $type){
219 222
 				$this->fieldAs($i++,$type);
220 223
 			}
@@ -226,7 +229,7 @@  discard block
 block discarded – undo
226 229
 		if(\method_exists($this, $method)){
227 230
 			if(!\is_array($attributes)){
228 231
 				$attributes=[$index];
229
-			}else{
232
+			} else{
230 233
 				\array_unshift($attributes, $index);
231 234
 			}
232 235
 			\call_user_func_array([$this,$method], $attributes);
Please login to merge, or discard this patch.
Ajax/semantic/html/base/traits/BaseTrait.php 1 patch
Braces   +21 added lines, -14 removed lines patch added patch discarded remove patch
@@ -45,8 +45,9 @@  discard block
 block discarded – undo
45 45
 
46 46
 	public function setVariations($variations) {
47 47
 		$this->setProperty("class", $this->_baseClass);
48
-		if (\is_string($variations))
49
-			$variations=\explode(" ", $variations);
48
+		if (\is_string($variations)) {
49
+					$variations=\explode(" ", $variations);
50
+		}
50 51
 		foreach ( $variations as $variation ) {
51 52
 			$this->addVariation($variation);
52 53
 		}
@@ -59,8 +60,9 @@  discard block
 block discarded – undo
59 60
 	}
60 61
 
61 62
 	public function addVariations($variations=array()) {
62
-		if (\is_string($variations))
63
-			$variations=\explode(" ", $variations);
63
+		if (\is_string($variations)) {
64
+					$variations=\explode(" ", $variations);
65
+		}
64 66
 		foreach ( $variations as $variation ) {
65 67
 			$this->addVariation($variation);
66 68
 		}
@@ -68,8 +70,9 @@  discard block
 block discarded – undo
68 70
 	}
69 71
 
70 72
 	public function addStates($states=array()) {
71
-		if (\is_string($states))
72
-			$states=\explode(" ", $states);
73
+		if (\is_string($states)) {
74
+					$states=\explode(" ", $states);
75
+		}
73 76
 		foreach ( $states as $state ) {
74 77
 			$this->addState($state);
75 78
 		}
@@ -78,8 +81,9 @@  discard block
 block discarded – undo
78 81
 
79 82
 	public function setStates($states) {
80 83
 		$this->setProperty("class", $this->_baseClass);
81
-		if (\is_string($states))
82
-			$states=\explode(" ", $states);
84
+		if (\is_string($states)) {
85
+					$states=\explode(" ", $states);
86
+		}
83 87
 		foreach ( $states as $state ) {
84 88
 			$this->addState($state);
85 89
 		}
@@ -111,8 +115,9 @@  discard block
 block discarded – undo
111 115
 	 * @return \Ajax\semantic\html\elements\HtmlSemDoubleElement
112 116
 	 */
113 117
 	public function setDisabled($disable=true) {
114
-		if($disable)
115
-			$this->addToProperty("class", "disabled");
118
+		if($disable) {
119
+					$this->addToProperty("class", "disabled");
120
+		}
116 121
 		return $this;
117 122
 	}
118 123
 
@@ -146,14 +151,16 @@  discard block
 block discarded – undo
146 151
 	 * @return \Ajax\semantic\html\base\HtmlSemDoubleElement
147 152
 	 */
148 153
 	public function setActive($value=true){
149
-		if($value)
150
-			$this->addToProperty("class", "active");
154
+		if($value) {
155
+					$this->addToProperty("class", "active");
156
+		}
151 157
 		return $this;
152 158
 	}
153 159
 
154 160
 	public function setAttached($value=true){
155
-		if($value)
156
-			$this->addToPropertyCtrl("class", "attached", array ("attached" ));
161
+		if($value) {
162
+					$this->addToPropertyCtrl("class", "attached", array ("attached" ));
163
+		}
157 164
 		return $this;
158 165
 	}
159 166
 
Please login to merge, or discard this patch.
Ajax/semantic/html/collections/form/traits/FormTrait.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,8 +42,9 @@  discard block
 block discarded – undo
42 42
 
43 43
 	public function setAttached($value=true){
44 44
 		$form=$this->getForm();
45
-		if($value)
46
-			$form->addToPropertyCtrl("class", "attached", array ("attached" ));
45
+		if($value) {
46
+					$form->addToPropertyCtrl("class", "attached", array ("attached" ));
47
+		}
47 48
 		return $form;
48 49
 	}
49 50
 
@@ -85,8 +86,9 @@  discard block
 block discarded – undo
85 86
 		if(isset($url) && isset($responseElement)){
86 87
 			$button->addEvent($event, "$('#".$form->getIdentifier()."').form('validate form');");
87 88
 			$params=["form"=>$form->getIdentifier(),"responseElement"=>$responseElement,"url"=>$url];
88
-			if(\is_array($parameters))
89
-				$params=\array_merge($params,$parameters);
89
+			if(\is_array($parameters)) {
90
+							$params=\array_merge($params,$parameters);
91
+			}
90 92
 			$form->addValidationParam("_ajaxSubmit", new AjaxCall("postForm", $params));
91 93
 		}
92 94
 		return $button;
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
@@ -17,15 +17,17 @@
 block discarded – undo
17 17
 
18 18
 	public function setBasic($very=false) {
19 19
 		$table=$this->getTable();
20
-		if ($very)
21
-			$table->addToPropertyCtrl("class", "very", array ("very" ));
20
+		if ($very) {
21
+					$table->addToPropertyCtrl("class", "very", array ("very" ));
22
+		}
22 23
 		return $table->addToPropertyCtrl("class", "basic", array ("basic" ));
23 24
 	}
24 25
 
25 26
 	public function setCompact($very=false) {
26 27
 		$table=$this->getTable();
27
-		if ($very)
28
-			$table->addToPropertyCtrl("class", "very", array ("very" ));
28
+		if ($very) {
29
+					$table->addToPropertyCtrl("class", "very", array ("very" ));
30
+		}
29 31
 		return $table->addToPropertyCtrl("class", "compact", array ("compact" ));
30 32
 	}
31 33
 
Please login to merge, or discard this patch.
Ajax/Jquery.php 1 patch
Braces   +20 added lines, -13 removed lines patch added patch discarded remove patch
@@ -136,10 +136,12 @@  discard block
 block discarded – undo
136 136
 		if (isset($param)) {
137 137
 			$param=Javascript::prep_value($param);
138 138
 			$str="$({$element}).{$jQueryCall}({$param});";
139
-		} else
140
-			$str="$({$element}).{$jQueryCall}();";
141
-			if ($immediatly)
142
-				$this->jquery_code_for_compile[]=$str;
139
+		} else {
140
+					$str="$({$element}).{$jQueryCall}();";
141
+		}
142
+			if ($immediatly) {
143
+							$this->jquery_code_for_compile[]=$str;
144
+			}
143 145
 			return $str;
144 146
 	}
145 147
 	/**
@@ -154,8 +156,9 @@  discard block
 block discarded – undo
154 156
 		$to=Javascript::prep_element($to);
155 157
 		$element=Javascript::prep_element($element);
156 158
 		$str="$({$to}).{$jQueryCall}({$element});";
157
-		if ($immediatly)
158
-			$this->jquery_code_for_compile[]=$str;
159
+		if ($immediatly) {
160
+					$this->jquery_code_for_compile[]=$str;
161
+		}
159 162
 			return $str;
160 163
 	}
161 164
 
@@ -211,12 +214,14 @@  discard block
 block discarded – undo
211 214
 		if ($stopPropagation===true) {
212 215
 			$js=Javascript::$stopPropagation.$js;
213 216
 		}
214
-		if (array_search($event, $this->jquery_events)===false)
215
-			$event="\n\t$(".Javascript::prep_element($element).").bind('{$event}',function(event){\n\t\t{$js}\n\t});\n";
216
-		else
217
-			$event="\n\t$(".Javascript::prep_element($element).").{$event}(function(event){\n\t\t{$js}\n\t});\n";
218
-		if($immediatly)
219
-			$this->jquery_code_for_compile[]=$event;
217
+		if (array_search($event, $this->jquery_events)===false) {
218
+					$event="\n\t$(".Javascript::prep_element($element).").bind('{$event}',function(event){\n\t\t{$js}\n\t});\n";
219
+		} else {
220
+					$event="\n\t$(".Javascript::prep_element($element).").{$event}(function(event){\n\t\t{$js}\n\t});\n";
221
+		}
222
+		if($immediatly) {
223
+					$this->jquery_code_for_compile[]=$event;
224
+		}
220 225
 		return $event;
221 226
 	}
222 227
 
@@ -301,7 +306,9 @@  discard block
 block discarded – undo
301 306
 	}
302 307
 
303 308
 	private function minify($input) {
304
-	if(trim($input) === "") return $input;
309
+	if(trim($input) === "") {
310
+		return $input;
311
+	}
305 312
 	return preg_replace(
306 313
 			array(
307 314
 					// Remove comment(s)
Please login to merge, or discard this patch.
Ajax/semantic/widgets/datatable/DataTable.php 1 patch
Braces   +29 added lines, -20 removed lines patch added patch discarded remove patch
@@ -50,10 +50,12 @@  discard block
 block discarded – undo
50 50
 			$js->execOn("mouseover", "#".$this->identifier." tr", "$(event.target).closest('tr').find('.visibleover').css('visibility', 'visible');",["preventDefault"=>false,"stopPropagation"=>true]);
51 51
 			$js->execOn("mouseout", "#".$this->identifier." tr", "$(event.target).closest('tr').find('.visibleover').css('visibility', 'hidden');",["preventDefault"=>false,"stopPropagation"=>true]);
52 52
 		}
53
-		if($this->_hasDelete)
54
-			$this->_generateBehavior("delete", $js);
55
-		if($this->_hasEdit)
56
-			$this->_generateBehavior("edit", $js);
53
+		if($this->_hasDelete) {
54
+					$this->_generateBehavior("delete", $js);
55
+		}
56
+		if($this->_hasEdit) {
57
+					$this->_generateBehavior("edit", $js);
58
+		}
57 59
 		return parent::run($js);
58 60
 	}
59 61
 
@@ -76,8 +78,9 @@  discard block
 block discarded – undo
76 78
 	}
77 79
 
78 80
 	protected function _generateBehavior($op,JsUtils $js){
79
-		if(isset($this->_urls[$op]))
80
-			$js->getOnClick("#".$this->identifier." .".$op, $this->_urls[$op],$this->getTargetSelector(),["preventDefault"=>false,"attr"=>"data-ajax"]);
81
+		if(isset($this->_urls[$op])) {
82
+					$js->getOnClick("#".$this->identifier." .".$op, $this->_urls[$op],$this->getTargetSelector(),["preventDefault"=>false,"attr"=>"data-ajax"]);
83
+		}
81 84
 	}
82 85
 
83 86
 	/**
@@ -102,12 +105,14 @@  discard block
 block discarded – undo
102 105
 
103 106
 			$table->setRowCount(0, \sizeof($captions));
104 107
 			$table->setHeaderValues($captions);
105
-			if(isset($this->_compileParts))
106
-				$table->setCompileParts($this->_compileParts);
108
+			if(isset($this->_compileParts)) {
109
+							$table->setCompileParts($this->_compileParts);
110
+			}
107 111
 
108 112
 			if(isset($this->_searchField) && isset($js)){
109
-				if(isset($this->_urls["refresh"]))
110
-					$this->_searchField->postOn("change", $this->_urls["refresh"],"{'s':$(this).val()}","#".$this->identifier." tbody",["preventDefault"=>false,"jqueryDone"=>"replaceWith"]);
113
+				if(isset($this->_urls["refresh"])) {
114
+									$this->_searchField->postOn("change", $this->_urls["refresh"],"{'s':$(this).val()}","#".$this->identifier." tbody",["preventDefault"=>false,"jqueryDone"=>"replaceWith"]);
115
+				}
111 116
 			}
112 117
 
113 118
 			$this->_generateContent($table);
@@ -132,8 +137,9 @@  discard block
 block discarded – undo
132 137
 	private function _generateMainCheckbox(&$captions){
133 138
 		$ck=new HtmlCheckbox("main-ck-".$this->identifier,"");
134 139
 		$checkedMessageCall="";
135
-		if($this->_hasCheckedMessage)
136
-			$checkedMessageCall="updateChecked();";
140
+		if($this->_hasCheckedMessage) {
141
+					$checkedMessageCall="updateChecked();";
142
+		}
137 143
 		$ck->setOnChecked("$('#".$this->identifier." [name=%quote%selection[]%quote%]').prop('checked',true);".$checkedMessageCall);
138 144
 		$ck->setOnUnchecked("$('#".$this->identifier." [name=%quote%selection[]%quote%]').prop('checked',false);".$checkedMessageCall);
139 145
 		\array_unshift($captions, $ck);
@@ -170,8 +176,9 @@  discard block
 block discarded – undo
170 176
 		$menu->floatRight();
171 177
 		$menu->setActiveItem($this->_pagination->getPage()-1);
172 178
 		$footer->setValues($menu);
173
-		if(isset($this->_urls["refresh"]))
174
-			$menu->postOnClick($this->_urls["refresh"],"{'p':$(this).attr('data-page')}","#".$this->identifier." tbody",["preventDefault"=>false,"jqueryDone"=>"replaceWith"]);
179
+		if(isset($this->_urls["refresh"])) {
180
+					$menu->postOnClick($this->_urls["refresh"],"{'p':$(this).attr('data-page')}","#".$this->identifier." tbody",["preventDefault"=>false,"jqueryDone"=>"replaceWith"]);
181
+		}
175 182
 	}
176 183
 
177 184
 	protected function _getFieldName($index){
@@ -214,7 +221,7 @@  discard block
 block discarded – undo
214 221
 		$hasPart=$table->hasPart($part);
215 222
 		if($hasPart){
216 223
 			$row=$table->getPart($part)->addRow(\sizeof($captions));
217
-		}else{
224
+		} else{
218 225
 			$row=$table->getPart($part)->getRow(0);
219 226
 		}
220 227
 		$row->mergeCol();
@@ -239,7 +246,7 @@  discard block
 block discarded – undo
239 246
 			$this->_urls["refresh"]=JArray::getValue($urls, "refresh",0);
240 247
 			$this->_urls["edit"]=JArray::getValue($urls, "edit",1);
241 248
 			$this->_urls["delete"]=JArray::getValue($urls, "delete",2);
242
-		}else{
249
+		} else{
243 250
 			$this->_urls=["refresh"=>$urls,"edit"=>$urls,"delete"=>$urls];
244 251
 		}
245 252
 		return $this;
@@ -295,8 +302,9 @@  discard block
 block discarded – undo
295 302
 
296 303
 	protected function getTargetSelector() {
297 304
 		$result=$this->_targetSelector;
298
-		if(!isset($result))
299
-			$result="#".$this->identifier;
305
+		if(!isset($result)) {
306
+					$result="#".$this->identifier;
307
+		}
300 308
 		return $result;
301 309
 	}
302 310
 
@@ -334,8 +342,9 @@  discard block
 block discarded – undo
334 342
 	 * @param callable $callback
335 343
 	 */
336 344
 	public function addCountCheckedInToolbar(array $checkedMessage=null,$callback=null){
337
-		if(isset($checkedMessage))
338
-			$this->_checkedMessage=$checkedMessage;
345
+		if(isset($checkedMessage)) {
346
+					$this->_checkedMessage=$checkedMessage;
347
+		}
339 348
 		$checkedMessage=$this->getCheckedMessage();
340 349
 		$this->_hasCheckboxes=true;
341 350
 		$this->_hasCheckedMessage=true;
Please login to merge, or discard this patch.
Ajax/semantic/widgets/datatable/DataTableFieldAsTrait.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -57,8 +57,9 @@  discard block
 block discarded – undo
57 57
 	 */
58 58
 	private function getFieldButton($caption,$visibleHover=true){
59 59
 		$bt= new HtmlButton("",$caption);
60
-		if($visibleHover)
61
-			$this->_visibleOver($bt);
60
+		if($visibleHover) {
61
+					$this->_visibleOver($bt);
62
+		}
62 63
 			return $bt;
63 64
 	}
64 65
 
@@ -75,8 +76,9 @@  discard block
 block discarded – undo
75 76
 		return $this->_fieldAs(function($id,$name,$value,$caption) use ($url,$responseElement,$cssStyle,$index,$attributes){
76 77
 			$button=new HtmlButton($id,$value,$cssStyle);
77 78
 			$button->postOnClick($url,"$(event.target).closest('tr').find(':input').serialize()",$responseElement,$attributes["ajax"]);
78
-			if(!isset($attributes["visibleHover"]) || $attributes["visibleHover"])
79
-				$this->_visibleOver($button);
79
+			if(!isset($attributes["visibleHover"]) || $attributes["visibleHover"]) {
80
+							$this->_visibleOver($button);
81
+			}
80 82
 				return $button;
81 83
 		}, $index,$attributes);
82 84
 	}
@@ -135,8 +137,9 @@  discard block
 block discarded – undo
135 137
 	private function getDefaultButton($icon,$class=null,$visibleHover=true){
136 138
 		$bt=$this->getFieldButton("",$visibleHover);
137 139
 		$bt->asIcon($icon);
138
-		if(isset($class))
139
-			$bt->addClass($class);
140
+		if(isset($class)) {
141
+					$bt->addClass($class);
142
+		}
140 143
 			return $bt;
141 144
 	}
142 145
 
Please login to merge, or discard this patch.
Ajax/common/html/traits/BaseHtmlPropertiesTrait.php 1 patch
Braces   +17 added lines, -12 removed lines patch added patch discarded remove patch
@@ -33,8 +33,9 @@  discard block
 block discarded – undo
33 33
 	}
34 34
 
35 35
 	public function getProperty($name) {
36
-		if (array_key_exists($name, $this->properties))
37
-			return $this->properties[$name];
36
+		if (array_key_exists($name, $this->properties)) {
37
+					return $this->properties[$name];
38
+		}
38 39
 	}
39 40
 
40 41
 	public function addToProperty($name, $value, $separator=" ") {
@@ -44,10 +45,11 @@  discard block
 block discarded – undo
44 45
 			}
45 46
 		} else if ($value !== "" && $this->propertyContains($name, $value) === false) {
46 47
 			$v=@$this->properties[$name];
47
-			if (isset($v) && $v !== "")
48
-				$v=$v . $separator . $value;
49
-				else
50
-					$v=$value;
48
+			if (isset($v) && $v !== "") {
49
+							$v=$v . $separator . $value;
50
+			} else {
51
+									$v=$value;
52
+				}
51 53
 
52 54
 					return $this->setProperty($name, $v);
53 55
 		}
@@ -70,8 +72,9 @@  discard block
 block discarded – undo
70 72
 	}
71 73
 
72 74
 	protected function addToPropertyUnique($name, $value, $typeCtrl) {
73
-		if (@class_exists($typeCtrl, true))
74
-			$typeCtrl=$typeCtrl::getConstants();
75
+		if (@class_exists($typeCtrl, true)) {
76
+					$typeCtrl=$typeCtrl::getConstants();
77
+		}
75 78
 			if (\is_array($typeCtrl)) {
76 79
 				$this->removeOldValues($this->properties[$name], $typeCtrl);
77 80
 			}
@@ -90,8 +93,9 @@  discard block
 block discarded – undo
90 93
 	}
91 94
 
92 95
 	public function removeProperty($name) {
93
-		if (\array_key_exists($name, $this->properties))
94
-			unset($this->properties[$name]);
96
+		if (\array_key_exists($name, $this->properties)) {
97
+					unset($this->properties[$name]);
98
+		}
95 99
 			return $this;
96 100
 	}
97 101
 
@@ -104,8 +108,9 @@  discard block
 block discarded – undo
104 108
 	}
105 109
 
106 110
 	protected function setPropertyCtrl($name, $value, $typeCtrl) {
107
-		if ($this->ctrl($name, $value, $typeCtrl) === true)
108
-			return $this->setProperty($name, $value);
111
+		if ($this->ctrl($name, $value, $typeCtrl) === true) {
112
+					return $this->setProperty($name, $value);
113
+		}
109 114
 			return $this;
110 115
 	}
111 116
 
Please login to merge, or discard this patch.