Completed
Pull Request — master (#26)
by Yann
02:21
created

YokaiSecurityTokenBundle   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Coupling/Cohesion

Dependencies 3

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
cbo 3
dl 0
loc 34
ccs 14
cts 14
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A build() 0 20 1
A registerCommands() 0 4 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