ServicesCompilerPass   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 12
ccs 0
cts 6
cp 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 7 1
1
<?php
2
3
namespace Terox\SubscriptionBundle\DependencyInjection\Compiler;
4
5
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
use Terox\SubscriptionBundle\TeroxSubscriptionBundle;
8
9
class ServicesCompilerPass implements CompilerPassInterface
10
{
11
    /**
12
     * {@inheritdoc}
13
     */
14
    public function process(ContainerBuilder $container)
15
    {
16
        $productRepository      = $container->getParameter('terox_subscription.config.product.repository');
17
        $subscriptionRepository = $container->getParameter('terox_subscription.config.subscription.repository');
18
19
        $container->setAlias(str_replace('_', '.', 'terox_subscription').'.repository.product', $productRepository);
20
        $container->setAlias(str_replace('_', '.', 'terox_subscription').'.repository.subscription', $subscriptionRepository);
21
    }
22
}
23