Completed
Pull Request — master (#233)
by De Cramer
10:00
created

eXpansionConfigExtension::load()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 7
Ratio 100 %

Importance

Changes 0
Metric Value
dl 7
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 2
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: olive
5
 * Date: 12/03/2017
6
 * Time: 10:04
7
 */
8
9
namespace eXpansion\Framework\Config\DependencyInjection;
10
11
use Symfony\Component\DependencyInjection\ContainerBuilder;
12
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
13
use Symfony\Component\Config\FileLocator;
14
use Symfony\Component\DependencyInjection\Loader;
15
16 View Code Duplication
class eXpansionConfigExtension extends Extension
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
17
{
18
19
    /**
20
     * Loads a specific configuration.
21
     *
22
     * @param array $configs An array of configuration values
23
     * @param ContainerBuilder $container A ContainerBuilder instance
24
     *
25
     * @throws \InvalidArgumentException When provided tag is not defined in this extension
26
     */
27
    public function load(array $configs, ContainerBuilder $container)
28
    {
29
        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
30
        $loader->load('services.yml');
31
        $loader->load('plugins.yml');
32
        $loader->load('ui.yml');
33
    }
34
}
35