PsyshBundle::build()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
declare(strict_types=1);
3
4
namespace AlexMasterov\PsyshBundle;
5
6
use AlexMasterov\PsyshBundle\DependencyInjection\{
7
    Compiler\AddCommandPass,
8
    Compiler\AddMatchersPass,
9
    Compiler\SetVariablePass,
10
    Extension
11
};
12
use Symfony\Component\Console\Application;
13
use Symfony\Component\DependencyInjection\ContainerBuilder;
14
use Symfony\Component\HttpKernel\Bundle\Bundle;
15
16
class PsyshBundle extends Bundle
17
{
18
    /** {@inheritdoc} */
19 1
    public function build(ContainerBuilder $container)
20
    {
21 1
        parent::build($container);
22
23 1
        $container->addCompilerPass(new AddCommandPass());
24 1
        $container->addCompilerPass(new AddMatchersPass());
25 1
        $container->addCompilerPass(new SetVariablePass());
26 1
    }
27
28
    /** {@inheritdoc} */
29 1
    public function getContainerExtension()
30
    {
31 1
        return $this->extension
32 1
            ?? $this->extension = new Extension();
33
    }
34
35
    /**
36
     * {@inheritdoc}
37
     * @codeCoverageIgnore
38
     */
39
    public function registerCommands(Application $application)
40
    {
41
    }
42
}
43