MegaMANExtension   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 4
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A load() 0 9 2
1
<?php
2
3
namespace Knp\MegaMAN\DependencyInjection;
4
5
use Symfony\Component\Config\FileLocator;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
use Symfony\Component\DependencyInjection\Extension\Extension;
8
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
9
10
class MegaMANExtension extends Extension
11
{
12
    /**
13
     * {@inheritdoc}
14
     */
15
    public function load(array $config, ContainerBuilder $container)
16
    {
17
        if ($container->getParameter('kernel.environment') !== 'dev') {
18
            return;
19
        }
20
21
        $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
22
        $loader->load('services.yml');
23
    }
24
}
25