Conditions | 1 |
Paths | 1 |
Total Lines | 21 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
18 | public function getConfigTreeBuilder() |
||
19 | { |
||
20 | $treeBuilder = new TreeBuilder(); |
||
21 | $rootNode = $treeBuilder->root('polidog_ssr'); |
||
|
|||
22 | |||
23 | $rootNode |
||
24 | ->children() |
||
25 | ->scalarNode('bundle_src_path')->isRequired()->end() |
||
26 | ->scalarNode('cache')->defaultFalse()->end() |
||
27 | ->arrayNode('baracoa') |
||
28 | ->addDefaultsIfNotSet() |
||
29 | ->children() |
||
30 | ->scalarNode('object')->defaultValue('polidog_ssr.baracore')->isRequired()->end() |
||
31 | ->scalarNode('cache_object')->defaultValue('polidog_ssr.cache_baracore')->isRequired()->end() |
||
32 | ->end() |
||
33 | ->end() |
||
34 | ->end() |
||
35 | ; |
||
36 | |||
37 | return $treeBuilder; |
||
38 | } |
||
39 | } |
||
40 |
This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.
To visualize
will produce issues in the first and second line, while this second example
will produce no issues.