Code Duplication    Length = 10-10 lines in 3 locations

src/Starkerxp/CampagneBundle/Render/RenderPass.php 1 location

@@ 15-24 (lines=10) @@
12
use Symfony\Component\DependencyInjection\ContainerBuilder;
13
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
14
15
class RenderPass implements CompilerPassInterface
16
{
17
    public function process(ContainerBuilder $container)
18
    {
19
        $definition = $container->findDefinition('starkerxp_campagne.manager.render');
20
        foreach (array_keys($container->findTaggedServiceIds('starkerxp_campagne.render')) as $id) {
21
            $definition->addMethodCall('addRenderService', [new Reference($id)]);
22
        }
23
    }
24
}
25

src/Starkerxp/StructureBundle/Manager/ManagerPass.php 1 location

@@ 15-24 (lines=10) @@
12
use Symfony\Component\DependencyInjection\ContainerBuilder;
13
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
14
15
class ManagerPass implements CompilerPassInterface
16
{
17
    public function process(ContainerBuilder $container)
18
    {
19
        $definition = $container->findDefinition('starkerxp_structure.manager.entity');
20
        foreach (array_keys($container->findTaggedServiceIds('starkerxp.manager.entity')) as $id) {
21
            $definition->addMethodCall('addService', [new Reference($id)]);
22
        }
23
    }
24
}
25

src/Starkerxp/CampagneBundle/Api/ApiPass.php 1 location

@@ 9-18 (lines=10) @@
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
use Symfony\Component\DependencyInjection\Reference;
8
9
class ApiPass implements CompilerPassInterface
10
{
11
    public function process(ContainerBuilder $container)
12
    {
13
        $definition = $container->findDefinition('starkerxp_campagne.api.manager');
14
        foreach (array_keys($container->findTaggedServiceIds('starkerxp_campagne.api')) as $id) {
15
            $definition->addMethodCall('addApiService', [new Reference($id)]);
16
        }
17
    }
18
}
19