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

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 3
dl 0
loc 25
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 22 1
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