Passed
Pull Request — master (#184)
by
unknown
04:04
created

AuthenticationManagerPolyfillPass   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 6
dl 0
loc 10
rs 10
c 1
b 1
f 0
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A process() 0 8 3
1
<?php
2
/*
3
4
This file was created by developers working at BitBag
5
6
Do you need more information about us and what we do? Visit our   website!
7
8
We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career
9
*/
10
declare(strict_types=1);
11
12
namespace BitBag\SyliusElasticsearchPlugin\CompillerPass;
13
14
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
15
use Symfony\Component\DependencyInjection\ContainerBuilder;
16
17
final class AuthenticationManagerPolyfillPass implements CompilerPassInterface
18
{
19
    public function process(ContainerBuilder $container)
20
    {
21
        if (
22
            false === $container->has('security.authentication_manager')
23
            &&
24
            true === $container->has('security.authentication.manager')
25
        ) {
26
            $container->setAlias('security.authentication_manager', 'security.authentication.manager');
27
        }
28
    }
29
}
30