Completed
Push — master ( 6831db...b65ced )
by Jean-Christophe
03:10
created
Ajax/common/Widget.php 1 patch
Braces   +7 added lines, -5 removed lines patch added patch discarded remove patch
@@ -186,8 +186,9 @@  discard block
 block discarded – undo
186 186
 	 */
187 187
 	public function addItemInToolbar($caption,$icon=NULL,$callback=NULL){
188 188
 		$result=$this->addInToolbar($caption,$callback);
189
-		if(isset($icon))
190
-			$result->addIcon($icon);
189
+		if(isset($icon)) {
190
+					$result->addIcon($icon);
191
+		}
191 192
 		return $result;
192 193
 	}
193 194
 
@@ -201,7 +202,7 @@  discard block
 block discarded – undo
201 202
 			foreach ($items as $icon=>$item){
202 203
 				$this->addItemInToolbar($item,$icon,$callback);
203 204
 			}
204
-		}else{
205
+		} else{
205 206
 			foreach ($items as $item){
206 207
 				$this->addItemInToolbar($item,null,$callback);
207 208
 			}
@@ -352,8 +353,9 @@  discard block
 block discarded – undo
352 353
 	protected function _compileForm(){
353 354
 		if(isset($this->_form)){
354 355
 			$noValidate="";
355
-			if(\sizeof($this->_form->getValidationParams())>0)
356
-				$noValidate="novalidate";
356
+			if(\sizeof($this->_form->getValidationParams())>0) {
357
+							$noValidate="novalidate";
358
+			}
357 359
 			$this->wrapContent("<form class='ui form' id='frm-".$this->identifier."' name='frm-".$this->identifier."' ".$noValidate.">","</form>");
358 360
 		}
359 361
 	}
Please login to merge, or discard this patch.
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/semantic/widgets/base/InstanceViewer.php 1 patch
Braces   +42 added lines, -37 removed lines patch added patch discarded remove patch
@@ -21,8 +21,9 @@  discard block
 block discarded – undo
21 21
 		$this->widgetIdentifier=$identifier;
22 22
 		$this->values=[];
23 23
 		$this->afterCompile=[];
24
-		if(isset($instance))
25
-			$this->setInstance($instance);
24
+		if(isset($instance)) {
25
+					$this->setInstance($instance);
26
+		}
26 27
 		$this->setCaptions($captions);
27 28
 		$this->captionCallback=NULL;
28 29
 		$this->defaultValueFunction=function($name,$value){return $value;};
@@ -39,11 +40,13 @@  discard block
 block discarded – undo
39 40
 	}
40 41
 
41 42
 	public function getIdentifier($index=NULL){
42
-		if(!isset($index))
43
-			$index=self::$index;
43
+		if(!isset($index)) {
44
+					$index=self::$index;
45
+		}
44 46
 		$value=$index;
45
-		if(isset($this->values["identifier"]))
46
-			$value=$this->values["identifier"]($index,$this->instance);
47
+		if(isset($this->values["identifier"])) {
48
+					$value=$this->values["identifier"]($index,$this->instance);
49
+		}
47 50
 		return $value;
48 51
 	}
49 52
 
@@ -67,22 +70,21 @@  discard block
 block discarded – undo
67 70
 			$value=$property->getValue($this->instance);
68 71
 			if(isset($this->values[$index])){
69 72
 				$value= $this->values[$index]($value,$this->instance,$index);
70
-			}else{
73
+			} else{
71 74
 				$value=$this->_getDefaultValue($property->getName(),$value, $index);
72 75
 			}
73
-		}else{
74
-			if(\is_callable($property))
75
-				$value=$property($this->instance);
76
-			elseif(\is_array($property)){
76
+		} else{
77
+			if(\is_callable($property)) {
78
+							$value=$property($this->instance);
79
+			} elseif(\is_array($property)){
77 80
 				$values=\array_map(function($v) use ($index){return $this->_getValue($v, $index);}, $property);
78 81
 				$value=\implode("", $values);
79
-			}else{
82
+			} else{
80 83
 				if(isset($this->values[$index])){
81 84
 					$value= $this->values[$index]($property,$this->instance,$index);
82
-				}elseif(isset($this->instance->{$property})){
85
+				} elseif(isset($this->instance->{$property})){
83 86
 					$value=$this->instance->{$property};
84
-				}
85
-				else{
87
+				} else{
86 88
 					$value=null;
87 89
 				}
88 90
 			}
@@ -105,10 +107,10 @@  discard block
 block discarded – undo
105 107
 		if(isset($vb[$index])){
106 108
 			if(\is_array($vb[$index])){
107 109
 				$this->visibleProperties[$index][]=$field;
108
-			}else{
110
+			} else{
109 111
 				$this->visibleProperties[$index]=[$vb[$index],$field];
110 112
 			}
111
-		}else{
113
+		} else{
112 114
 			return $this->insertField($index, $field);
113 115
 		}
114 116
 		return $this;
@@ -135,9 +137,9 @@  discard block
 block discarded – undo
135 137
 		$property=$this->getProperty($index);
136 138
 		if($property instanceof \ReflectionProperty){
137 139
 			$result=$property->getName();
138
-		}elseif(\is_callable($property)){
140
+		} elseif(\is_callable($property)){
139 141
 			$result=$this->visibleProperties[$index];
140
-		}else{
142
+		} else{
141 143
 			$result=$property;
142 144
 		}
143 145
 		return $result;
@@ -157,7 +159,7 @@  discard block
 block discarded – undo
157 159
 		$this->reflect=new \ReflectionClass($instance);
158 160
 		if(\sizeof($this->visibleProperties)===0){
159 161
 			$this->properties=$this->getDefaultProperties();
160
-		}else{
162
+		} else{
161 163
 			foreach ($this->visibleProperties as $property){
162 164
 				$this->setInstanceProperty($property);
163 165
 			}
@@ -168,22 +170,23 @@  discard block
 block discarded – undo
168 170
 	private function setInstanceProperty($property){
169 171
 		if(\is_callable($property)){
170 172
 			$this->properties[]=$property;
171
-		}elseif(\is_string($property)){
173
+		} elseif(\is_string($property)){
172 174
 			try{
173 175
 				$this->_beforeAddProperty(\sizeof($this->properties), $property);
174 176
 				$rProperty=$this->reflect->getProperty($property);
175 177
 				$this->properties[]=$rProperty;
176
-			}catch(\Exception $e){
178
+			} catch(\Exception $e){
177 179
 				$this->_beforeAddProperty(\sizeof($this->properties), $property);
178 180
 				$this->properties[]=$property;
179 181
 			}
180
-		}elseif(\is_int($property)){
182
+		} elseif(\is_int($property)){
181 183
 			$props=$this->getDefaultProperties();
182
-			if(isset($props[$property]))
183
-				$this->properties[]=$props[$property];
184
-				else
185
-					$this->properties[]=$property;
186
-		}else{
184
+			if(isset($props[$property])) {
185
+							$this->properties[]=$props[$property];
186
+			} else {
187
+									$this->properties[]=$property;
188
+				}
189
+		} else{
187 190
 			$this->properties[]=$property;
188 191
 		}
189 192
 	}
@@ -227,12 +230,13 @@  discard block
 block discarded – undo
227 230
 		if(isset($this->captions[$index])){
228 231
 			return $this->captions[$index];
229 232
 		}
230
-		if($this->properties[$index] instanceof \ReflectionProperty)
231
-			return $this->properties[$index]->getName();
232
-		elseif(\is_callable($this->properties[$index]))
233
-			return "";
234
-		else
235
-			return $this->properties[$index];
233
+		if($this->properties[$index] instanceof \ReflectionProperty) {
234
+					return $this->properties[$index]->getName();
235
+		} elseif(\is_callable($this->properties[$index])) {
236
+					return "";
237
+		} else {
238
+					return $this->properties[$index];
239
+		}
236 240
 	}
237 241
 
238 242
 	public function getCaptions(){
@@ -241,7 +245,7 @@  discard block
 block discarded – undo
241 245
 			for($i=\sizeof($captions);$i<$this->count();$i++){
242 246
 				$captions[]="";
243 247
 			}
244
-		}else{
248
+		} else{
245 249
 			$captions=[];
246 250
 			$index=0;
247 251
 			$count=$this->count();
@@ -257,8 +261,9 @@  discard block
 block discarded – undo
257 261
 	}
258 262
 
259 263
 	public function setCaption($index,$caption){
260
-		if(isset($this->captions)===false)
261
-			$this->captions=[];
264
+		if(isset($this->captions)===false) {
265
+					$this->captions=[];
266
+		}
262 267
 		$this->captions[$index]=$caption;
263 268
 		return $this;
264 269
 	}
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.