added DatatypeEnum tests; repaired the other test for local execution; small bug fixes

This commit is contained in:
Susann Sgorzaly
2018-02-19 21:36:31 +01:00
parent 5660be3373
commit 52a9b61b97
6 changed files with 79 additions and 6 deletions

View File

@@ -66,9 +66,9 @@ class DatatypeEnum
return $type;
}
}
return self::__DEFAULT;
}
return self::__DEFAULT;
}
/**

View File

@@ -23,7 +23,11 @@ trait DatatypeTrait {
* @return string|false
*/
private function getMostFrequentDataypeForColumn($datatypes) {
array_filter($datatypes);
array_filter($datatypes);
if (empty($datatypes)){
return false;
}
// workaround because array_count_values($datatypes) does not work anymore :-(
foreach ($datatypes as $type) {