DoctrineJsonOdmBundle   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 1
b 0
f 0
dl 0
loc 12
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A build() 0 3 1
A boot() 0 5 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