Passed
Push — master ( 1894e2...bea9fb )
by Siim
14:17
created

Sf4ApiExtension   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 7 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: siim
5
 * Date: 25.02.19
6
 * Time: 9:45
7
 */
8
9
namespace Sf4\Api\DependencyInjection;
10
11
use Symfony\Component\Config\FileLocator;
12
use Symfony\Component\DependencyInjection\ContainerBuilder;
13
use Symfony\Component\DependencyInjection\Extension\Extension;
14
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
15
16
class Sf4ApiExtension extends Extension
17
{
18
19
    /**
20
     * @param array $configs
21
     * @param ContainerBuilder $container
22
     * @throws \Exception
23
     */
24
    public function load(array $configs, ContainerBuilder $container)
25
    {
26
        $loader = new YamlFileLoader(
27
            $container,
28
            new FileLocator(__DIR__.'/../Resources/config')
29
        );
30
        $loader->load('services.yaml');
31
    }
32
}
33