Conditions | 1 |
Paths | 1 |
Total Lines | 24 |
Code Lines | 19 |
Lines | 24 |
Ratio | 100 % |
Changes | 0 |
1 | <?php |
||
16 | public function getConfigTreeBuilder() |
||
17 | { |
||
18 | $treeBuilder = new TreeBuilder(); |
||
19 | |||
20 | $rootNode = $treeBuilder->root('params'); |
||
21 | |||
22 | $rootNode |
||
23 | ->children() |
||
24 | ->integerNode('staff_id') |
||
25 | ->isRequired() |
||
26 | ->end() |
||
27 | ->scalarNode('staff_email') |
||
28 | ->defaultNull() |
||
29 | ->end() |
||
30 | ->scalarNode('staff_full_name') |
||
31 | ->defaultNull() |
||
32 | ->end() |
||
33 | ->scalarNode('staff_signature') |
||
34 | ->defaultNull() |
||
35 | ->end() |
||
36 | ->end(); |
||
37 | |||
38 | return $treeBuilder; |
||
39 | } |
||
40 | } |
||
41 |
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.