Completed
Pull Request — master (#23)
by Claudio
09:06 queued 04:23
created

Configuration   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 13
c 1
b 0
f 0
dl 0
loc 21
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 16 1
1
<?php
2
3
namespace Flagbit\Bundle\ProductClonerBundle\DependencyInjection;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
/**
9
 * This is the class that validates and merges configuration from your app/config files
10
 *
11
 * To learn more see
12
 * {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
13
 */
14
class Configuration implements ConfigurationInterface
15
{
16
    /**
17
     * {@inheritDoc}
18
     */
19
    public function getConfigTreeBuilder()
20
    {
21
        $treeBuilder = new TreeBuilder();
22
        $root = $treeBuilder->root('flagbit_product_cloner');
23
24
        $root->children()
25
            ->arrayNode('attribute_blacklist')
26
                ->info('A list of attribute codes that need to be left out for the clone')
27
                ->defaultValue([])
28
                ->scalarPrototype()
29
                    ->info('Valid attribute codes')
30
                ->end()
31
            ->end()
32
        ->end();
33
34
        return $treeBuilder;
35
    }
36
}
37