KaliopEzFindSearchEngineExtension   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A loadInternal() 0 10 2
1
<?php
2
3
namespace Kaliop\EzFindSearchEngineBundle\DependencyInjection;
4
5
use Symfony\Component\DependencyInjection\ContainerBuilder;
6
use Symfony\Component\Config\FileLocator;
7
use Symfony\Component\DependencyInjection\Loader;
8
use Symfony\Component\HttpKernel\DependencyInjection\ConfigurableExtension;
9
10
class KaliopEzFindSearchEngineExtension extends ConfigurableExtension
11
{
12
    public static $loadTestConfig = false;
13
14
    protected function loadInternal(array $mergedConfig, ContainerBuilder $container)
15
    {
16
        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
17
        $loader->load('services.yml');
18
19
        if (self::$loadTestConfig != false) {
0 ignored issues
show
Coding Style Best Practice introduced by
It seems like you are loosely comparing two booleans. Considering using the strict comparison !== instead.

When comparing two booleans, it is generally considered safer to use the strict comparison operator.

Loading history...
20
            $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Tests/ezpublish/config'));
21
            $loader->load('services.yml');
22
        }
23
    }
24
}
25