| Conditions | 4 |
| Paths | 5 |
| Total Lines | 19 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 4.1967 |
| Changes | 2 | ||
| Bugs | 1 | Features | 1 |
| 1 | <?php |
||
| 16 | 3 | public function process(ContainerBuilder $container) |
|
| 17 | { |
||
| 18 | 3 | $bundles = $container->getParameter('enum.register_bundles'); |
|
| 19 | |||
| 20 | 3 | if (!$bundles) { |
|
| 21 | return; |
||
| 22 | } |
||
| 23 | |||
| 24 | 3 | if (true === $bundles) { |
|
| 25 | $bundles = $container->getParameter('kernel.bundles'); |
||
| 26 | } else { |
||
| 27 | 3 | $bundles = (array) $bundles; |
|
| 28 | } |
||
| 29 | |||
| 30 | 3 | foreach ($bundles as $bundleClass) { |
|
| 31 | 3 | $declarativePass = new DeclarativeEnumCollectorCompilerPass($bundleClass); |
|
| 32 | 3 | $declarativePass->process($container); |
|
| 33 | 3 | } |
|
| 34 | 3 | } |
|
| 35 | } |
||
| 36 |