Completed
Push — master ( 293a61...e1a0d3 )
by
unknown
12s
created

StopwatchPass::process()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 8
ccs 0
cts 7
cp 0
rs 9.4285
cc 2
eloc 4
nc 2
nop 1
crap 6
1
<?php
2
3
namespace MovingImage\Bundle\VMProApiBundle\DependencyInjection\Compiler;
4
5
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
use Symfony\Component\DependencyInjection\Reference;
8
9
class StopwatchPass implements CompilerPassInterface
10
{
11
    /**
12
     * {@inheritdoc}
13
     */
14
    public function process(ContainerBuilder $container)
15
    {
16
        $clientDefinition = $container->getDefinition('vmpro_api.client');
17
18
        if ($container->getParameter('vm_pro_api_enable_stopwatch')) {
19
            $clientDefinition->setArgument(5, new Reference('vmpro_api.stopwatch'));
20
        }
21
    }
22
}
23