BassterLegacyBridgeExtension   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 5
dl 0
loc 33
ccs 18
cts 18
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A loadInternal() 0 29 1
1
<?php
2
3
namespace Basster\LegacyBridgeBundle\DependencyInjection;
4
5
use Symfony\Component\Config\FileLocator;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
use Symfony\Component\DependencyInjection\Loader;
8
use Symfony\Component\HttpKernel\DependencyInjection\ConfigurableExtension;
9
10
/**
11
 * This is the class that loads and manages your bundle configuration.
12
 *
13
 * @link http://symfony.com/doc/current/cookbook/bundles/extension.html
14
 */
15
class BassterLegacyBridgeExtension extends ConfigurableExtension
16
{
17
    /** {@inheritdoc} */
18 4
    protected function loadInternal(
19
      array $mergedConfig,
20
      ContainerBuilder $container
21
    ) {
22 4
        $container->getParameterBag()
23 4
                  ->set(
24 4
                    'basster_legacy_bridge.legacy_path',
25 4
                    $mergedConfig['legacy_path']
26
                  )
27
        ;
28 4
        $container->getParameterBag()
29 4
                  ->set(
30 4
                    'basster_legacy_bridge.prepend_script',
31 4
                    $mergedConfig['prepend_script']
32
                  )
33
        ;
34 4
        $container->getParameterBag()
35 4
                  ->set(
36 4
                    'basster_legacy_bridge.append_script',
37 4
                    $mergedConfig['append_script']
38
                  )
39
        ;
40
41 4
        $loader = new Loader\XmlFileLoader(
42 4
          $container,
43 4
          new FileLocator(__DIR__ . '/../Resources/config')
44
        );
45 4
        $loader->load('services.xml');
46 4
    }
47
}
48