Completed
Push — master ( b288e2...4e6c2b )
by Michael
05:02 queued 02:08
created

OsLabSecurityApiBundle::build()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 1
crap 1
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 3
    public function build(ContainerBuilder $container)
27
    {
28 3
        parent::build($container);
29
30 3
        $extension = $container->getExtension('security');
31
32 3
        $extension->addUserProviderFactory(new InMemoryApiFactory());
33 3
    }
34
}
35