| Conditions | 2 |
| Paths | 2 |
| Total Lines | 39 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 28 |
| CRAP Score | 2.0011 |
| Changes | 0 | ||
| 1 | <?php |
||
| 27 | 4 | public function getConfigTreeBuilder(): TreeBuilder |
|
| 28 | { |
||
| 29 | 4 | if (method_exists(TreeBuilder::class, 'getRootNode')) { |
|
| 30 | 4 | $treeBuilder = new TreeBuilder('liip_functional_test'); |
|
| 31 | 4 | $rootNode = $treeBuilder->getRootNode(); |
|
| 32 | } else { |
||
| 33 | // BC layer for symfony/config 4.1 and older |
||
| 34 | $treeBuilder = new TreeBuilder(); |
||
|
|
|||
| 35 | $rootNode = $treeBuilder->root('liip_functional_test', 'array'); |
||
| 36 | } |
||
| 37 | |||
| 38 | $rootNode |
||
| 39 | 4 | ->children() |
|
| 40 | 4 | ->scalarNode('command_verbosity')->defaultValue('normal')->end() |
|
| 41 | 4 | ->booleanNode('command_decoration')->defaultTrue()->end() |
|
| 42 | 4 | ->arrayNode('query') |
|
| 43 | 4 | ->addDefaultsIfNotSet() |
|
| 44 | 4 | ->children() |
|
| 45 | 4 | ->scalarNode('max_query_count') |
|
| 46 | 4 | ->defaultNull() |
|
| 47 | 4 | ->end() |
|
| 48 | 4 | ->end() |
|
| 49 | 4 | ->end() |
|
| 50 | 4 | ->arrayNode('authentication') |
|
| 51 | 4 | ->addDefaultsIfNotSet() |
|
| 52 | 4 | ->children() |
|
| 53 | 4 | ->scalarNode('username') |
|
| 54 | 4 | ->defaultValue('') |
|
| 55 | 4 | ->end() |
|
| 56 | 4 | ->scalarNode('password') |
|
| 57 | 4 | ->defaultValue('') |
|
| 58 | 4 | ->end() |
|
| 59 | 4 | ->end() |
|
| 60 | 4 | ->end() |
|
| 61 | 4 | ->end() |
|
| 62 | ; |
||
| 63 | |||
| 64 | 4 | return $treeBuilder; |
|
| 65 | } |
||
| 66 | } |
||
| 67 |
This check looks for function calls that miss required arguments.