@@ -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'); |
@@ -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 | } |
@@ -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 | |
@@ -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 | } |
@@ -61,8 +61,7 @@ discard block |
||
| 61 | 61 | $object = $object[$prop]; |
| 62 | 62 | else |
| 63 | 63 | throw new TInvalidPropertyException('sqlmap_invalid_property',$path); |
| 64 | - } |
|
| 65 | - else if(is_object($object)) |
|
| 64 | + } else if(is_object($object)) |
|
| 66 | 65 | { |
| 67 | 66 | $getter = 'get'.$prop; |
| 68 | 67 | if(method_exists($object, $getter) && is_callable(array($object, $getter))) |
@@ -73,8 +72,7 @@ discard block |
||
| 73 | 72 | $object = $object->{$prop}; |
| 74 | 73 | else |
| 75 | 74 | throw new TInvalidPropertyException('sqlmap_invalid_property',$path); |
| 76 | - } |
|
| 77 | - else |
|
| 75 | + } else |
|
| 78 | 76 | throw new TInvalidPropertyException('sqlmap_invalid_property',$path); |
| 79 | 77 | } |
| 80 | 78 | return $object; |
@@ -98,8 +96,7 @@ discard block |
||
| 98 | 96 | $object = $object[$prop]; |
| 99 | 97 | else |
| 100 | 98 | return false; |
| 101 | - } |
|
| 102 | - else if(is_object($object)) |
|
| 99 | + } else if(is_object($object)) |
|
| 103 | 100 | { |
| 104 | 101 | $getter = 'get'.$prop; |
| 105 | 102 | if(method_exists($object, $getter) && is_callable(array($object, $getter))) |
@@ -110,8 +107,7 @@ discard block |
||
| 110 | 107 | $object = $object->{$prop}; |
| 111 | 108 | else |
| 112 | 109 | return false; |
| 113 | - } |
|
| 114 | - else |
|
| 110 | + } else |
|
| 115 | 111 | return false; |
| 116 | 112 | } |
| 117 | 113 | return true; |
@@ -136,16 +132,14 @@ discard block |
||
| 136 | 132 | if(is_array($object) || $object instanceof ArrayAccess) |
| 137 | 133 | { |
| 138 | 134 | $object[$prop] = $value; |
| 139 | - } |
|
| 140 | - else if(is_object($object)) |
|
| 135 | + } else if(is_object($object)) |
|
| 141 | 136 | { |
| 142 | 137 | $setter = 'set'.$prop; |
| 143 | 138 | if (method_exists($object, $setter) && is_callable(array($object, $setter))) |
| 144 | 139 | $object->{$setter}($value); |
| 145 | 140 | else |
| 146 | 141 | $object->{$prop} = $value; |
| 147 | - } |
|
| 148 | - else |
|
| 142 | + } else |
|
| 149 | 143 | throw new TInvalidPropertyException('sqlmap_invalid_property_type',$path); |
| 150 | 144 | } |
| 151 | 145 | |