Completed
Push — master ( 998494...8e3b13 )
by Rafael
10s
created

YnloGraphQLBundle   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 33.33%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
dl 0
loc 25
ccs 3
cts 9
cp 0.3333
rs 10
c 1
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A build() 0 4 1
A getContainerExtension() 0 3 1
A boot() 0 3 1
1
<?php
2
/*******************************************************************************
3
 *  This file is part of the GraphQL Bundle package.
4
 *
5
 *  (c) YnloUltratech <[email protected]>
6
 *
7
 *  For the full copyright and license information, please view the LICENSE
8
 *  file that was distributed with this source code.
9
 ******************************************************************************/
10
11
namespace Ynlo\GraphQLBundle;
12
13
use Symfony\Component\DependencyInjection\ContainerBuilder;
14
use Symfony\Component\HttpKernel\Bundle\Bundle;
15
use Ynlo\GraphQLBundle\Component\TaggedServices\TaggedServicesCompilerPass;
16
use Ynlo\GraphQLBundle\DependencyInjection\Compiler\ControllerPass;
17
use Ynlo\GraphQLBundle\DependencyInjection\YnloGraphQLExtension;
18
use Ynlo\GraphQLBundle\Type\Loader\TypeAutoLoader;
19
20
/**
21
 * Class YnloGraphQLBundle
22
 */
23
class YnloGraphQLBundle extends Bundle
24
{
25
    /**
26
     * {@inheritDoc}
27
     */
28 21
    public function boot()
29
    {
30 21
        $this->container->get(TypeAutoLoader::class)->autoloadTypes();
31 21
    }
32
33
    /**
34
     * {@inheritDoc}
35
     */
36
    public function build(ContainerBuilder $container)
37
    {
38
        $container->addCompilerPass(new TaggedServicesCompilerPass());
39
        $container->addCompilerPass(new ControllerPass());
40
    }
41
42
    /**
43
     * {@inheritDoc}
44
     */
45
    public function getContainerExtension()
46
    {
47
        return new YnloGraphQLExtension();
48
    }
49
}
50