SymplifyActionAutowireBundle   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 6

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 6
dl 0
loc 20
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getContainerExtension() 0 4 1
A build() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of Symplify
7
 * Copyright (c) 2015 Tomas Votruba (http://tomasvotruba.cz).
8
 */
9
10
namespace Symplify\ActionAutowire;
11
12
use Symfony\Component\DependencyInjection\ContainerBuilder;
13
use Symfony\Component\HttpKernel\Bundle\Bundle;
14
use Symplify\ActionAutowire\DependencyInjection\Compiler\AddServiceLocatorCompilerPass;
15
use Symplify\ActionAutowire\DependencyInjection\Compiler\ServicesByTypeMapCompilerPass;
16
use Symplify\ActionAutowire\DependencyInjection\Container\ServicesByTypeMap;
17
use Symplify\ActionAutowire\DependencyInjection\Extension\ContainerExtension;
18
19
final class SymplifyActionAutowireBundle extends Bundle
20
{
21
    /**
22
     * {@inheritdoc}
23
     */
24 2
    public function getContainerExtension() : ContainerExtension
25
    {
26 2
        return new ContainerExtension();
27
    }
28
29
    /**
30
     * {@inheritdoc}
31
     */
32 2
    public function build(ContainerBuilder $containerBuilder)
33
    {
34 2
        $serviceByTypeMap = new ServicesByTypeMap();
35 2
        $containerBuilder->addCompilerPass(new ServicesByTypeMapCompilerPass($serviceByTypeMap));
36 2
        $containerBuilder->addCompilerPass(new AddServiceLocatorCompilerPass($serviceByTypeMap));
37 2
    }
38
}
39