RemoveAliases::process()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 3
nc 2
nop 1
crap 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 1
    public function process(ContainerBuilder $container)
19
    {
20 1
        foreach ($container->getAliases() as $key => $value) {
21 1
            $value->setPublic(false);
22
        }
23 1
    }
24
}
25