| Conditions | 2 | 
| Paths | 1 | 
| Total Lines | 37 | 
| Code Lines | 31 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 2 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 26 | public function getConfigTreeBuilder() | ||
| 27 |     { | ||
| 28 | $treeBuilder = new TreeBuilder(); | ||
| 29 |         $treeBuilder->root('dunglas_action') | ||
| 30 | ->children() | ||
| 31 |                 ->arrayNode('autodiscover') | ||
| 32 |                     ->info('Autodiscover action classes stored in the configured directory of bundles and register them as service.') | ||
| 33 | ->canBeDisabled() | ||
| 34 | ->children() | ||
| 35 |                         ->arrayNode('directories') | ||
| 36 |                             ->info('The directory name to autodiscover in bundles.') | ||
| 37 |                             ->prototype('array') | ||
| 38 |                                 ->prototype('scalar')->end() | ||
| 39 | ->end() | ||
| 40 |                             ->defaultValue(call_user_func(function () { | ||
| 41 | $defaultValue = ['action' => ['Action']]; | ||
| 42 |                                 if (class_exists(Command::class)) { | ||
| 43 | $defaultValue['command'] = ['Command']; | ||
| 44 | } | ||
| 45 | |||
| 46 | return $defaultValue; | ||
| 47 | })) | ||
| 48 | ->end() | ||
| 49 | ->end() | ||
| 50 | ->end() | ||
| 51 |                 ->arrayNode('directories') | ||
| 52 |                     ->info('List of directories relative to the kernel root directory containing classes.') | ||
| 53 |                     ->prototype('array') | ||
| 54 |                         ->prototype('scalar')->end() | ||
| 55 | ->end() | ||
| 56 | ->defaultValue([]) | ||
| 57 | ->end() | ||
| 58 | ->end() | ||
| 59 | ->end(); | ||
| 60 | |||
| 61 | return $treeBuilder; | ||
| 62 | } | ||
| 63 | } | ||
| 64 |