| Conditions | 1 |
| Paths | 1 |
| Total Lines | 44 |
| Code Lines | 41 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 3 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 18 | public function getConfigTreeBuilder() |
||
| 19 | { |
||
| 20 | $treeBuilder = new TreeBuilder(); |
||
| 21 | $rootNode = $treeBuilder->root('itkg_delay_event'); |
||
| 22 | $rootNode |
||
| 23 | ->fixXmlConfig('channel') |
||
| 24 | ->children() |
||
| 25 | ->arrayNode('processor') |
||
| 26 | ->children() |
||
| 27 | ->arrayNode('retry_count') |
||
| 28 | ->children() |
||
| 29 | ->scalarNode('normal')->defaultValue(1)->end() |
||
| 30 | ->scalarNode('critic')->defaultValue(1)->end() |
||
| 31 | ->end() |
||
| 32 | ->end() |
||
| 33 | ->end() |
||
| 34 | ->end() |
||
| 35 | ->arrayNode('events') |
||
| 36 | ->prototype('array') |
||
| 37 | ->children() |
||
| 38 | ->enumNode('type') |
||
| 39 | ->values(['normal', 'critic']) |
||
| 40 | ->defaultValue('normal') |
||
| 41 | ->end() |
||
| 42 | ->end() |
||
| 43 | ->end() |
||
| 44 | ->end() |
||
| 45 | ->arrayNode('channels') |
||
| 46 | ->addDefaultChildrenIfNoneSet('default') |
||
| 47 | ->useAttributeAsKey('name') |
||
| 48 | ->prototype('array') |
||
| 49 | ->children() |
||
| 50 | ->arrayNode('include') |
||
| 51 | ->prototype('scalar')->end() |
||
| 52 | ->end() |
||
| 53 | ->arrayNode('exclude') |
||
| 54 | ->prototype('scalar')->end() |
||
| 55 | ->end() |
||
| 56 | ->end() |
||
| 57 | ->end() |
||
| 58 | ->end(); |
||
| 59 | |||
| 60 | return $treeBuilder; |
||
| 61 | } |
||
| 62 | } |
||
| 63 |