EventDispatcherDecoratorCompilerPass::process()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 7
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Itkg\DelayEventBundle\DependencyInjection\Compiler;
4
5
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
8
/**
9
 * class EventDispatcherDecoratorCompilerPass 
10
 */
11
class EventDispatcherDecoratorCompilerPass implements CompilerPassInterface
12
{
13
    /**
14
     * {@inheritDoc}
15
     */
16
    public function process(ContainerBuilder $container)
17
    {
18
        $definition = $container->findDefinition('event_dispatcher');
19
        $definition->setPublic(false);
20
        $container->setDefinition('itkg_delay_event.event_dispatcher.parent', $definition);
21
        $container->setAlias('event_dispatcher', 'itkg_delay_event.event_dispatcher');
22
    }
23
}
24