Configuration::getConfigTreeBuilder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 12
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace ProjetNormandie\EmailBundle\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/configuration.html}
12
 */
13
class Configuration implements ConfigurationInterface
14
{
15
    /**
16
     * @return TreeBuilder
17
     */
18
    public function getConfigTreeBuilder(): TreeBuilder
19
    {
20
        $treeBuilder = new TreeBuilder('pn_email');
21
        $rootNode = $treeBuilder->getRootNode();
22
23
        $rootNode
24
            ->children()
25
                ->scalarNode('from')->isRequired()->end()
26
                ->scalarNode('to')->isRequired()->end()
27
            ->end();
28
29
        return $treeBuilder;
30
    }
31
}
32