Completed
Push — master ( e5c4e9...1f2b71 )
by Matze
07:17
created

RemoveAliases   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 8 2
1
<?php
2
3
namespace BrainExe\Core\DependencyInjection\CompilerPass;
4
5
use BrainExe\Core\Annotations\CompilerPass;
6
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8
9
/**
10
 * @CompilerPass(type="beforeRemoving")
11
 */
12
class RemoveAliases implements CompilerPassInterface
13
{
14
15
    /**
16
     * {@inheritdoc}
17
     */
18
    public function process(ContainerBuilder $container)
19
    {
20
21
        foreach ($container->getAliases() as $key => $value) {
22
            $container->removeAlias($value);
23
            $container->removeAlias($key);
24
        }
25
    }
26
27
28
}
29