Completed
Push — master ( 3ce292...22c6ba )
by Marcos
01:36
created

EntityManagerCompilerPass::process()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 0
loc 9
ccs 0
cts 8
cp 0
rs 9.6666
cc 2
eloc 5
nc 2
nop 1
crap 6
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
 * CustomUserProviderCompilerPass.
10
 */
11
final class EntityManagerCompilerPass implements CompilerPassInterface
12
{
13
    /**
14
     * {@inheritdoc}
15
     */
16
    public function process(ContainerBuilder $container)
17
    {
18
        $entityManagerId = $container->getParameter('gesdinet.jwtrefreshtoken.entity_manager.id');
19
        if (!$entityManagerId) {
20
            return;
21
        }
22
23
        $container->setAlias('gesdinet.jwtrefreshtoken.entity_manager', $entityManagerId);
24
    }
25
}
26