Test Setup Failed
Pull Request — master (#108)
by Julián
24:10
created

ObjectManagerCompilerPass   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 15
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 9 2
1
<?php
2
3
namespace Gesdinet\JWTRefreshTokenBundle\DependencyInjection\Compiler;
4
5
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
8
/**
9
 * ObjectManagerCompilerPass.
10
 */
11
final class ObjectManagerCompilerPass implements CompilerPassInterface
12
{
13
    /**
14
     * {@inheritdoc}
15
     */
16
    public function process(ContainerBuilder $container)
17
    {
18
        $objectManagerId = $container->getParameter('gesdinet.jwtrefreshtoken.object_manager.id');
19
        if (!$objectManagerId) {
20
            return;
21
        }
22
23
        $container->setAlias('gesdinet.jwtrefreshtoken.object_manager', $objectManagerId);
24
    }
25
}
26