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

EntityManagerCompilerPass   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 2
c 1
b 1
f 0
lcom 0
cbo 1
dl 0
loc 15
ccs 0
cts 8
cp 0
rs 10

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
 * 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