| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 34 | public function prepend(ContainerBuilder $container) |
||
| 35 | { |
||
| 36 | $requiredBundles = [ |
||
| 37 | 'DoctrineBundle', |
||
| 38 | ]; |
||
| 39 | // get all bundles |
||
| 40 | $bundles = $container->getParameter('kernel.bundles'); |
||
| 41 | // determine if required bundles are registered |
||
| 42 | foreach ($requiredBundles as $requiredBundle) { |
||
| 43 | if (!isset($bundles[$requiredBundle])) { |
||
| 44 | throw new \RuntimeException($requiredBundle.' must be registered in your application.'); |
||
| 45 | } |
||
| 58 |