Completed
Pull Request — master (#3)
by Ramūnas
13:15
created

Configuration::getConfigTreeBuilder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 22
Code Lines 16

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 22
rs 9.2
cc 1
eloc 16
nc 1
nop 0
1
<?php
2
3
namespace RDV\Bundle\MigrationBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
class Configuration implements ConfigurationInterface
9
{
10
    public function getConfigTreeBuilder()
11
    {
12
        $builder = new TreeBuilder();
13
        $rootNode = $builder->root('rdv_migration');
14
15
        $rootNode
16
            ->children()
17
                // default path inside each bundle to load migrations
18
                ->scalarNode('migration_path')
19
                    ->defaultValue('Migrations/Schema')
20
                ->end()
21
                // default path inside each bundle to load fixtures and sample data
22
                ->scalarNode('fixtures_path')
23
                    ->defaultValue('Migrations/Data')
24
                ->end()
25
                ->arrayNode('namespaces')
26
                    ->prototype('scalar')->end()
27
                ->end()
28
            ->end();
29
30
        return $builder;
31
    }
32
}
33