Completed
Pull Request — master (#2)
by Beñat
02:41
created

CmsKernelBenGorFileBridgeBundle::build()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the CMS Kernel package.
5
 *
6
 * Copyright (c) 2016-present LIN3S <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace LIN3S\CMSKernel\Infrastructure\BenGorFileBundle;
13
14
use LIN3S\CMSKernel\Infrastructure\BenGorFileBundle\DependencyInjection\Compiler\CheckBenGorFileTypesPass;
15
use LIN3S\CMSKernel\Infrastructure\BenGorFileBundle\DependencyInjection\Compiler\DeclareFileFormTypesPass;
16
use LIN3S\CMSKernel\Infrastructure\BenGorFileBundle\DependencyInjection\Compiler\DeclareHttpActionsPass;
17
use LIN3S\CMSKernel\Infrastructure\BenGorFileBundle\DependencyInjection\Compiler\RegisterRoutesPass;
18
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
19
use Symfony\Component\DependencyInjection\ContainerBuilder;
20
use Symfony\Component\HttpKernel\Bundle\Bundle;
21
22
/**
23
 * @author Beñat Espiña <[email protected]>
24
 */
25
class CmsKernelBenGorFileBridgeBundle extends Bundle
26
{
27
    public function build(ContainerBuilder $container)
28
    {
29
        $container->addCompilerPass(new CheckBenGorFileTypesPass(), PassConfig::TYPE_OPTIMIZE);
30
        $container->addCompilerPass(new DeclareFileFormTypesPass(), PassConfig::TYPE_OPTIMIZE);
31
        $container->addCompilerPass(new DeclareHttpActionsPass(), PassConfig::TYPE_OPTIMIZE);
32
        $container->addCompilerPass(new RegisterRoutesPass(), PassConfig::TYPE_OPTIMIZE);
33
    }
34
}
35