Completed
Pull Request — master (#108)
by Julián
26:17 queued 06:59
created

ObjectManagerCompilerPass::process()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
cc 2
nc 2
nop 1
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