@@ -186,15 +186,13 @@ discard block |
||
186 | 186 | $formatInfo = $culture->NumberFormat; |
187 | 187 | $formatInfo->setPattern($type); |
188 | 188 | return $formatInfo; |
189 | - } |
|
190 | - elseif(is_string($culture)) |
|
189 | + } elseif(is_string($culture)) |
|
191 | 190 | { |
192 | 191 | $cultureInfo = new CultureInfo($culture); |
193 | 192 | $formatInfo = $cultureInfo->NumberFormat; |
194 | 193 | $formatInfo->setPattern($type); |
195 | 194 | return $formatInfo; |
196 | - } |
|
197 | - else |
|
195 | + } else |
|
198 | 196 | { |
199 | 197 | $cultureInfo = new CultureInfo(); |
200 | 198 | $formatInfo = $cultureInfo->NumberFormat; |
@@ -294,8 +292,7 @@ discard block |
||
294 | 292 | { |
295 | 293 | $groupSize1 = $decimalPos - $groupPos1 - 1; |
296 | 294 | |
297 | - } |
|
298 | - else |
|
295 | + } else |
|
299 | 296 | { |
300 | 297 | //no decimal point, so traverse from the back |
301 | 298 | //to find the groupsize 1. |
@@ -80,8 +80,7 @@ |
||
80 | 80 | // i-prefix, such as i-cherokee |
81 | 81 | if(count($codes) > 1) |
82 | 82 | $lang = $codes[1]; |
83 | - } |
|
84 | - else |
|
83 | + } else |
|
85 | 84 | { |
86 | 85 | for($i = 0, $k = count($codes); $i < $k; ++$i) |
87 | 86 | { |
@@ -87,8 +87,7 @@ discard block |
||
87 | 87 | try |
88 | 88 | { |
89 | 89 | $db->createCommand($sql)->query()->close(); |
90 | - } |
|
91 | - catch(Exception $e) |
|
90 | + } catch(Exception $e) |
|
92 | 91 | { |
93 | 92 | // DB table not exists |
94 | 93 | if($this->_autoCreate) |
@@ -154,8 +153,7 @@ discard block |
||
154 | 153 | return $config->getDbConnection(); |
155 | 154 | else |
156 | 155 | throw new TConfigurationException('dblogroute_connectionid_invalid', $this->_connID); |
157 | - } |
|
158 | - else |
|
156 | + } else |
|
159 | 157 | { |
160 | 158 | $db = new TDbConnection; |
161 | 159 | // default to SQLite3 database |
@@ -43,8 +43,7 @@ discard block |
||
43 | 43 | { |
44 | 44 | $timing['delta'] = $logs[$i + 1][3] - $logs[$i][3]; |
45 | 45 | $timing['total'] = $logs[$i + 1][3] - $first; |
46 | - } |
|
47 | - else |
|
46 | + } else |
|
48 | 47 | { |
49 | 48 | $timing['delta'] = '?'; |
50 | 49 | $timing['total'] = $logs[$i][3] - $first; |
@@ -87,8 +86,7 @@ discard block |
||
87 | 86 | <th>Category</th><th>Message</th><th>Time Spent (s)</th><th>Cumulated Time Spent (s)</th> |
88 | 87 | </tr> |
89 | 88 | EOD; |
90 | - } |
|
91 | - else |
|
89 | + } else |
|
92 | 90 | { |
93 | 91 | $string = <<<EOD |
94 | 92 | <table cellspacing="0" cellpadding="2" border="0" width="100%" style="table-layout:auto"> |
@@ -125,8 +123,7 @@ discard block |
||
125 | 123 | <td class="cumulatedtime">{$total}</td> |
126 | 124 | </tr> |
127 | 125 | EOD; |
128 | - } |
|
129 | - else |
|
126 | + } else |
|
130 | 127 | { |
131 | 128 | $bgcolor = $info['even'] ? "#fff" : "#eee"; |
132 | 129 | $color = $this->getColorLevel($log[1]); |
@@ -168,8 +165,7 @@ discard block |
||
168 | 165 | { |
169 | 166 | $string .= '<span class="level' . $level . '">' . strtoupper($name) . "</span>"; |
170 | 167 | } |
171 | - } |
|
172 | - else |
|
168 | + } else |
|
173 | 169 | { |
174 | 170 | $string .= "<tr><td colspan=\"5\" style=\"text-align:center; background-color:black; border-top: 1px solid #ccc; padding:0.2em;\">"; |
175 | 171 | foreach(self::$_levelValues as $name => $level) |
@@ -233,8 +233,7 @@ discard block |
||
233 | 233 | $year = "{$date['year']}"; |
234 | 234 | $month = $date['mon']; |
235 | 235 | $day = $date['mday']; |
236 | - } |
|
237 | - else |
|
236 | + } else |
|
238 | 237 | { |
239 | 238 | $year = null; |
240 | 239 | $month = null; |
@@ -270,8 +269,7 @@ discard block |
||
270 | 269 | $year = $iYear + 2000; |
271 | 270 | } |
272 | 271 | $year = (int)$year; |
273 | - } |
|
274 | - elseif($token == 'MM' || $token == 'M') |
|
272 | + } elseif($token == 'MM' || $token == 'M') |
|
275 | 273 | { |
276 | 274 | $month = $this->getInteger($value,$i_val, |
277 | 275 | $this->length($token), 2); |
@@ -281,8 +279,7 @@ discard block |
||
281 | 279 | //throw new TInvalidDataValueException('Invalid month', $value); |
282 | 280 | $i_val += strlen($month); |
283 | 281 | $month = $iMonth; |
284 | - } |
|
285 | - elseif ($token == 'dd' || $token == 'd') |
|
282 | + } elseif ($token == 'dd' || $token == 'd') |
|
286 | 283 | { |
287 | 284 | $day = $this->getInteger($value,$i_val, |
288 | 285 | $this->length($token), 2); |
@@ -292,8 +289,7 @@ discard block |
||
292 | 289 | //throw new TInvalidDataValueException('Invalid day', $value); |
293 | 290 | $i_val += strlen($day); |
294 | 291 | $day = $iDay; |
295 | - } |
|
296 | - else |
|
292 | + } else |
|
297 | 293 | { |
298 | 294 | if($this->substring($value, $i_val, $this->length($token)) != $token) |
299 | 295 | return null; |
@@ -68,8 +68,7 @@ |
||
68 | 68 | { |
69 | 69 | $delta = $logs[$i + 1][3] - $logs[$i][3]; |
70 | 70 | $total = $logs[$i + 1][3] - $first; |
71 | - } |
|
72 | - else |
|
71 | + } else |
|
73 | 72 | { |
74 | 73 | $delta = '?'; |
75 | 74 | $total = $logs[$i][3] - $first; |
@@ -52,8 +52,7 @@ |
||
52 | 52 | { |
53 | 53 | $result = highlight_string("<?php\n" . self::$_output, true); |
54 | 54 | return preg_replace('/<\\?php<br \\/>/', '', $result, 1); |
55 | - } |
|
56 | - else |
|
55 | + } else |
|
57 | 56 | return self::$_output; |
58 | 57 | } |
59 | 58 |
@@ -150,8 +150,7 @@ |
||
150 | 150 | { |
151 | 151 | $info['NumericPrecision'] = intval($ps[0]); |
152 | 152 | $info['NumericScale'] = intval($ps[1]); |
153 | - } |
|
154 | - else |
|
153 | + } else |
|
155 | 154 | $info['ColumnSize'] = intval($match[1]); |
156 | 155 | $info['DbType'] = substr($type, 0, $pos); |
157 | 156 | } |
@@ -68,8 +68,7 @@ discard block |
||
68 | 68 | { |
69 | 69 | $this->_connection->getPdoInstance()->commit(); |
70 | 70 | $this->_active = false; |
71 | - } |
|
72 | - else |
|
71 | + } else |
|
73 | 72 | throw new TDbException('dbtransaction_transaction_inactive'); |
74 | 73 | } |
75 | 74 | |
@@ -83,8 +82,7 @@ discard block |
||
83 | 82 | { |
84 | 83 | $this->_connection->getPdoInstance()->rollBack(); |
85 | 84 | $this->_active = false; |
86 | - } |
|
87 | - else |
|
85 | + } else |
|
88 | 86 | throw new TDbException('dbtransaction_transaction_inactive'); |
89 | 87 | } |
90 | 88 |