| Conditions | 1 |
| Paths | 1 |
| Total Lines | 25 |
| Code Lines | 21 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 4 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 18 | public function getConfigTreeBuilder() |
||
| 19 | { |
||
| 20 | $treeBuilder = new TreeBuilder(); |
||
| 21 | $rootNode = $treeBuilder->root('it_blaster_translation'); |
||
| 22 | |||
| 23 | $rootNode->children() |
||
| 24 | ->arrayNode('locales') |
||
| 25 | ->beforeNormalization() |
||
| 26 | ->ifString() |
||
| 27 | ->then(function($v) { return preg_split('/\s*,\s*/', $v); }) |
||
| 28 | ->end() |
||
| 29 | ->requiresAtLeastOneElement() |
||
| 30 | ->prototype('scalar')->end() |
||
| 31 | ->end() |
||
| 32 | ->arrayNode('slug_locales') |
||
| 33 | ->beforeNormalization() |
||
| 34 | ->ifString() |
||
| 35 | ->then(function($v) { return preg_split('/\s*,\s*/', $v); }) |
||
| 36 | ->end() |
||
| 37 | ->prototype('scalar')->end() |
||
| 38 | ->end() |
||
| 39 | ->end(); |
||
| 40 | |||
| 41 | return $treeBuilder; |
||
| 42 | } |
||
| 43 | } |
||
| 44 |