DoctrineJsonOdmBundle::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 5
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
/*
3
 * This file is part of Goodwix Doctrine JSON ODM.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
9
namespace Goodwix\DoctrineJsonOdm\Bridge\Symfony;
10
11
use Goodwix\DoctrineJsonOdm\Bridge\Symfony\DependencyInjection\ODMTypeCompilerPass;
12
use Goodwix\DoctrineJsonOdm\Service\ODMAutoRegistrar;
13
use Symfony\Component\DependencyInjection\ContainerBuilder;
14
use Symfony\Component\HttpKernel\Bundle\Bundle;
15
16
class DoctrineJsonOdmBundle extends Bundle
17
{
18 1
    public function build(ContainerBuilder $container): void
19
    {
20 1
        $container->addCompilerPass(new ODMTypeCompilerPass());
21
    }
22
23 15
    public function boot(): void
24
    {
25
        /** @var ODMAutoRegistrar $odmAutoRegistrar */
26 15
        $odmAutoRegistrar = $this->container->get(ODMTypeCompilerPass::ODM_AUTO_REGISTRAR);
27 15
        $odmAutoRegistrar->registerODMTypes();
28
    }
29
}
30