Conditions | 1 |
Paths | 1 |
Total Lines | 46 |
Code Lines | 43 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
9 | public function getConfigTreeBuilder() |
||
10 | { |
||
11 | $treeBuilder = new TreeBuilder(); |
||
12 | $rootNode = $treeBuilder->root('xsd2php'); |
||
13 | |||
14 | $rootNode |
||
15 | ->children() |
||
16 | ->scalarNode('naming_strategy') |
||
17 | ->defaultValue('short') |
||
18 | ->cannotBeEmpty() |
||
19 | ->end() |
||
20 | ->scalarNode('path_generator') |
||
21 | ->defaultValue('psr4') |
||
22 | ->cannotBeEmpty() |
||
23 | ->end() |
||
24 | ->arrayNode('namespaces')->fixXmlConfig('namespace') |
||
25 | ->cannotBeEmpty()->isRequired() |
||
26 | ->requiresAtLeastOneElement() |
||
27 | ->prototype('scalar') |
||
28 | ->end() |
||
29 | ->end() |
||
30 | ->arrayNode('known_locations')->fixXmlConfig('known_location') |
||
31 | ->prototype('scalar') |
||
32 | ->end() |
||
33 | ->end() |
||
34 | ->arrayNode('destinations_php')->fixXmlConfig('destination') |
||
35 | ->cannotBeEmpty()->isRequired() |
||
36 | ->requiresAtLeastOneElement() |
||
37 | ->prototype('scalar') |
||
38 | ->end() |
||
39 | ->end() |
||
40 | ->arrayNode('destinations_jms')->fixXmlConfig('destination') |
||
41 | ->cannotBeEmpty()->isRequired() |
||
42 | ->requiresAtLeastOneElement() |
||
43 | ->prototype('scalar') |
||
44 | ->end() |
||
45 | ->end() |
||
46 | ->arrayNode('aliases')->fixXmlConfig('alias') |
||
47 | ->prototype('array') |
||
48 | ->prototype('scalar') |
||
49 | ->end() |
||
50 | ->end() |
||
51 | ->end() |
||
52 | ->end(); |
||
53 | return $treeBuilder; |
||
54 | } |
||
55 | } |
||
56 |