Passed
Pull Request — 1.x (#9)
by Marko
03:23
created

Configuration::getConfigTreeBuilder()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 11
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace KunicMarko\SonataAnnotationBundle\DependencyInjection;
6
7
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
8
use Symfony\Component\Config\Definition\ConfigurationInterface;
9
10
/**
11
 * @author Marko Kunic <[email protected]>
12
 */
13
final class Configuration implements ConfigurationInterface
14
{
15
    public function getConfigTreeBuilder(): TreeBuilder
16
    {
17
        $treeBuilder = new TreeBuilder();
18
        $rootNode = $treeBuilder->root('sonata_annotation');
19
20
        $rootNode
21
            ->children()
22
                ->scalarNode('directory')->defaultNull()->end()
23
            ->end();
24
25
        return $treeBuilder;
26
    }
27
}
28