| Conditions | 4 |
| Paths | 4 |
| Total Lines | 22 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 15 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | 4 | public function load(array $configs, ContainerBuilder $container) |
|
| 21 | { |
||
| 22 | 4 | $configuration = new Configuration(); |
|
| 23 | 4 | $config = $this->processConfiguration($configuration, $configs); |
|
| 24 | |||
| 25 | 4 | $container->setParameter('enum.register_bundles', $config['register_bundles']); |
|
| 26 | |||
| 27 | 4 | $xmlLoader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config')); |
|
| 28 | 4 | $xmlLoader->load('services.xml'); |
|
| 29 | 4 | $xmlLoader->load('forms.xml'); |
|
| 30 | 4 | $xmlLoader->load('validators.xml'); |
|
| 31 | 4 | $xmlLoader->load('twig.xml'); |
|
| 32 | |||
| 33 | 4 | if ($config['enum_autoconfiguration'] && method_exists($container, 'registerForAutoconfiguration')) { |
|
| 34 | 3 | $container->registerForAutoconfiguration(EnumInterface::class) |
|
| 35 | 3 | ->addTag('enum'); |
|
| 36 | } |
||
| 37 | |||
| 38 | 4 | if ($config['enum_registry_autoconfigurable']) { |
|
| 39 | 3 | $container->setAlias(EnumRegistryInterface::class, 'enum.registry'); |
|
| 40 | } |
||
| 41 | 4 | } |
|
| 42 | } |
||
| 43 |