Completed
Push — master ( 701cf4...686575 )
by Jean-Christophe
03:12
created
Ajax/common/Widget.php 1 patch
Braces   +7 added lines, -5 removed lines patch added patch discarded remove patch
@@ -176,8 +176,9 @@  discard block
 block discarded – undo
176 176
 	 */
177 177
 	public function addItemInToolbar($caption,$icon=NULL,$callback=NULL){
178 178
 		$result=$this->addInToolbar($caption,$callback);
179
-		if(isset($icon))
180
-			$result->addIcon($icon);
179
+		if(isset($icon)) {
180
+					$result->addIcon($icon);
181
+		}
181 182
 		return $result;
182 183
 	}
183 184
 
@@ -191,7 +192,7 @@  discard block
 block discarded – undo
191 192
 			foreach ($items as $icon=>$item){
192 193
 				$this->addItemInToolbar($item,$icon,$callback);
193 194
 			}
194
-		}else{
195
+		} else{
195 196
 			foreach ($items as $item){
196 197
 				$this->addItemInToolbar($item,null,$callback);
197 198
 			}
@@ -342,8 +343,9 @@  discard block
 block discarded – undo
342 343
 	protected function _compileForm(JsUtils $js=NULL,&$view=NULL){
343 344
 		if(isset($this->_form)){
344 345
 			$noValidate="";
345
-			if(\sizeof($this->_form->getValidationParams())>0)
346
-				$noValidate="novalidate";
346
+			if(\sizeof($this->_form->getValidationParams())>0) {
347
+							$noValidate="novalidate";
348
+			}
347 349
 			$this->wrapContent("<form class='ui form' id='frm-".$this->identifier."' name='frm-".$this->identifier."' ".$noValidate.">","</form>");
348 350
 		}
349 351
 	}
Please login to merge, or discard this patch.
Ajax/semantic/widgets/base/FieldAsTrait.php 1 patch
Braces   +9 added lines, -7 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;
@@ -211,7 +213,7 @@  discard block
 block discarded – undo
211 213
 			foreach ($types as $type=>$attributes){
212 214
 				$this->fieldAs($i++,$type,$attributes);
213 215
 			}
214
-		}else{
216
+		} else{
215 217
 			foreach ($types as $type){
216 218
 				$this->fieldAs($i++,$type);
217 219
 			}
@@ -224,7 +226,7 @@  discard block
 block discarded – undo
224 226
 		if(\method_exists($this, $method)){
225 227
 			if(!\is_array($attributes)){
226 228
 				$attributes=[$index];
227
-			}else{
229
+			} else{
228 230
 				\array_unshift($attributes, $index);
229 231
 			}
230 232
 			\call_user_func_array([$this,$method], $attributes);
Please login to merge, or discard this patch.