| Conditions | 1 |
| Paths | 1 |
| Total Lines | 26 |
| Code Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 19 |
| CRAP Score | 1 |
| Changes | 6 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 23 | 27 | public static function buildContainer() |
|
| 24 | { |
||
| 25 | 27 | $containerBuilder = new ContainerBuilder(); |
|
| 26 | |||
| 27 | 27 | $loader = new YamlFileLoader($containerBuilder, new FileLocator(__DIR__ . '/../Resources/config/')); |
|
| 28 | 27 | $loader->load('configuration.yml'); |
|
| 29 | 27 | $loader->load('file.yml'); |
|
| 30 | 27 | $loader->load('output_container.yml'); |
|
| 31 | 27 | $loader->load('parser.yml'); |
|
| 32 | 27 | $loader->load('printer.yml'); |
|
| 33 | 27 | $loader->load('services.yml'); |
|
| 34 | |||
| 35 | 27 | $containerBuilder->addCompilerPass(new RegisterListenersPass()); |
|
| 36 | |||
| 37 | 27 | $containerBuilder->setDefinition( |
|
| 38 | 27 | 'event_dispatcher', |
|
| 39 | 27 | new Definition( |
|
| 40 | 27 | 'Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher', |
|
| 41 | 27 | array(new Reference('service_container')) |
|
| 42 | 27 | ) |
|
| 43 | 27 | ); |
|
| 44 | |||
| 45 | 27 | $containerBuilder->compile(); |
|
| 46 | |||
| 47 | 27 | return $containerBuilder; |
|
| 48 | } |
||
| 49 | } |
||
| 50 |