| Conditions | 1 |
| Paths | 1 |
| Total Lines | 45 |
| Code Lines | 41 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 40 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | 2 | public function getConfigTreeBuilder() |
|
| 18 | { |
||
| 19 | 2 | $treeBuilder = new TreeBuilder; |
|
| 20 | 2 | $root = $treeBuilder->root('innmind_rest_server'); |
|
| 21 | |||
| 22 | $root |
||
| 23 | 2 | ->children() |
|
| 24 | 2 | ->arrayNode('types') |
|
| 25 | 2 | ->defaultValue([]) |
|
| 26 | 2 | ->prototype('scalar')->end() |
|
| 27 | 2 | ->end() |
|
| 28 | 2 | ->arrayNode('accept') |
|
| 29 | 2 | ->info('The list of formats you accept in the "Accept" header') |
|
| 30 | 2 | ->useAttributeAsKey('name') |
|
| 31 | 2 | ->requiresAtLeastOneElement() |
|
| 32 | 2 | ->prototype('array') |
|
| 33 | 2 | ->children() |
|
| 34 | 2 | ->integerNode('priority')->end() |
|
| 35 | 2 | ->arrayNode('media_types') |
|
| 36 | 2 | ->useAttributeAsKey('name') |
|
| 37 | 2 | ->requiresAtLeastOneElement() |
|
| 38 | 2 | ->prototype('scalar')->end() |
|
| 39 | 2 | ->end() |
|
| 40 | 2 | ->end() |
|
| 41 | 2 | ->end() |
|
| 42 | 2 | ->end() |
|
| 43 | 2 | ->arrayNode('content_type') |
|
| 44 | 2 | ->info('The list of formats you support as content output') |
|
| 45 | 2 | ->useAttributeAsKey('name') |
|
| 46 | 2 | ->requiresAtLeastOneElement() |
|
| 47 | 2 | ->prototype('array') |
|
| 48 | 2 | ->children() |
|
| 49 | 2 | ->integerNode('priority')->end() |
|
| 50 | 2 | ->arrayNode('media_types') |
|
| 51 | 2 | ->useAttributeAsKey('name') |
|
| 52 | 2 | ->requiresAtLeastOneElement() |
|
| 53 | 2 | ->prototype('integer')->end() |
|
| 54 | 2 | ->end() |
|
| 55 | 2 | ->end() |
|
| 56 | 2 | ->end() |
|
| 57 | 2 | ->end() |
|
| 58 | 2 | ->end(); |
|
| 59 | |||
| 60 | 2 | return $treeBuilder; |
|
| 61 | } |
||
| 62 | } |
||
| 63 |