MajimaExtension   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
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
 * Copyright (c) 2017
4
 *
5
 * @package   Majima
6
 * @author    David Neustadt <[email protected]>
7
 * @copyright 2017 David Neustadt
8
 * @license   MIT
9
 */
10
11
namespace Majima\DependencyInjection;
12
13
use Symfony\Component\Config\FileLocator;
14
use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
15
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
16
use Symfony\Component\DependencyInjection\ContainerBuilder;
17
18
/**
19
 * Class MajimaExtension
20
 * @package Majima\DependencyInjection
21
 */
22
class MajimaExtension extends Extension
23
{
24
    /**
25
     * @param array $configs
26
     * @param ContainerBuilder $container
27
     */
28
    public function load(array $configs, ContainerBuilder $container)
29
    {
30
        $loader = new PhpFileLoader(
31
            $container,
32
            new FileLocator(BASE_DIR . 'config')
0 ignored issues
show
Bug introduced by
The constant Majima\DependencyInjection\BASE_DIR was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
33
        );
34
        $loader->load('services.php');
35
    }
36
}