@@ -175,8 +175,7 @@ |
||
175 | 175 | { |
176 | 176 | $cultureInfo = CultureInfo::getInstance($culture); |
177 | 177 | return $cultureInfo->getDateTimeFormat(); |
178 | - } |
|
179 | - else |
|
178 | + } else |
|
180 | 179 | { |
181 | 180 | $cultureInfo = CultureInfo::getInvariantCulture(); |
182 | 181 | return $cultureInfo->getDateTimeFormat(); |
@@ -124,8 +124,7 @@ |
||
124 | 124 | if (!@mysql_select_db($dsninfo['database'], $conn)) |
125 | 125 | throw new Exception('Error in connecting database, dns:'. |
126 | 126 | $dsninfo); |
127 | - } |
|
128 | - else |
|
127 | + } else |
|
129 | 128 | throw new Exception('Please provide a database for message'. |
130 | 129 | ' translation.'); |
131 | 130 | return $conn; |
@@ -184,15 +184,13 @@ discard block |
||
184 | 184 | $formatInfo = $culture->NumberFormat; |
185 | 185 | $formatInfo->setPattern($type); |
186 | 186 | return $formatInfo; |
187 | - } |
|
188 | - else if(is_string($culture)) |
|
187 | + } else if(is_string($culture)) |
|
189 | 188 | { |
190 | 189 | $cultureInfo = new CultureInfo($culture); |
191 | 190 | $formatInfo = $cultureInfo->NumberFormat; |
192 | 191 | $formatInfo->setPattern($type); |
193 | 192 | return $formatInfo; |
194 | - } |
|
195 | - else |
|
193 | + } else |
|
196 | 194 | { |
197 | 195 | $cultureInfo = new CultureInfo(); |
198 | 196 | $formatInfo = $cultureInfo->NumberFormat; |
@@ -292,8 +290,7 @@ discard block |
||
292 | 290 | { |
293 | 291 | $groupSize1 = $decimalPos - $groupPos1-1; |
294 | 292 | |
295 | - } |
|
296 | - else |
|
293 | + } else |
|
297 | 294 | { |
298 | 295 | //no decimal point, so traverse from the back |
299 | 296 | //to find the groupsize 1. |
@@ -203,16 +203,14 @@ discard block |
||
203 | 203 | $integer = $groupSeparator . $integer; |
204 | 204 | $count++; |
205 | 205 | } |
206 | - } |
|
207 | - else if($multiGroup && $count >= 1) |
|
206 | + } else if($multiGroup && $count >= 1) |
|
208 | 207 | { |
209 | 208 | if($i != 0 && ($i-$groupSize[0])%$groupSize[1] == 0) |
210 | 209 | { |
211 | 210 | $integer = $groupSeparator . $integer; |
212 | 211 | $count++; |
213 | 212 | } |
214 | - } |
|
215 | - else |
|
213 | + } else |
|
216 | 214 | { |
217 | 215 | if($i != 0 && $i%$groupSize[0] == 0) |
218 | 216 | { |
@@ -223,8 +221,7 @@ discard block |
||
223 | 221 | |
224 | 222 | $integer = $char . $integer; |
225 | 223 | } |
226 | - } |
|
227 | - else |
|
224 | + } else |
|
228 | 225 | $integer = $string; |
229 | 226 | |
230 | 227 | return $integer; |
@@ -250,27 +247,23 @@ discard block |
||
250 | 247 | if($decimalDigits == -1) |
251 | 248 | { |
252 | 249 | $decimal = substr($string, $dp+1); |
253 | - } |
|
254 | - else if(is_int($decimalDigits)) |
|
250 | + } else if(is_int($decimalDigits)) |
|
255 | 251 | { |
256 | 252 | $float = round((float)$string, $decimalDigits); |
257 | 253 | if(strpos((string)$float, '.') === false) |
258 | 254 | { |
259 | 255 | $decimal = str_pad($decimal,$decimalDigits,'0'); |
260 | - } |
|
261 | - else |
|
256 | + } else |
|
262 | 257 | { |
263 | 258 | $decimal = substr($float, strpos($float,'.')+1); |
264 | 259 | if(strlen($decimal)<$decimalDigits) |
265 | 260 | $decimal = str_pad($decimal,$decimalDigits,'0'); |
266 | 261 | } |
267 | - } |
|
268 | - else |
|
262 | + } else |
|
269 | 263 | return $decimal; |
270 | 264 | |
271 | 265 | return $decimalSeparator.$decimal; |
272 | - } |
|
273 | - else if ($decimalDigits > 0) |
|
266 | + } else if ($decimalDigits > 0) |
|
274 | 267 | return $decimalSeparator.str_pad($decimal,$decimalDigits,'0'); |
275 | 268 | |
276 | 269 | return $decimal; |
@@ -112,8 +112,7 @@ |
||
112 | 112 | && strlen($datetime[1]) == 1) |
113 | 113 | { |
114 | 114 | $pattern = $datetime; |
115 | - } |
|
116 | - else //no subpattern, try the presets |
|
115 | + } else //no subpattern, try the presets |
|
117 | 116 | $pattern = $this->getPreset($string); |
118 | 117 | |
119 | 118 | //no presets found, use the string as the pattern |
@@ -120,11 +120,9 @@ |
||
120 | 120 | { |
121 | 121 | $this->setChecked(true); |
122 | 122 | return true; |
123 | - } |
|
124 | - else |
|
123 | + } else |
|
125 | 124 | return false; |
126 | - } |
|
127 | - else if($this->getChecked()) |
|
125 | + } else if($this->getChecked()) |
|
128 | 126 | $this->setChecked(false); |
129 | 127 | return false; |
130 | 128 | } |
@@ -178,8 +178,7 @@ discard block |
||
178 | 178 | $control->setItemType($item->getItemType()); |
179 | 179 | } |
180 | 180 | $cell->getControls()->add($control); |
181 | - } |
|
182 | - else |
|
181 | + } else |
|
183 | 182 | $control=$cell; |
184 | 183 | $control->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); |
185 | 184 | break; |
@@ -196,15 +195,13 @@ discard block |
||
196 | 195 | } |
197 | 196 | $cell->getControls()->add($control); |
198 | 197 | $cell->registerObject('EditControl',$control); |
199 | - } |
|
200 | - else |
|
198 | + } else |
|
201 | 199 | { |
202 | 200 | $control=Prado::createComponent('System.Web.UI.WebControls.TTextBox'); |
203 | 201 | $cell->getControls()->add($control); |
204 | 202 | $cell->registerObject('TextBox',$control); |
205 | 203 | } |
206 | - } |
|
207 | - else |
|
204 | + } else |
|
208 | 205 | { |
209 | 206 | if(($classPath=$this->getItemRenderer())!=='') |
210 | 207 | { |
@@ -215,8 +212,7 @@ discard block |
||
215 | 212 | $control->setItemType($item->getItemType()); |
216 | 213 | } |
217 | 214 | $cell->getControls()->add($control); |
218 | - } |
|
219 | - else |
|
215 | + } else |
|
220 | 216 | $control=$cell; |
221 | 217 | } |
222 | 218 | $control->attachEventHandler('OnDataBinding',array($this,'dataBindColumn')); |
@@ -136,15 +136,13 @@ discard block |
||
136 | 136 | $activeView=$views->itemAt($index); |
137 | 137 | else |
138 | 138 | throw new TInvalidDataValueException('tabpanel_activeviewid_invalid',$id); |
139 | - } |
|
140 | - else if(($index=$this->getActiveViewIndex())>=0) |
|
139 | + } else if(($index=$this->getActiveViewIndex())>=0) |
|
141 | 140 | { |
142 | 141 | if($index<$views->getCount()) |
143 | 142 | $activeView=$views->itemAt($index); |
144 | 143 | else |
145 | 144 | throw new TInvalidDataValueException('tabpanel_activeviewindex_invalid',$index); |
146 | - } |
|
147 | - else |
|
145 | + } else |
|
148 | 146 | { |
149 | 147 | foreach($views as $index=>$view) |
150 | 148 | { |
@@ -320,8 +318,7 @@ discard block |
||
320 | 318 | $this->setActiveViewIndex($index); |
321 | 319 | $this->setActiveViewID($view->getID(false)); |
322 | 320 | $view->setActive(true); |
323 | - } |
|
324 | - else |
|
321 | + } else |
|
325 | 322 | $v->setActive(false); |
326 | 323 | } |
327 | 324 | } |
@@ -58,8 +58,7 @@ |
||
58 | 58 | if ($this->sourcepath === NULL) |
59 | 59 | { |
60 | 60 | $this->sourcepath = $sourcepath; |
61 | - } |
|
62 | - else |
|
61 | + } else |
|
63 | 62 | { |
64 | 63 | $this->sourcepath->append($sourcepath); |
65 | 64 | } |