| Conditions | 1 |
| Paths | 1 |
| Total Lines | 35 |
| Code Lines | 30 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 29 |
| CRAP Score | 1 |
| Changes | 5 | ||
| Bugs | 0 | Features | 3 |
| 1 | <?php |
||
| 31 | 5 | public function getConfigTreeBuilder() |
|
| 32 | { |
||
| 33 | 5 | $treeBuilder = new TreeBuilder(); |
|
| 34 | 5 | $rootNode = $treeBuilder->root('andi_kick_box'); |
|
| 35 | |||
| 36 | $rootNode |
||
| 37 | 5 | ->children() |
|
| 38 | 5 | ->arrayNode('api_keys') |
|
| 39 | 5 | ->useAttributeAsKey('name') |
|
| 40 | 5 | ->requiresAtLeastOneElement() |
|
| 41 | 5 | ->isRequired() |
|
| 42 | 5 | ->info('API key list.') |
|
| 43 | 5 | ->prototype('array') |
|
| 44 | 5 | ->children() |
|
| 45 | 5 | ->scalarNode('key') |
|
| 46 | 5 | ->isRequired() |
|
| 47 | 5 | ->cannotBeEmpty() |
|
| 48 | 5 | ->info('The api key generated in kickbox.io.') |
|
| 49 | 5 | ->end() |
|
| 50 | 5 | ->end() |
|
| 51 | 5 | ->end() |
|
| 52 | 5 | ->end() |
|
| 53 | 5 | ->scalarNode('default_api_name') |
|
| 54 | 5 | ->info('The default API name.') |
|
| 55 | 5 | ->end() |
|
| 56 | 5 | ->scalarNode('endpoint') |
|
| 57 | 5 | ->info('The endpoint of the kickbox API.') |
|
| 58 | 5 | ->cannotBeEmpty() |
|
| 59 | 5 | ->defaultValue(self::DEFAULT_ENDPOINT) |
|
| 60 | 5 | ->end() |
|
| 61 | 5 | ->end() |
|
| 62 | ; |
||
| 63 | |||
| 64 | 5 | return $treeBuilder; |
|
| 65 | } |
||
| 66 | } |
||
| 67 |