Completed
Push — master ( 124fed...6caa0a )
by Tomáš
12s
created

SculpinBundle::getParametersAliases()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 9
ccs 0
cts 9
cp 0
rs 9.6666
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 0
crap 2
1
<?php
2
3
/*
4
 * This file is a part of Sculpin.
5
 *
6
 * (c) Dragonfly Development Inc.
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 Symplify\PHP7_Sculpin;
13
14
use Symfony\Component\DependencyInjection\Compiler\PassConfig;
15
use Symplify\PHP7_Sculpin\DependencyInjection\Compiler\DataSourcePass;
16
use Symplify\PHP7_Sculpin\DependencyInjection\Compiler\DataProviderManagerPass;
17
use Symplify\PHP7_Sculpin\DependencyInjection\Compiler\CustomMimeTypesRepositoryPass;
18
use Symplify\PHP7_Sculpin\DependencyInjection\Configuration;
19
use Symfony\Component\Config\Definition\ConfigurationInterface;
20
use Symfony\Component\DependencyInjection\ContainerBuilder;
21
use Symplify\PHP7_Sculpin\DependencyInjection\Compiler\RegisterKernelListenersPass;
22
use Symplify\SimpleBundle\AbstractSimpleBundle;
23
24
final class SculpinBundle extends AbstractSimpleBundle
25
{
26
    /**
27
     * {@inheritdoc}
28
     */
29
    public function build(ContainerBuilder $containerBuilder)
30
    {
31
        $containerBuilder->addCompilerPass(new DataProviderManagerPass());
32
        $containerBuilder->addCompilerPass(new CustomMimeTypesRepositoryPass());
33
        $containerBuilder->addCompilerPass(new DataSourcePass());
34
35
        $containerBuilder->addCompilerPass(new RegisterKernelListenersPass(), PassConfig::TYPE_AFTER_REMOVING);
36
    }
37
38
    protected function getServicesFile() : string
39
    {
40
        return __DIR__.'/Resources/config/services.yml';
41
    }
42
43
    protected function getConfiguration() : ConfigurationInterface
44
    {
45
        return new Configuration();
46
    }
47
48
    protected function getParametersAliases() : array
49
    {
50
        return [
51
            'source_dir' => 'sculpin.source_dir',
52
            'output_dir' => 'sculpin.output_dir',
53
            'permalink' => 'sculpin.permalink',
54
            'raw' => 'sculpin.raw',
55
        ];
56
    }
57
}
58