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

AuthenticationManagerPolyfillPass   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
eloc 6
c 1
b 1
f 0
dl 0
loc 11
rs 10
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
20
    public function process(ContainerBuilder $container)
21
    {
22
        if (
23
            $container->has('security.authentication_manager') === false
24
            &&
25
            $container->has('security.authentication.manager') === true
26
        ) {
27
            $container->setAlias('security.authentication_manager', 'security.authentication.manager');
28
        }
29
    }
30
}
31