Completed
Push — master ( 2aa80c...f80030 )
by Alexandru
08:43
created

Extension   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 2
dl 0
loc 42
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A loadInternal() 0 4 1
A getConfiguration() 0 4 1
A getAlias() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the Arkitekto\RequestId library.
5
 *
6
 * (c) Alexandru Furculita <[email protected]>
7
 *
8
 * This source file is subject to the MIT license that is bundled
9
 * with this source code in the file LICENSE.md.
10
 */
11
12
namespace Arki\RequestId\Integrations\Symfony\DependencyInjection;
13
14
use Symfony\Component\DependencyInjection\ContainerBuilder;
15
use Symfony\Component\HttpKernel\DependencyInjection\ConfigurableExtension;
16
17
final class Extension extends ConfigurableExtension
18
{
19
    /**
20
     * @var string
21
     */
22
    private $alias;
23
24
    /**
25
     * @param string $alias
26
     */
27
    public function __construct($alias)
28
    {
29
        $this->alias = $alias;
30
    }
31
32
    /**
33
     * Configures the passed container according to the merged configuration.
34
     *
35
     * @param array            $mergedConfig
36
     * @param ContainerBuilder $container
37
     */
38
    protected function loadInternal(array $mergedConfig, ContainerBuilder $container)
39
    {
40
        // TODO: Implement loadInternal() method.
41
    }
42
43
    /**
44
     * {@inheritdoc}
45
     */
46
    public function getConfiguration(array $config, ContainerBuilder $container)
47
    {
48
        return new Configuration($this->alias);
49
    }
50
51
    /**
52
     * {@inheritdoc}
53
     */
54
    public function getAlias()
55
    {
56
        return $this->alias;
57
    }
58
}
59