Simplifying getColumnNames
logic (can be an array_map
call)
This commit is contained in:
parent
b2a6f8aa0e
commit
044b202379
@ -1873,17 +1873,11 @@ class ClassMetadataInfo implements ClassMetadata
|
||||
*/
|
||||
public function getColumnNames(array $fieldNames = null)
|
||||
{
|
||||
if ($fieldNames === null) {
|
||||
if (null === $fieldNames) {
|
||||
return array_keys($this->fieldNames);
|
||||
}
|
||||
|
||||
$columnNames = array();
|
||||
|
||||
foreach ($fieldNames as $fieldName) {
|
||||
$columnNames[] = $this->getColumnName($fieldName);
|
||||
}
|
||||
|
||||
return $columnNames;
|
||||
return array_values(array_map([$this, 'getColumnName'], $fieldNames));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user