Completed
Pull Request — master (#32)
by Yann
03:35
created

YokaiSecurityTokenBundle::build()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 20

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 12
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 20
c 0
b 0
f 0
ccs 12
cts 12
cp 1
rs 9.6
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
namespace Yokai\SecurityTokenBundle;
4
5
use Symfony\Component\Console\Application;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
use Symfony\Component\HttpKernel\Bundle\Bundle;
8
use Yokai\DependencyInjection\CompilerPass\ArgumentRegisterTaggedServicesCompilerPass;
9
use Yokai\SecurityTokenBundle\Manager\UserManagerInterface;
10
11
/**
12
 * @author Yann Eugoné <[email protected]>
13
 */
14
class YokaiSecurityTokenBundle extends Bundle
15
{
16
    /**
17
     * @inheritDoc
18
     */
19 4
    public function build(ContainerBuilder $container)
20
    {
21 4
        $registerTokenConfiguration = new ArgumentRegisterTaggedServicesCompilerPass(
0 ignored issues
show
Comprehensibility Naming introduced by
The variable name $registerTokenConfiguration exceeds the maximum configured length of 20.

Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.

Loading history...
22 4
            'yokai_security_token.configuration_registry',
23 4
            'yokai_security_token.configuration',
24 4
            null,
25
            0
26
        );
27 4
        $registerUserManager = new ArgumentRegisterTaggedServicesCompilerPass(
28 4
            'yokai_security_token.user_manager',
29 4
            'yokai_security_token.user_manager',
30 4
            UserManagerInterface::class,
31
            0
32
        );
33
34
        $container
35 4
            ->addCompilerPass($registerTokenConfiguration)
36 4
            ->addCompilerPass($registerUserManager)
37
        ;
38 4
    }
39
40
    /**
41
     * @inheritDoc
42
     */
43 2
    public function registerCommands(Application $application)
44
    {
45
        // commands are registered as services
46 2
    }
47
}
48