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

StopwatchPass   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 2
c 1
b 1
f 0
lcom 0
cbo 3
dl 0
loc 14
ccs 0
cts 7
cp 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 8 2
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