RemoveExtensionsPass   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
c 0
b 0
f 0
dl 0
loc 16
rs 10
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 8 3
1
<?php
2
/**
3
 * @author Muhammed Akbulut <[email protected]>
4
 * @author Gerard van Helden <[email protected]>
5
 * @copyright Zicht Online <http://www.zicht.nl>
6
 */
7
8
namespace Zicht\Bundle\FrameworkExtraBundle\DependencyInjection\Compiler;
9
10
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
11
use Symfony\Component\DependencyInjection\ContainerBuilder;
12
13
/**
14
 * Class Pass
15
 *
16
 * @package Zicht\Bundle\FrameworkExtraBundle\DependencyInjection\Compiler
17
 */
18
class RemoveExtensionsPass implements CompilerPassInterface
19
{
20
    /**
21
     * Adds extra configurations
22
     *
23
     * @param ContainerBuilder $container
24
     * @return null
25
     */
26
    public function process(ContainerBuilder $container)
27
    {
28
        if (!$container->hasExtension('doctrine')) {
29
            $container->removeDefinition('zicht_framework_extra.form.zicht_parent_choice_type');
30
        }
31
32
        if (!$container->hasExtension('liip_imagine')) {
33
            $container->removeDefinition('zicht_framework_extra.imagine.match_filter_loader');
34
        }
35
    }
36
}
37