RoachPhpBundle::boot()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 1
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * Copyright (c) 2022 Ne-Lexa <[email protected]>
7
 *
8
 * For the full copyright and license information, please view
9
 * the LICENSE file that was distributed with this source code.
10
 *
11
 * @see https://github.com/Ne-Lexa/roach-php-bundle
12
 */
13
14
namespace Nelexa\RoachPhpBundle;
15
16
use Nelexa\RoachPhpBundle\DependencyInjection\Compiler\RoachCompilerPass;
17
use RoachPHP\Roach;
18
use Symfony\Component\DependencyInjection\ContainerBuilder;
19
use Symfony\Component\HttpKernel\Bundle\Bundle;
20
21
final class RoachPhpBundle extends Bundle
22
{
23 11
    public function boot(): void
24
    {
25 11
        parent::boot();
26 11
        Roach::useContainer($this->container);
27
    }
28
29 1
    public function build(ContainerBuilder $container): void
30
    {
31 1
        $container->addCompilerPass(new RoachCompilerPass());
32
    }
33
}
34