Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 33
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 33
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
B getConfigTreeBuilder() 0 27 1
1
<?php
2
3
namespace Mykees\MediaBundle\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 {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class}
12
 */
13
class Configuration implements ConfigurationInterface
14
{
15
    /**
16
     * {@inheritdoc}
17
     */
18
    public function getConfigTreeBuilder()
19
    {
20
        $treeBuilder = new TreeBuilder();
21
        $rootNode = $treeBuilder->root('mykees_media');
22
23
        $rootNode
24
            ->children()
25
                ->arrayNode('allowExtension')
26
                    ->prototype('scalar')
27
                    ->end()
28
                ->end()
29
                ->scalarNode('path')->end()
30
                ->arrayNode('resize')
31
                    ->prototype('array')
32
                        ->children()
33
                            ->scalarNode('mode')->end()
34
                            ->arrayNode('size')
35
                                ->prototype('variable')
36
                                ->end()
37
                            ->end()
38
                        ->end()
39
                    ->end()
40
                ->end()
41
            ->end()
42
        ;
43
        return $treeBuilder;
44
    }
45
}
46