| Conditions | 1 |
| Paths | 1 |
| Total Lines | 29 |
| Code Lines | 23 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 23 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | 1 | public function getConfigTreeBuilder(): TreeBuilder |
|
| 17 | { |
||
| 18 | 1 | $treeBuilder = new TreeBuilder('jin2chen_api'); |
|
| 19 | 1 | $rootNode = $treeBuilder->getRootNode(); |
|
| 20 | |||
| 21 | // @formatter:off |
||
| 22 | $rootNode |
||
| 23 | 1 | ->addDefaultsIfNotSet() |
|
|
|
|||
| 24 | 1 | ->children() |
|
| 25 | 1 | ->arrayNode('request') |
|
| 26 | 1 | ->addDefaultsIfNotSet() |
|
| 27 | 1 | ->children() |
|
| 28 | 1 | ->scalarNode('request_id_header') |
|
| 29 | 1 | ->defaultValue('X-Request-id') |
|
| 30 | 1 | ->end() |
|
| 31 | 1 | ->end() |
|
| 32 | 1 | ->end() |
|
| 33 | 1 | ->arrayNode('response') |
|
| 34 | 1 | ->addDefaultsIfNotSet() |
|
| 35 | 1 | ->children() |
|
| 36 | 1 | ->arrayNode('exception_converters') |
|
| 37 | 1 | ->useAttributeAsKey('exception')->scalarPrototype()->end() |
|
| 38 | 1 | ->end() |
|
| 39 | 1 | ->end() |
|
| 40 | 1 | ->end() |
|
| 41 | 1 | ->end(); |
|
| 42 | // @formatter:on |
||
| 43 | |||
| 44 | 1 | return $treeBuilder; |
|
| 45 | } |
||
| 47 |