DoLLdapBundle::build()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 8
ccs 0
cts 6
cp 0
crap 2
rs 10
1
<?php
2
3
namespace DoL\LdapBundle;
4
5
use DoL\LdapBundle\Security\Factory\FormLoginLdapFactory;
6
use DoL\LdapBundle\Security\Factory\HttpBasicLdapFactory;
7
use Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension;
8
use Symfony\Component\DependencyInjection\ContainerBuilder;
9
use Symfony\Component\HttpKernel\Bundle\Bundle;
10
11
/**
12
 * DoLLdapBundle.
13
 *
14
 * @author DarwinOnLine
15
 * @author Maks3w
16
 *
17
 * @see https://github.com/DarwinOnLine/DoLLdapBundle
18
 */
19
class DoLLdapBundle extends Bundle
20
{
21
    public function build(ContainerBuilder $container)
22
    {
23
        parent::build($container);
24
25
        /** @var SecurityExtension $extension */
26
        $extension = $container->getExtension('security');
27
        $extension->addSecurityListenerFactory(new FormLoginLdapFactory());
28
        $extension->addSecurityListenerFactory(new HttpBasicLdapFactory());
29
    }
30
}
31