Completed
Pull Request — master (#120)
by De Cramer
02:35
created

Override   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 5 1
1
<?php
2
3
namespace eXpansion\Bundle\ImmersiveWindows\DependencyInjection\Compiler;
4
5
use eXpansion\Bundle\ImmersiveWindows\Plugins\WindowsGuiHandler;
6
use eXpansion\Framework\Core\Model\Gui\WindowFactoryContext;
7
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
8
use Symfony\Component\DependencyInjection\ContainerBuilder;
9
use Symfony\Component\DependencyInjection\Reference;
10
11
/**
12
 * Class Pass
13
 *
14
 * @author    de Cramer Oliver<[email protected]>
15
 * @copyright 2017 Smile
16
 * @package eXpansion\Bundle\Menu\DependencyInjection\Compiler
17
 */
18
class Override implements CompilerPassInterface
19
{
20
21
    /**
22
     * Modifying the window factory context to use custom gui handler.
23
     *
24
     * @param ContainerBuilder $container
25
     */
26
    public function process(ContainerBuilder $container)
27
    {
28
        $container->getDefinition(WindowFactoryContext::class)
29
            ->setArgument('$guiHandler', new Reference(WindowsGuiHandler::class));
30
    }
31
}
32