Conditions | 1 |
Paths | 1 |
Total Lines | 26 |
Code Lines | 19 |
Lines | 0 |
Ratio | 0 % |
Tests | 15 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
14 | 2 | public function getConfigTreeBuilder() |
|
15 | { |
||
16 | 2 | $builder = new TreeBuilder(); |
|
17 | 2 | $children = $builder->root('mrtn_json_api')->children(); |
|
18 | |||
19 | 2 | $children->arrayNode('view_listener_mapping_handler') |
|
20 | 2 | ->addDefaultsIfNotSet() |
|
21 | 2 | ->children() |
|
22 | 2 | ->scalarNode('default_mapper') |
|
23 | 2 | ->defaultValue('default'); |
|
24 | |||
25 | 2 | $children->arrayNode('mappers') |
|
26 | 2 | ->defaultValue(['default' => [ |
|
27 | 'handlers' => [ |
||
28 | 'attribute', |
||
29 | 'relationship', |
||
30 | 'link' |
||
31 | ] |
||
32 | ]]) |
||
33 | 2 | ->prototype('array') |
|
34 | 2 | ->children() |
|
35 | 2 | ->arrayNode('handlers') |
|
36 | 2 | ->prototype('scalar'); |
|
37 | |||
38 | 2 | return $builder; |
|
39 | } |
||
40 | } |