TestExtension   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 3
dl 0
loc 26
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A load() 0 5 1
A getAlias() 0 4 1
1
<?php
2
3
/*
4
 * The MIT License (MIT)
5
 *
6
 * Copyright (c) 2014-2016 Spomky-Labs
7
 *
8
 * This software may be modified and distributed under the terms
9
 * of the MIT license.  See the LICENSE file for details.
10
 */
11
12
namespace SpomkyLabs\TestRoleHierarchyBundle\DependencyInjection;
13
14
use Symfony\Component\Config\FileLocator;
15
use Symfony\Component\DependencyInjection\ContainerBuilder;
16
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
17
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
18
19
class TestExtension extends Extension
20
{
21
    private $alias;
22
23
    /**
24
     * @param string $alias
25
     */
26
    public function __construct($alias)
27
    {
28
        $this->alias = $alias;
29
    }
30
31
    public function load(array $configs, ContainerBuilder $container)
32
    {
33
        $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
34
        $loader->load('services.xml');
35
    }
36
37
    /**
38
     * @return string
39
     */
40
    public function getAlias()
41
    {
42
        return $this->alias;
43
    }
44
}
45