| Conditions | 4 |
| Paths | 5 |
| Total Lines | 22 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 25 | public static function registerCustomTypes() |
||
| 26 | { |
||
| 27 | $platform = SchemaManager::getInstance()->getDatabasePlatform(); |
||
| 28 | $platformName = ucfirst($platform->getName()); |
||
| 29 | |||
| 30 | $customTypes = array_merge( |
||
| 31 | static::getCustomTypes('Common'), |
||
| 32 | static::getCustomTypes($platformName) |
||
| 33 | ); |
||
| 34 | |||
| 35 | foreach ($customTypes as $type) { |
||
| 36 | $name = $type::NAME; |
||
| 37 | |||
| 38 | if (static::hasType($name)) { |
||
| 39 | static::overrideType($name, $type); |
||
| 40 | } else { |
||
| 41 | static::addType($name, $type); |
||
| 42 | } |
||
| 43 | |||
| 44 | $dbType = defined("{$type}::DBTYPE") ? $type::DBTYPE : $name; |
||
| 45 | |||
| 46 | $platform->registerDoctrineTypeMapping($dbType, $name); |
||
| 47 | } |
||
| 163 |