Completed
Pull Request — master (#341)
by De Cramer
05:55
created

Configuration::getConfigTreeBuilder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 17
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 17
ccs 0
cts 16
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 14
nc 1
nop 0
crap 2
1
<?php
2
3
namespace eXpansion\Framework\MlComposeBundle;
4
5
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
6
use Symfony\Component\Config\Definition\ConfigurationInterface;
7
8
/**
9
 * Class Configuration
10
 *
11
 * @author    de Cramer Oliver<[email protected]>
12
 * @copyright 2018 Oliverde8
13
 * @package eXpansion\Framework\MlComposeBundle
14
 */
15
class Configuration implements ConfigurationInterface
16
{
17
18
    /**
19
     * Generates the configuration tree builder.
20
     *
21
     * @return \Symfony\Component\Config\Definition\Builder\TreeBuilder The tree builder
22
     */
23
    public function getConfigTreeBuilder()
24
    {
25
        $treeBuilder = new TreeBuilder();
26
        $treeBuilder->root('ml_compose')
0 ignored issues
show
Bug introduced by
The method prototype() does not seem to exist on object<Symfony\Component...on\Builder\NodeBuilder>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
27
            ->children()
28
                ->prototype('array')->useAttributeAsKey("block_id")
29
                    ->scalarNode('alias')->end()
30
                    ->scalarNode('parent')->end()
31
                    ->scalarNode('component')->end()
32
                    ->scalarNode('extends')->end()
33
                    ->variableNode('config')->end()
34
                ->end()
35
            ->end()
36
        ->end();
37
38
        return $treeBuilder;
39
    }
40
}