RegisterControlRendererPass   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 14
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 8 2
1
<?php
2
3
/*
4
 * This file is part of the Ivory Google Map bundle package.
5
 *
6
 * (c) Eric GELOEN <[email protected]>
7
 *
8
 * For the full copyright and license information, please read the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Ivory\GoogleMapBundle\DependencyInjection\Compiler;
13
14
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
15
use Symfony\Component\DependencyInjection\ContainerBuilder;
16
use Symfony\Component\DependencyInjection\Reference;
17
18
/**
19
 * @author GeLo <[email protected]>
20
 */
21
class RegisterControlRendererPass implements CompilerPassInterface
22
{
23
    /**
24
     * {@inheritdoc}
25
     */
26 57
    public function process(ContainerBuilder $container)
27
    {
28 57
        $controlManagerRenderer = $container->getDefinition('ivory.google_map.helper.renderer.control.manager');
29
30 57
        foreach ($container->findTaggedServiceIds('ivory.google_map.helper.renderer.control') as $id => $attributes) {
31 57
            $controlManagerRenderer->addMethodCall('addRenderer', [new Reference($id)]);
32
        }
33 57
    }
34
}
35