FakeExtension   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 0
cbo 3
dl 0
loc 30
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A load() 0 9 1
A getAlias() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the Visithor package.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 *
9
 * Feel free to edit as you please, and have fun.
10
 *
11
 * @author Marc Morera <[email protected]>
12
 */
13
14
namespace Visithor\Bundle\Tests\FakeBundle\DependencyInjection;
15
16
use Symfony\Component\Config\FileLocator;
17
use Symfony\Component\DependencyInjection\ContainerBuilder;
18
use Symfony\Component\DependencyInjection\Extension\Extension;
19
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
20
21
/**
22
 * Class FakeExtension
23
 */
24
class FakeExtension extends Extension
25
{
26
    /**
27
     * Loads a specific configuration.
28
     *
29
     * @param array            $config    An array of configuration values
30
     * @param ContainerBuilder $container A ContainerBuilder instance
31
     *
32
     * @throws \InvalidArgumentException When provided tag is not defined in this extension
33
     *
34
     * @api
35
     */
36
    public function load(array $config, ContainerBuilder $container)
37
    {
38
        $loader = new YamlFileLoader(
39
            $container, new
40
            FileLocator(__DIR__ . '/../Resources/config')
41
        );
42
43
        $loader->load('environment.yml');
44
    }
45
46
    /**
47
     * @return string
48
     */
49
    public function getAlias()
50
    {
51
        return 'fake';
52
    }
53
}
54