1
0
mirror of synced 2025-02-08 08:19:28 +03:00

- CS fixes

This commit is contained in:
lsmith 2007-01-02 15:24:43 +00:00
parent 9f6a652a62
commit dcdc049588
8 changed files with 2662 additions and 2658 deletions

View File

@ -464,7 +464,7 @@ class Doctrine_Collection extends Doctrine_Access implements Countable, Iterator
*/ */
public function get($key) public function get($key)
{ {
if($key === null) { if ($key === null) {
$record = $this->table->create(); $record = $this->table->create();
if (isset($this->reference_field)) { if (isset($this->reference_field)) {

View File

@ -108,8 +108,9 @@ class Doctrine_DataDict_Firebird extends Doctrine_DataDict
$field['field_sub_type'] = !empty($field['field_sub_type']) $field['field_sub_type'] = !empty($field['field_sub_type'])
? strtolower($field['field_sub_type']) : null; ? strtolower($field['field_sub_type']) : null;
if( ! isset($field['name'])) if ( ! isset($field['name'])) {
$field['name'] = ''; $field['name'] = '';
}
switch ($dbType) { switch ($dbType) {
case 'smallint': case 'smallint':

View File

@ -122,7 +122,7 @@ class Doctrine_DataDict_Mssql extends Doctrine_DataDict
// todo: unsigned handling seems to be missing // todo: unsigned handling seems to be missing
$unsigned = $fixed = null; $unsigned = $fixed = null;
if( ! isset($field['name'])) if ( ! isset($field['name']))
$field['name'] = ''; $field['name'] = '';
switch ($db_type) { switch ($db_type) {
@ -131,7 +131,7 @@ class Doctrine_DataDict_Mssql extends Doctrine_DataDict
break; break;
case 'int': case 'int':
$type[0] = 'integer'; $type[0] = 'integer';
if($length == 1) { if ($length == 1) {
$type[] = 'boolean'; $type[] = 'boolean';
} }
break; break;

View File

@ -236,8 +236,9 @@ class Doctrine_DataDict_Mysql extends Doctrine_DataDict
$type = array(); $type = array();
$unsigned = $fixed = null; $unsigned = $fixed = null;
if( ! isset($field['name'])) if ( ! isset($field['name'])) {
$field['name'] = ''; $field['name'] = '';
}
switch ($dbType) { switch ($dbType) {
case 'tinyint': case 'tinyint':

View File

@ -104,8 +104,9 @@ class Doctrine_DataDict_Oracle extends Doctrine_DataDict
$length = $field['length']; $length = $field['length'];
} }
if( ! isset($field['name'])) if ( ! isset($field['name'])) {
$field['name'] = ''; $field['name'] = '';
}
switch ($db_type) { switch ($db_type) {
case 'integer': case 'integer':

View File

@ -435,8 +435,9 @@ class Doctrine_DataDict_Pgsql extends Doctrine_DataDict
$type = array(); $type = array();
$unsigned = $fixed = null; $unsigned = $fixed = null;
if( ! isset($field['name'])) if ( ! isset($field['name'])) {
$field['name'] = ''; $field['name'] = '';
}
$db_type = strtolower($field['type']); $db_type = strtolower($field['type']);

View File

@ -128,8 +128,9 @@ class Doctrine_DataDict_Sqlite extends Doctrine_DataDict
$fixed = null; $fixed = null;
$type = array(); $type = array();
if( ! isset($field['name'])) if ( ! isset($field['name'])) {
$field['name'] = ''; $field['name'] = '';
}
switch ($dbType) { switch ($dbType) {
case 'boolean': case 'boolean':

View File

@ -182,10 +182,9 @@ class Doctrine_Validator
*/ */
private function validateLength($column, $key, $value) private function validateLength($column, $key, $value)
{ {
if($column[0] == "timestamp") { if ($column[0] == "timestamp") {
return true; return true;
} } else if ($column[0] == "array" || $column[0] == "object") {
else if ($column[0] == "array" || $column[0] == "object") {
$length = strlen(serialize($value)); $length = strlen(serialize($value));
} else { } else {
$length = strlen($value); $length = strlen($value);