getConfigTreeBuilder()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 37

Duplication

Lines 37
Ratio 100 %

Importance

Changes 0
Metric Value
dl 37
loc 37
rs 9.328
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
namespace OmnideskBundle\Configuration\User;
3
4
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
5
use Symfony\Component\Config\Definition\ConfigurationInterface;
6
7
/**
8
 * Class AddUserRequestConfiguration
9
 * @package OmnideskBundle\Configuration\User
10
 */
11 View Code Duplication
class AddUserRequestConfiguration implements ConfigurationInterface
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
12
{
13
    /**
14
     * @return TreeBuilder
15
     */
16
    public function getConfigTreeBuilder()
17
    {
18
        $treeBuilder = new TreeBuilder();
19
20
        $rootNode = $treeBuilder->root('params');
21
22
        $rootNode
23
            ->children()
24
                ->scalarNode('user_email')
25
                    ->defaultNull()
26
                ->end()
27
                ->scalarNode('user_phone')
28
                    ->defaultNull()
29
                ->end()
30
                ->scalarNode('user_full_name')
31
                    ->defaultNull()
32
                ->end()
33
                ->scalarNode('company_name')
34
                    ->defaultNull()
35
                ->end()
36
                ->scalarNode('company_position')
37
                    ->defaultNull()
38
                ->end()
39
                ->scalarNode('user_note')
40
                    ->defaultNull()
41
                ->end()
42
                ->scalarNode('language_id')
43
                    ->defaultNull()
44
                ->end()
45
                ->arrayNode('custom_fields')
46
                    ->prototype('scalar')
47
                    ->end()
48
                ->end()
49
            ->end();
50
51
        return $treeBuilder;
52
    }
53
}
54