Passed
Branch master (98ecdf)
by Michael
56:56
created

OsLabSecurityApiBundle::build()   A

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 0
Metric Value
dl 0
loc 8
ccs 0
cts 6
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
crap 2
1
<?php
2
3
/*
4
 * This file is part of the SecurityApiBundle package.
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace OsLab\SecurityApiBundle;
11
12
use OsLab\SecurityApiBundle\DependencyInjection\Security\UserProvider\InMemoryApiFactory;
13
use Symfony\Component\HttpKernel\Bundle\Bundle;
14
use Symfony\Component\DependencyInjection\ContainerBuilder;
15
16
/**
17
 * Class OsLabSecurityApiBundle
18
 *
19
 * @author Michael COULLERET <[email protected]>
20
 */
21
class OsLabSecurityApiBundle extends Bundle
22
{
23
    /**
24
     * {@inheritdoc}
25
     */
26
    public function build(ContainerBuilder $container)
27
    {
28
        parent::build($container);
29
30
        $extension = $container->getExtension('security');
31
32
        $extension->addUserProviderFactory(new InMemoryApiFactory());
33
    }
34
}
35