ResolverFactoryConfiguration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 19 1
1
<?php
2
3
/**
4
 * Copyright 2014 Jonathan Bouzekri. All rights reserved.
5
 *
6
 * @copyright Copyright 2014 Jonathan Bouzekri <[email protected]>
7
 * @license https://github.com/jbouzekri/FileUploaderBundle/blob/master/LICENSE
8
 * @link https://github.com/jbouzekri/FileUploaderBundle
9
 */
10
11
/**
12
 * @namespace
13
 */
14
namespace Jb\Bundle\FileUploaderBundle\DependencyInjection;
15
16
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
17
use Symfony\Component\Config\Definition\ConfigurationInterface;
18
19
/**
20
 * Resolver factory configuration for the FileUploader Extension
21
 *
22
 * @author Jonathan Bouzekri <[email protected]>
23
 */
24
class ResolverFactoryConfiguration implements ConfigurationInterface
25
{
26
    /**
27
     * Generates the configuration tree builder
28
     *
29
     * @return TreeBuilder
30
     */
31
    public function getConfigTreeBuilder()
32
    {
33
        $treeBuilder = new TreeBuilder();
34
35
        $treeBuilder
36
            ->root('jb_fileuploader')
37
                ->ignoreExtraKeys()
38
                ->fixXmlConfig('resolver_factory', 'resolver_factories')
39
                ->children()
40
                    ->arrayNode('resolver_factories')
41
                        ->defaultValue(array())
42
                        ->prototype('scalar')->end()
43
                    ->end()
44
                ->end()
45
            ->end()
46
        ;
47
48
        return $treeBuilder;
49
    }
50
}
51