@@ -191,8 +191,7 @@ discard block |
||
191 | 191 | default: |
192 | 192 | if ($this->isAlphaNum($this->b)) { |
193 | 193 | $this->action(1); |
194 | - } |
|
195 | - else { |
|
194 | + } else { |
|
196 | 195 | $this->action(2); |
197 | 196 | } |
198 | 197 | } |
@@ -224,8 +223,7 @@ discard block |
||
224 | 223 | default: |
225 | 224 | if ($this->isAlphaNum($this->a)) { |
226 | 225 | $this->action(1); |
227 | - } |
|
228 | - else { |
|
226 | + } else { |
|
229 | 227 | $this->action(3); |
230 | 228 | } |
231 | 229 | } |
@@ -129,28 +129,24 @@ |
||
129 | 129 | { |
130 | 130 | $param->setData($data); |
131 | 131 | $this->_nextPageList = null; |
132 | - } |
|
133 | - else |
|
132 | + } else |
|
134 | 133 | { |
135 | 134 | $param->setData(array_slice($data, 0, $pageSize)); |
136 | 135 | $this->_nextPageList = array_slice($data, $pageSize-1,$total); |
137 | 136 | } |
138 | - } |
|
139 | - else |
|
137 | + } else |
|
140 | 138 | { |
141 | 139 | if($total <= $pageSize) |
142 | 140 | { |
143 | 141 | $this->_prevPageList = array_slice($data, 0, $total); |
144 | 142 | $param->setData(array()); |
145 | 143 | $this->_nextPageList = null; |
146 | - } |
|
147 | - else if($total <= $pageSize*2) |
|
144 | + } else if($total <= $pageSize*2) |
|
148 | 145 | { |
149 | 146 | $this->_prevPageList = array_slice($data, 0, $pageSize); |
150 | 147 | $param->setData(array_slice($data, $pageSize, $total)); |
151 | 148 | $this->_nextPageList = null; |
152 | - } |
|
153 | - else |
|
149 | + } else |
|
154 | 150 | { |
155 | 151 | $this->_prevPageList = array_slice($data, 0, $pageSize); |
156 | 152 | $param->setData(array_slice($data, $pageSize, $pageSize)); |
@@ -416,8 +416,7 @@ |
||
416 | 416 | { |
417 | 417 | $useArgs = !is_array($parameters) && is_array($args); |
418 | 418 | return new TSqlCriteria($criteria,$useArgs ? $args : $parameters); |
419 | - } |
|
420 | - else if($criteria instanceof TSqlCriteria) |
|
419 | + } else if($criteria instanceof TSqlCriteria) |
|
421 | 420 | return $criteria; |
422 | 421 | else |
423 | 422 | throw new TDbException('dbtablegateway_invalid_criteria'); |
@@ -115,8 +115,7 @@ discard block |
||
115 | 115 | $columns = $this->getTableInfo()->getColumns(); |
116 | 116 | $this->getInputRepeater()->setDataSource($columns); |
117 | 117 | $this->getInputRepeater()->dataBind(); |
118 | - } |
|
119 | - else |
|
118 | + } else |
|
120 | 119 | { |
121 | 120 | if($this->_editRenderer===null) |
122 | 121 | $this->createEditRenderer($record, $classPath); |
@@ -140,8 +139,7 @@ discard block |
||
140 | 139 | $index = $this->getControls()->remove($this->getInputRepeater()); |
141 | 140 | $this->getControls()->insertAt($index,$this->_editRenderer); |
142 | 141 | $this->_editRenderer->setData($record); |
143 | - } |
|
144 | - else |
|
142 | + } else |
|
145 | 143 | { |
146 | 144 | throw new TConfigurationException( |
147 | 145 | 'scaffold_invalid_edit_renderer', $this->getID(), get_class($record)); |
@@ -204,15 +202,13 @@ discard block |
||
204 | 202 | $column = $table->getColumn($item->getCustomData()); |
205 | 203 | $builder->loadScaffoldInput($this, $item, $column, $record); |
206 | 204 | } |
207 | - } |
|
208 | - else |
|
205 | + } else |
|
209 | 206 | { |
210 | 207 | $this->_editRenderer->updateRecord($record); |
211 | 208 | } |
212 | 209 | $record->save(); |
213 | 210 | return true; |
214 | - } |
|
215 | - else if($this->_editRenderer!==null) |
|
211 | + } else if($this->_editRenderer!==null) |
|
216 | 212 | { |
217 | 213 | //preserve the form data. |
218 | 214 | $this->_editRenderer->updateRecord($this->getCurrentRecord()); |
@@ -67,16 +67,14 @@ |
||
67 | 67 | throw new TActiveRecordException('ar_invalid_tablename_property', |
68 | 68 | get_class($record),self::TABLE_CONST); |
69 | 69 | return $value; |
70 | - } |
|
71 | - elseif ($class->hasMethod(self::TABLE_METHOD)) |
|
70 | + } elseif ($class->hasMethod(self::TABLE_METHOD)) |
|
72 | 71 | { |
73 | 72 | $value = $record->{self::TABLE_METHOD}(); |
74 | 73 | if(empty($value)) |
75 | 74 | throw new TActiveRecordException('ar_invalid_tablename_method', |
76 | 75 | get_class($record),self::TABLE_METHOD); |
77 | 76 | return $value; |
78 | - } |
|
79 | - else |
|
77 | + } else |
|
80 | 78 | return strtolower(get_class($record)); |
81 | 79 | } |
82 | 80 |
@@ -189,8 +189,7 @@ discard block |
||
189 | 189 | $this->_pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
190 | 190 | $this->_active=true; |
191 | 191 | $this->setConnectionCharset(); |
192 | - } |
|
193 | - catch(PDOException $e) |
|
192 | + } catch(PDOException $e) |
|
194 | 193 | { |
195 | 194 | throw new TDbException('dbconnection_open_failed',$e->getMessage()); |
196 | 195 | } |
@@ -343,8 +342,7 @@ discard block |
||
343 | 342 | { |
344 | 343 | $this->_pdo->beginTransaction(); |
345 | 344 | return $this->_transaction=Prado::createComponent($this->getTransactionClass(), $this); |
346 | - } |
|
347 | - else |
|
345 | + } else |
|
348 | 346 | throw new TDbException('dbconnection_connection_inactive'); |
349 | 347 | } |
350 | 348 |
@@ -63,8 +63,7 @@ discard block |
||
63 | 63 | { |
64 | 64 | $this->_connection->getPdoInstance()->commit(); |
65 | 65 | $this->_active=false; |
66 | - } |
|
67 | - else |
|
66 | + } else |
|
68 | 67 | throw new TDbException('dbtransaction_transaction_inactive'); |
69 | 68 | } |
70 | 69 | |
@@ -78,8 +77,7 @@ discard block |
||
78 | 77 | { |
79 | 78 | $this->_connection->getPdoInstance()->rollBack(); |
80 | 79 | $this->_active=false; |
81 | - } |
|
82 | - else |
|
80 | + } else |
|
83 | 81 | throw new TDbException('dbtransaction_transaction_inactive'); |
84 | 82 | } |
85 | 83 |
@@ -68,8 +68,7 @@ |
||
68 | 68 | $manager->configureXml($file); |
69 | 69 | $this->cacheSqlMapManager($manager); |
70 | 70 | } |
71 | - } |
|
72 | - elseif($this->getConnectionID() !== '') { |
|
71 | + } elseif($this->getConnectionID() !== '') { |
|
73 | 72 | $manager->setDbConnection($this->getDbConnection()); |
74 | 73 | } |
75 | 74 | return $manager; |
@@ -177,8 +177,7 @@ |
||
177 | 177 | try |
178 | 178 | { |
179 | 179 | return TPropertyAccess::get($object, $property->getProperty()); |
180 | - } |
|
181 | - catch (TInvalidPropertyException $e) |
|
180 | + } catch (TInvalidPropertyException $e) |
|
182 | 181 | { |
183 | 182 | throw new TSqlMapException( |
184 | 183 | 'sqlmap_unable_to_get_property_for_parameter', |