Conditions | 1 |
Paths | 1 |
Total Lines | 33 |
Code Lines | 28 |
Lines | 0 |
Ratio | 0 % |
Changes | 13 | ||
Bugs | 3 | Features | 0 |
1 | <?php declare(strict_types = 1); |
||
22 | public function getConfigTreeBuilder() |
||
23 | { |
||
24 | $treeBuilder = new TreeBuilder(); |
||
25 | $rootNode = $treeBuilder->root('swagger'); |
||
26 | |||
27 | $rootNode |
||
28 | ->children() |
||
29 | ->scalarNode('validate_responses')->defaultFalse() |
||
30 | ->end() |
||
31 | ->arrayNode('hydrator') |
||
32 | ->children() |
||
33 | ->arrayNode('namespaces')->isRequired() |
||
34 | ->beforeNormalization() |
||
35 | ->ifString() |
||
36 | ->then(function ($v) { |
||
37 | return [$v]; |
||
38 | }) |
||
39 | ->end() |
||
40 | ->prototype('scalar') |
||
41 | ->end() |
||
42 | ->end() |
||
43 | ->end() |
||
44 | ->end() |
||
45 | ->arrayNode('document') |
||
46 | ->addDefaultsIfNotSet() |
||
47 | ->children() |
||
48 | ->scalarNode('cache')->isRequired()->defaultFalse()->end()->scalarNode('base_path')->defaultValue('')->end() |
||
49 | ->end() |
||
50 | ->end() |
||
51 | ->end(); |
||
52 | |||
53 | return $treeBuilder; |
||
54 | } |
||
55 | } |
||
56 |