BlackCommonExtension   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A load() 0 8 2
A getAlias() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the Black package.
5
 *
6
 * (c) Alexandre Balmes <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Black\Bundle\CommonBundle\DependencyInjection;
13
14
use Symfony\Component\DependencyInjection\ContainerBuilder;
15
use Symfony\Component\Config\FileLocator;
16
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
17
use Symfony\Component\DependencyInjection\Loader;
18
19
/**
20
 * Class BlackCommonExtension
21
 *
22
 * This is the class that loads and manages your bundle configuration
23
 *
24
 * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html}
25
 */
26
class BlackCommonExtension extends Extension
27
{
28
    /**
29
     * {@inheritDoc}
30
     */
31
    public function load(array $configs, ContainerBuilder $container)
32
    {
33
        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
34
35
        foreach (['services'] as $service) {
36
            $loader->load(sprintf('%s.yml', $service));
37
        }
38
    }
39
40
    /**
41
     * @return string
42
     */
43
    public function getAlias()
44
    {
45
        return 'black_common';
46
    }
47
}
48