AMFConsoleExtension   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 5
dl 0
loc 17
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 11 1
1
<?php
2
3
/*
4
 * This file is part of the Social Live project.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace AMF\ConsoleBundle\DependencyInjection;
11
12
use Symfony\Component\DependencyInjection\ContainerBuilder;
13
use Symfony\Component\Config\FileLocator;
14
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
15
use Symfony\Component\DependencyInjection\Loader;
16
17
/**
18
 * Class AMFConsoleExtension.
19
 *
20
 * @author Amine Fattouch <[email protected]>
21
 */
22
class AMFConsoleExtension extends Extension
23
{
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function load(array $configs, ContainerBuilder $container)
28
    {
29
        $configuration = new Configuration();
30
        $config        = $this->processConfiguration($configuration, $configs);
31
32
        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
33
        $loader->load('form/console_application.yml');
34
        $loader->load('validator.yml');
35
36
        $container->setParameter('amf_console.allowed_prefixes', $config['allowed_prefixes']);
37
    }
38
}
39