Passed
Branch master (046a17)
by Mathieu
02:22
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
eloc 7
dl 0
loc 11
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Neimheadh\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
16
    /**
17
     * {@inheritDoc}
18
     */
19
    public function getConfigTreeBuilder(): TreeBuilder
20
    {
21
        $treeBuilder = new TreeBuilder('sonata_annotation');
22
        $rootNode = $treeBuilder->getRootNode();
23
24
        $rootNode
25
            ->children()
26
                ->scalarNode('directory')->end()
27
            ->end();
28
29
        return $treeBuilder;
30
    }
31
}
32