@@ -92,6 +92,7 @@ discard block |
||
| 92 | 92 | |
| 93 | 93 | /** |
| 94 | 94 | * Fetch results for current relationship. |
| 95 | + * @param TActiveRecord $obj |
|
| 95 | 96 | * @return boolean always true. |
| 96 | 97 | */ |
| 97 | 98 | public function fetchResultsInto($obj) |
@@ -104,7 +105,6 @@ discard block |
||
| 104 | 105 | * Returns foreign keys in $fromRecord with source column names as key |
| 105 | 106 | * and foreign column names in the corresponding $matchesRecord as value. |
| 106 | 107 | * The method returns the first matching foreign key between these 2 records. |
| 107 | - * @param TActiveRecord $fromRecord |
|
| 108 | 108 | * @param TActiveRecord $matchesRecord |
| 109 | 109 | * @return array foreign keys with source column names as key and foreign column names as value. |
| 110 | 110 | */ |
@@ -212,6 +212,7 @@ discard block |
||
| 212 | 212 | * @param array source property names |
| 213 | 213 | * @param array foreign objects |
| 214 | 214 | * @param array foreign object field names. |
| 215 | + * @param TActiveRecord[] $fkObjects |
|
| 215 | 216 | */ |
| 216 | 217 | protected function populateResult(&$results,$properties,&$fkObjects,$fields) |
| 217 | 218 | { |
@@ -80,10 +80,10 @@ discard block |
||
| 80 | 80 | if($validArray || $results instanceof ArrayAccess || $results instanceof TActiveRecord) |
| 81 | 81 | { |
| 82 | 82 | $this->collectForeignObjects($results); |
| 83 | - while($obj = array_pop($stack)) |
|
| 84 | - $obj->collectForeignObjects($results); |
|
| 85 | - } |
|
| 86 | - else if($results instanceof TActiveRecordRelation) |
|
| 83 | + while($obj = array_pop($stack)) { |
|
| 84 | + $obj->collectForeignObjects($results); |
|
| 85 | + } |
|
| 86 | + } else if($results instanceof TActiveRecordRelation) |
|
| 87 | 87 | $stack[] = $this; //call it later |
| 88 | 88 | else if($results === null || !$validArray) |
| 89 | 89 | $stack = array(); |
@@ -233,8 +233,7 @@ discard block |
||
| 233 | 233 | { |
| 234 | 234 | for($i=0,$k=count($results);$i<$k;$i++) |
| 235 | 235 | $this->setObjectProperty($results[$i], $properties, $collections); |
| 236 | - } |
|
| 237 | - else |
|
| 236 | + } else |
|
| 238 | 237 | $this->setObjectProperty($results, $properties, $collections); |
| 239 | 238 | } |
| 240 | 239 | |
@@ -47,6 +47,9 @@ |
||
| 47 | 47 | return $control; |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | + /** |
|
| 51 | + * @return string |
|
| 52 | + */ |
|
| 50 | 53 | protected function getDefaultControlValue($container,$column, $record) |
| 51 | 54 | { |
| 52 | 55 | $control = $container->findControl(self::DEFAULT_ID); |
@@ -123,6 +123,7 @@ |
||
| 123 | 123 | /** |
| 124 | 124 | * @param TMssqlTableInfo table information. |
| 125 | 125 | * @param array column information. |
| 126 | + * @param TMssqlTableInfo $tableInfo |
|
| 126 | 127 | */ |
| 127 | 128 | protected function processColumn($tableInfo, $col) |
| 128 | 129 | { |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | |
| 28 | 28 | /** |
| 29 | 29 | * Overrides parent implementation, returns PHP type from the db type. |
| 30 | - * @return boolean derived PHP primitive type from the column db type. |
|
| 30 | + * @return string derived PHP primitive type from the column db type. |
|
| 31 | 31 | */ |
| 32 | 32 | public function getPHPType() |
| 33 | 33 | { |
@@ -114,6 +114,7 @@ |
||
| 114 | 114 | /** |
| 115 | 115 | * @param TMysqlTableInfo table information. |
| 116 | 116 | * @param array column information. |
| 117 | + * @param TMysqlTableInfo $tableInfo |
|
| 117 | 118 | */ |
| 118 | 119 | protected function processColumn($tableInfo, $col) |
| 119 | 120 | { |
@@ -154,8 +154,7 @@ discard block |
||
| 154 | 154 | $info['NumericPrecision'] = intval($pscale[1]); |
| 155 | 155 | if(count($pscale) > 2) |
| 156 | 156 | $info['NumericScale'] = intval($pscale[2]); |
| 157 | - } |
|
| 158 | - else |
|
| 157 | + } else |
|
| 159 | 158 | $info['ColumnSize'] = intval($pscale[1]); |
| 160 | 159 | } |
| 161 | 160 | } |
@@ -254,8 +253,7 @@ discard block |
||
| 254 | 253 | try |
| 255 | 254 | { |
| 256 | 255 | return count($result = $command->queryRow()) > 0 && $result['Table_type']==='VIEW'; |
| 257 | - } |
|
| 258 | - catch(TDbException $e) |
|
| 256 | + } catch(TDbException $e) |
|
| 259 | 257 | { |
| 260 | 258 | $table = $schemaName===null?$tableName:$schemaName.'.'.$tableName; |
| 261 | 259 | throw new TDbException('dbcommon_invalid_table_name',$table,$e->getMessage()); |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | /** |
| 146 | 146 | * @param string table schema name |
| 147 | 147 | * @param string table name. |
| 148 | - * @return boolean true if the table is a view. |
|
| 148 | + * @return integer true if the table is a view. |
|
| 149 | 149 | */ |
| 150 | 150 | protected function getIsView($schemaName,$tableName) |
| 151 | 151 | { |
@@ -167,6 +167,7 @@ discard block |
||
| 167 | 167 | /** |
| 168 | 168 | * @param TOracleTableInfo table information. |
| 169 | 169 | * @param array column information. |
| 170 | + * @param TOracleTableInfo $tableInfo |
|
| 170 | 171 | */ |
| 171 | 172 | protected function processColumn($tableInfo, $col) |
| 172 | 173 | { |
@@ -322,6 +323,7 @@ discard block |
||
| 322 | 323 | /** |
| 323 | 324 | * @param string column name. |
| 324 | 325 | * @param TOracleTableInfo table information. |
| 326 | + * @param string $columnId |
|
| 325 | 327 | * @return boolean true if column is a foreign key. |
| 326 | 328 | */ |
| 327 | 329 | protected function isForeignKeyColumn($columnId, $tableInfo) |
@@ -203,11 +203,9 @@ discard block |
||
| 203 | 203 | $info['NumericPrecision'] = intval($matches[1]); |
| 204 | 204 | if(count($matches) > 2) |
| 205 | 205 | $info['NumericScale'] = intval($matches[2]); |
| 206 | - } |
|
| 207 | - else |
|
| 206 | + } else |
|
| 208 | 207 | $info['ColumnSize'] = intval($matches[1]); |
| 209 | - } |
|
| 210 | - else |
|
| 208 | + } else |
|
| 211 | 209 | $info['DbType'] = $col['type']; |
| 212 | 210 | $tableInfo->Columns[$columnId] = new TOracleTableColumn($info); |
| 213 | 211 | } |
@@ -349,8 +347,7 @@ discard block |
||
| 349 | 347 | SELECT table_name, '{$schema}' as table_schema FROM user_tables |
| 350 | 348 | EOD; |
| 351 | 349 | $command=$this->getDbConnection()->createCommand($sql); |
| 352 | - } |
|
| 353 | - else |
|
| 350 | + } else |
|
| 354 | 351 | { |
| 355 | 352 | $sql=<<<EOD |
| 356 | 353 | SELECT object_name as table_name, owner as table_schema FROM all_objects |
@@ -204,6 +204,7 @@ |
||
| 204 | 204 | /** |
| 205 | 205 | * @param TPgsqlTableInfo table information. |
| 206 | 206 | * @param array column information. |
| 207 | + * @param TPgsqlTableInfo $tableInfo |
|
| 207 | 208 | */ |
| 208 | 209 | protected function processColumn($tableInfo, $col) |
| 209 | 210 | { |
@@ -233,8 +233,7 @@ discard block |
||
| 233 | 233 | $newid=substr($id,$pos+1); |
| 234 | 234 | if ($control!==null) |
| 235 | 235 | $control=$control->$newid; |
| 236 | - } |
|
| 237 | - else |
|
| 236 | + } else |
|
| 238 | 237 | { |
| 239 | 238 | // TCheckBoxList overrides findControl() with a fake implementation |
| 240 | 239 | // but accepts a second parameter to use the standard one |
@@ -296,8 +295,7 @@ discard block |
||
| 296 | 295 | { |
| 297 | 296 | $group=$this->getValidationGroup(); |
| 298 | 297 | return $this->getPage()->getValidators($group)->getCount()>0; |
| 299 | - } |
|
| 300 | - else |
|
| 298 | + } else |
|
| 301 | 299 | return false; |
| 302 | 300 | } |
| 303 | 301 | |
@@ -127,8 +127,6 @@ discard block |
||
| 127 | 127 | /** |
| 128 | 128 | * Quotes a table name for use in a query. |
| 129 | 129 | * @param string $name table name |
| 130 | - * @param string $lft left delimiter |
|
| 131 | - * @param string $rgt right delimiter |
|
| 132 | 130 | * @return string the properly quoted table name |
| 133 | 131 | */ |
| 134 | 132 | public function quoteTableName($name) |
@@ -150,8 +148,6 @@ discard block |
||
| 150 | 148 | /** |
| 151 | 149 | * Quotes a column name for use in a query. |
| 152 | 150 | * @param string $name column name |
| 153 | - * @param string $lft left delimiter |
|
| 154 | - * @param string $rgt right delimiter |
|
| 155 | 151 | * @return string the properly quoted column name |
| 156 | 152 | */ |
| 157 | 153 | public function quoteColumnName($name) |
@@ -166,8 +162,6 @@ discard block |
||
| 166 | 162 | /** |
| 167 | 163 | * Quotes a column alias for use in a query. |
| 168 | 164 | * @param string $name column alias |
| 169 | - * @param string $lft left delimiter |
|
| 170 | - * @param string $rgt right delimiter |
|
| 171 | 165 | * @return string the properly quoted column alias |
| 172 | 166 | */ |
| 173 | 167 | public function quoteColumnAlias($name) |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | } |
| 189 | 189 | |
| 190 | 190 | /** |
| 191 | - * @return boolean true if the parameter index are string base, false otherwise. |
|
| 191 | + * @return boolean|null true if the parameter index are string base, false otherwise. |
|
| 192 | 192 | */ |
| 193 | 193 | public function getIsNamedParameters() |
| 194 | 194 | { |
@@ -206,6 +206,7 @@ discard block |
||
| 206 | 206 | |
| 207 | 207 | /** |
| 208 | 208 | * @param mixed ordering clause. |
| 209 | + * @param string $value |
|
| 209 | 210 | */ |
| 210 | 211 | public function setOrdersBy($value) |
| 211 | 212 | { |
@@ -250,6 +251,7 @@ discard block |
||
| 250 | 251 | |
| 251 | 252 | /** |
| 252 | 253 | * @param int record offset. |
| 254 | + * @param double $value |
|
| 253 | 255 | */ |
| 254 | 256 | public function setOffset($value) |
| 255 | 257 | { |