[2.0] Fixed more STRICT standards notices (only variables should be passed by reference...). @beberlei, error_reporting=E_ALL | E_STRICT
This commit is contained in:
parent
1013eb66c1
commit
5730a32d91
@ -132,14 +132,16 @@ class DatabaseDriver implements Driver
|
||||
"Cannot generate mapping for table '".$tableName."' with foreign keys with multiple local columns."
|
||||
);
|
||||
}
|
||||
$localColumn = current($foreignKey->getColumns());
|
||||
$cols = $foreignKey->getColumns();
|
||||
$localColumn = current($cols);
|
||||
|
||||
if (count($foreignKey->getForeignColumns()) != 1) {
|
||||
$fkCols = $foreignKey->getForeignColumns();
|
||||
if (count($fkCols) != 1) {
|
||||
throw new MappingException(
|
||||
"Cannot generate mapping for table '".$tableName."' with foreign keys with multiple foreign columns."
|
||||
);
|
||||
}
|
||||
$foreignColumn = current($foreignKey->getForeignColumns());
|
||||
$foreignColumn = current($fkCols);
|
||||
|
||||
$associationMapping = array();
|
||||
$associationMapping['fieldName'] = Inflector::camelize(str_ireplace('_id', '', $localColumn));
|
||||
|
@ -346,7 +346,8 @@ class SchemaManagerFunctionalTestCase extends \Doctrine\Tests\DbalFunctionalTest
|
||||
$this->assertFalse($table->hasIndex('foo_idx'));
|
||||
|
||||
$this->assertEquals(1, count($table->getForeignKeys()));
|
||||
$foreignKey = current($table->getForeignKeys());
|
||||
$fks = $table->getForeignKeys();
|
||||
$foreignKey = current($fks);
|
||||
$this->assertEquals('alter_table_foreign', strtolower($foreignKey->getForeignTableName()));
|
||||
$this->assertEquals(array('foreign_key_test'), array_map('strtolower', $foreignKey->getColumns()));
|
||||
$this->assertEquals(array('id'), array_map('strtolower', $foreignKey->getForeignColumns()));
|
||||
|
Loading…
Reference in New Issue
Block a user