Configuration   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 17
c 1
b 0
f 0
dl 0
loc 24
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A getConfigTreeBuilder() 0 19 1
1
<?php
2
3
namespace NW\JsonRequestBundle\DependencyInjection;
4
5
use NW\JsonRequestBundle\EventListener\RequestTransformerListener;
6
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
7
use Symfony\Component\Config\Definition\ConfigurationInterface;
8
9
class Configuration implements ConfigurationInterface
10
{
11
    /**
12
     * {@inheritdoc}
13
     */
14
    public function getConfigTreeBuilder()
15
    {
16
        $builder = new TreeBuilder('nw_json_request');
17
        $builder->getRootNode()
18
            ->children()
19
                ->arrayNode('listener')
20
                    ->addDefaultsIfNotSet()
21
                    ->children()
22
                        ->scalarNode('request_transformer')
23
                            ->defaultValue(RequestTransformerListener::class)
24
                        ->end()
25
                        ->scalarNode('priority')
26
                            ->defaultValue(100)
27
                        ->end()
28
                    ->end()
29
                ->end()
30
            ->end();
31
32
        return $builder;
33
    }
34
}
35