| Conditions | 4 |
| Paths | 4 |
| Total Lines | 20 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 13 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 37 | 6 | public function addType( |
|
| 38 | $name, |
||
| 39 | $className, |
||
| 40 | array $calls = [] |
||
| 41 | ) { |
||
| 42 | 6 | if (!Type::hasType($name)) { |
|
| 43 | 3 | Type::addType($name, $className); |
|
| 44 | 2 | } else { |
|
| 45 | 3 | Type::overrideType($name, $className); |
|
| 46 | } |
||
| 47 | |||
| 48 | 6 | if (!empty($calls)) { |
|
| 49 | 3 | $type = self::getType($name); |
|
| 50 | 3 | foreach ($calls as $call) { |
|
| 51 | 3 | call_user_func_array([$type, $call[0]], $call[1]); |
|
| 52 | 2 | } |
|
| 53 | 2 | } |
|
| 54 | |||
| 55 | 6 | $this->entityManager->getConnection()->getDatabasePlatform()->registerDoctrineTypeMapping($name, $name); |
|
| 56 | 6 | } |
|
| 57 | |||
| 82 |