| Conditions | 1 |
| Paths | 1 |
| Total Lines | 22 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 15 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 27 | 2 | public function getConfigTreeBuilder() |
|
| 28 | { |
||
| 29 | 2 | $treeBuilder = new TreeBuilder(); |
|
| 30 | 2 | $rootNode = $treeBuilder->root('xabbuh_lrs'); |
|
| 31 | |||
| 32 | 2 | $supportedDrivers = array('mongodb'); |
|
| 33 | |||
| 34 | $rootNode |
||
| 35 | 2 | ->children() |
|
| 36 | 2 | ->scalarNode('driver') |
|
| 37 | 2 | ->validate() |
|
| 38 | 2 | ->ifNotInArray($supportedDrivers) |
|
| 39 | 2 | ->thenInvalid('The driver %s is not supported. Please choose on of '.json_encode($supportedDrivers)) |
|
| 40 | 2 | ->end() |
|
| 41 | 2 | ->isRequired() |
|
| 42 | 2 | ->cannotBeEmpty() |
|
| 43 | 2 | ->end() |
|
| 44 | 2 | ->end() |
|
| 45 | ; |
||
| 46 | |||
| 47 | 2 | return $treeBuilder; |
|
| 48 | } |
||
| 49 | } |
||
| 50 |