| Conditions | 1 |
| Paths | 1 |
| Total Lines | 49 |
| Code Lines | 45 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 45 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | 11 | public function getConfigTreeBuilder() |
|
| 19 | { |
||
| 20 | 11 | $treeBuilder = new TreeBuilder('pheanstalk'); |
|
| 21 | 11 | $rootNode = $treeBuilder->getRootNode()->children(); |
|
| 22 | |||
| 23 | $rootNode |
||
| 24 | 11 | ->arrayNode('profiler') |
|
| 25 | 11 | ->addDefaultsIfNotSet() |
|
| 26 | 11 | ->children() |
|
| 27 | 11 | ->scalarNode('enabled')->defaultValue('%kernel.debug%')->end() |
|
| 28 | 11 | ->scalarNode('template')->defaultValue('@Pheanstalk/Profiler/pheanstalk.html.twig')->end() |
|
| 29 | 11 | ->end() |
|
| 30 | 11 | ->end() |
|
| 31 | 11 | ->arrayNode('pheanstalks') |
|
| 32 | 11 | ->requiresAtLeastOneElement() |
|
| 33 | 11 | ->useAttributeAsKey('name') |
|
| 34 | 11 | ->prototype('array') |
|
| 35 | 11 | ->children() |
|
| 36 | 11 | ->scalarNode('server') |
|
| 37 | 11 | ->isRequired() |
|
| 38 | 11 | ->cannotBeEmpty() |
|
| 39 | 11 | ->end() |
|
| 40 | 11 | ->scalarNode('port') |
|
| 41 | 11 | ->cannotBeEmpty() |
|
| 42 | 11 | ->defaultValue('5000') |
|
| 43 | 11 | ->end() |
|
| 44 | 11 | ->scalarNode('user') |
|
| 45 | 11 | ->cannotBeEmpty() |
|
| 46 | 11 | ->end() |
|
| 47 | 11 | ->scalarNode('password') |
|
| 48 | 11 | ->cannotBeEmpty() |
|
| 49 | 11 | ->end() |
|
| 50 | 11 | ->scalarNode('timeout') |
|
| 51 | 11 | ->cannotBeEmpty() |
|
| 52 | 11 | ->defaultValue('60') |
|
| 53 | 11 | ->end() |
|
| 54 | 11 | ->booleanNode('default') |
|
| 55 | 11 | ->defaultFalse() |
|
| 56 | 11 | ->end() |
|
| 57 | 11 | ->scalarNode('proxy') |
|
| 58 | 11 | ->cannotBeEmpty() |
|
| 59 | 11 | ->defaultValue('pheanstalk.proxy.default') |
|
| 60 | 11 | ->end() |
|
| 61 | 11 | ->end() |
|
| 62 | 11 | ->end() |
|
| 63 | 11 | ->end() |
|
| 64 | 11 | ->end(); |
|
| 65 | |||
| 66 | 11 | return $treeBuilder; |
|
| 67 | } |
||
| 69 |