Passed
Push — master ( c39fb6...9e9a0d )
by Rafael
04:42
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\YnloGraphQLExtension;
17
use Ynlo\GraphQLBundle\Type\TypeAutoLoader;
18
19
/**
20
 * Class YnloGraphQLBundle
21
 */
22
class YnloGraphQLBundle extends Bundle
23
{
24
    /**
25
     * {@inheritDoc}
26
     */
27 21
    public function boot()
28
    {
29 21
        $this->container->get(TypeAutoLoader::class)->autoloadTypes();
30 21
    }
31
32
    /**
33
     * {@inheritDoc}
34
     */
35
    public function build(ContainerBuilder $container)
36
    {
37
        $container->addCompilerPass(new TaggedServicesCompilerPass());
38
    }
39
40
    /**
41
     * {@inheritDoc}
42
     */
43
    public function getContainerExtension()
44
    {
45
        return new YnloGraphQLExtension();
46
    }
47
}
48