Passed
Push — master ( dd3b28...5b41a6 )
by Gerhard
10:03
created

ConditionUrlMatcherCompilerPass::process()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 3
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
ccs 0
cts 4
cp 0
crap 2
rs 10
1
<?php
2
3
namespace Enhavo\Bundle\MultiTenancyBundle\DependencyInjection\Compiler;
4
5
use Enhavo\Bundle\MultiTenancyBundle\Matcher\ConditionUrlMatcher;
6
use Enhavo\Bundle\MultiTenancyBundle\Resolver\ResolverInterface;
7
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
8
use Symfony\Component\DependencyInjection\ContainerBuilder;
9
use Symfony\Component\DependencyInjection\Reference;
10
11
class ConditionUrlMatcherCompilerPass implements CompilerPassInterface
12
{
13
    public function process(ContainerBuilder $container)
14
    {
15
        $definition = $container->getDefinition('cmf_routing.final_matcher');
16
        $definition->setClass(ConditionUrlMatcher::class);
17
        $definition->addArgument(new Reference(ResolverInterface::class));
18
    }
19
}
20