SaulsObjectRegistryExtension::load()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 2
dl 0
loc 5
ccs 4
cts 4
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
/**
3
 * This file is part of the sauls/object-registry-bundle package.
4
 *
5
 * @author    Saulius Vaičeliūnas <[email protected]>
6
 * @link      http://saulius.vaiceliunas.lt
7
 * @copyright 2018
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
13
namespace Sauls\Bundle\ObjectRegistryBundle\DependencyInjection;
14
15
use Symfony\Component\Config\FileLocator;
16
use Symfony\Component\DependencyInjection\ContainerBuilder;
17
use Symfony\Component\DependencyInjection\Extension\Extension;
18
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
19
20
class SaulsObjectRegistryExtension extends Extension
21
{
22
    /**
23
     * Loads a specific configuration.
24
     *
25
     * @param array $configs
26
     * @param ContainerBuilder $container
27
     * @throws \Exception
28
     */
29 1
    public function load(array $configs, ContainerBuilder $container)
30
    {
31 1
        $loader = new YamlFileLoader($container, new FileLocator(dirname(__DIR__).'/Resources/config'));
32 1
        $loader->load('services.yaml');
33 1
        $loader->load('declarations.yaml');
34 1
    }
35
}
36