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

YnloGraphQLBundle::boot()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
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