Completed
Push — master ( b8ee64...bf1b53 )
by Nikola
04:04
created

RateTypeCompilerPass   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 3
dl 0
loc 19
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 13 2
1
<?php
2
3
namespace RunOpenCode\Bundle\ExchangeRate\DependencyInjection\CompilerPass;
4
5
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
use Symfony\Component\DependencyInjection\Reference;
8
9
class RateTypeCompilerPass implements CompilerPassInterface
10
{
11
    /**
12
     * {@inheritdoc}
13
     */
14
    public function process(ContainerBuilder $container)
15
    {
16
        if ($container->hasDefinition('run_open_code.exchange_rate.form_type.rate_type')) {
17
18
            $container
19
                ->getDefinition('run_open_code.exchange_rate.form_type.rate_type')
20
                ->setArguments(array(
21
                    new Reference('run_open_code.exchange_rate.registry.rates'),
22
                    new Reference('translator'),
23
                    $container->getParameter('run_open_code.exchange_rate.form_type.rate_type')
24
                ));
25
        }
26
    }
27
}
28