Completed
Push — master ( 0aa154...6fc129 )
by Maksim
05:50
created

FOSElasticaBundle::build()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 9
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 11
ccs 9
cts 9
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 8
nc 1
nop 1
crap 1
1
<?php
2
3
/*
4
 * This file is part of the FOSElasticaBundle package.
5
 *
6
 * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
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 FOS\ElasticaBundle;
13
14
use FOS\ElasticaBundle\DependencyInjection\Compiler\ConfigSourcePass;
15
use FOS\ElasticaBundle\DependencyInjection\Compiler\IndexPass;
16
use FOS\ElasticaBundle\DependencyInjection\Compiler\RegisterProvidersPass;
17
use FOS\ElasticaBundle\DependencyInjection\Compiler\TransformerPass;
18
use Symfony\Component\DependencyInjection\ContainerBuilder;
19
use FOS\ElasticaBundle\DependencyInjection\Compiler\RegisterPagerProvidersPass;
20
use FOS\ElasticaBundle\DependencyInjection\Compiler\RegisterPersistersPass;
21
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
22
use Symfony\Component\HttpKernel\Bundle\Bundle;
23
24
class FOSElasticaBundle extends Bundle
25
{
26
    /**
27
     * {@inheritdoc}
28
     */
29 4
    public function build(ContainerBuilder $container)
30
    {
31 4
        parent::build($container);
32
33 4
        $container->addCompilerPass(new ConfigSourcePass());
34 4
        $container->addCompilerPass(new IndexPass());
35 4
        $container->addCompilerPass(new RegisterProvidersPass(), PassConfig::TYPE_BEFORE_REMOVING);
0 ignored issues
show
Deprecated Code introduced by
The class FOS\ElasticaBundle\Depen...r\RegisterProvidersPass has been deprecated with message: since 4.x and will be removed in 5.0

This class, trait or interface has been deprecated. The supplier of the file has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the type will be removed from the class and what other constant to use instead.

Loading history...
36 4
        $container->addCompilerPass(new RegisterPagerProvidersPass(), PassConfig::TYPE_BEFORE_REMOVING);
37 4
        $container->addCompilerPass(new RegisterPersistersPass(), PassConfig::TYPE_BEFORE_REMOVING);
38 4
        $container->addCompilerPass(new TransformerPass());
39 4
    }
40
}
41