Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
19 / 19 |
| Validator | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
19 / 19 |
| getConfigTreeBuilder() | |
100.00% |
1 / 1 |
1 | |
100.00% |
19 / 19 |
|||
| <?php | |
| namespace Trismegiste\Mondrian\Config; | |
| use Symfony\Component\Config\Definition\ConfigurationInterface; | |
| use Symfony\Component\Config\Definition\Builder\TreeBuilder; | |
| /** | |
| * Validator of the configuration of the package | |
| */ | |
| class Validator implements ConfigurationInterface | |
| { | |
| public function getConfigTreeBuilder() | |
| { | |
| $treeBuilder = new TreeBuilder(); | |
| $rootNode = $treeBuilder->root('mondrian'); | |
| $rootNode | |
| ->children() | |
| ->arrayNode('graph')->addDefaultsIfNotSet() | |
| ->children() | |
| ->arrayNode('calling') | |
| ->useAttributeAsKey('callee') | |
| ->prototype('array') | |
| ->children() | |
| ->arrayNode('ignore') | |
| ->prototype('scalar')->end() | |
| ->end() | |
| ->end() | |
| ->end() | |
| ->end() | |
| ->end() | |
| ->end() | |
| ->end(); | |
| return $treeBuilder; | |
| } | |
| } |