src/Registrator/EnumTypeRegistrator.php 1 location
|
@@ 123-129 (lines=7) @@
|
| 120 |
|
* @throws InvalidArgumentException |
| 121 |
|
* @throws DBALException |
| 122 |
|
*/ |
| 123 |
|
public function registerEnumTypes(array $types) |
| 124 |
|
{ |
| 125 |
|
foreach ($types as $typeName => $enumClass) { |
| 126 |
|
$typeName = is_string($typeName) ? $typeName : $enumClass; |
| 127 |
|
$this->registerEnumType($typeName, $enumClass); |
| 128 |
|
} |
| 129 |
|
} |
| 130 |
|
} |
| 131 |
|
|
src/Type/PhpEnumType.php 1 location
|
@@ 42-48 (lines=7) @@
|
| 39 |
|
* @throws InvalidArgumentException |
| 40 |
|
* @throws DBALException |
| 41 |
|
*/ |
| 42 |
|
public static function registerEnumTypes(array $types) |
| 43 |
|
{ |
| 44 |
|
foreach ($types as $typeName => $enumClass) { |
| 45 |
|
$typeName = is_string($typeName) ? $typeName : $enumClass; |
| 46 |
|
static::registerEnumType($typeName, $enumClass); |
| 47 |
|
} |
| 48 |
|
} |
| 49 |
|
} |
| 50 |
|
|