RulesPass   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 4
c 1
b 0
f 0
dl 0
loc 8
ccs 4
cts 4
cp 1
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 6 2
1
<?php
2
3
namespace Obblm\Core\DependencyInjection\CompilerPass;
4
5
use Obblm\Core\Helper\RuleHelper;
6
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
7
use Symfony\Component\DependencyInjection\ContainerBuilder;
8
use Symfony\Component\DependencyInjection\Reference;
9
10
class RulesPass implements CompilerPassInterface
11
{
12 2
    public function process(ContainerBuilder $container)
13
    {
14 2
        $definition = $container->findDefinition(RuleHelper::class);
15
16 2
        foreach ($container->findTaggedServiceIds('obblm.rule_helpers') as $id => $tags) {
17 2
            $definition->addMethodCall('addHelper', [new Reference($id)]);
18
        }
19 2
    }
20
}
21