- CS fixes
This commit is contained in:
parent
9f6a652a62
commit
dcdc049588
@ -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)) {
|
||||||
|
@ -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':
|
||||||
|
@ -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;
|
||||||
|
@ -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':
|
||||||
|
@ -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':
|
||||||
|
@ -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']);
|
||||||
|
|
||||||
|
@ -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':
|
||||||
|
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user