Completed
Push — master ( 76b5db...d28136 )
by Julito
13:35
created

RepositoryCompilerClass   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 6
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 6
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 4 2
1
<?php
2
/* For licensing terms, see /license.txt */
3
4
namespace Chamilo\CoreBundle\DependencyInjection\Compiler;
5
6
use Chamilo\CoreBundle\ToolChain;
7
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
8
use Symfony\Component\DependencyInjection\ContainerBuilder;
9
use Symfony\Component\DependencyInjection\Reference;
10
11
/**
12
 * Class ToolCompilerClass.
13
 * Search the services with tag "chamilo_core.tool" in order to be added
14
 * as a tool (Documents, Notebook, etc).
15
 *
16
 * See:
17
 * https://symfony.com/doc/current/service_container/tags.html
18
 */
19
class RepositoryCompilerClass implements CompilerPassInterface
20
{
21
    public function process(ContainerBuilder $container)
22
    {
23
        if (!$container->has(ToolChain::class)) {
24
            return;
25
        }
26
27
        /*$taggedServices = $container->findTaggedServiceIds('chamilo_core.resource_repository');
28
        foreach ($taggedServices as $id => $attributes) {
29
            $definition = $container->getDefinition($id);
30
            $definition->setArguments([$definition->getClass()]);
31
        }*/
32
    }
33
}
34