Conditions | 1 |
Paths | 1 |
Total Lines | 32 |
Code Lines | 27 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
11 | public function getConfigTreeBuilder() |
||
12 | { |
||
13 | $treeBuilder = new TreeBuilder('bitbag_sylius_elasticsearch'); |
||
14 | |||
15 | $treeBuilder->getRootNode('bitbag_sylius_elasticsearch') |
||
|
|||
16 | ->children() |
||
17 | ->arrayNode('excluded_filter') |
||
18 | ->addDefaultsIfNotSet() |
||
19 | ->children() |
||
20 | ->arrayNode('options') |
||
21 | ->scalarPrototype()->end() |
||
22 | ->defaultValue([]) |
||
23 | ->end() |
||
24 | ->arrayNode('attributes') |
||
25 | ->scalarPrototype()->end() |
||
26 | ->defaultValue([]) |
||
27 | ->end() |
||
28 | ->end() |
||
29 | ->end() |
||
30 | ->integerNode('filter_attributes_max') |
||
31 | ->defaultValue(20) |
||
32 | ->end() |
||
33 | ->integerNode('filter_options_max') |
||
34 | ->defaultValue(20) |
||
35 | ->end() |
||
36 | ->scalarNode('shop_name_property_prefix') |
||
37 | ->defaultValue('sylius') |
||
38 | ->end() |
||
39 | ->end() |
||
40 | ; |
||
41 | |||
42 | return $treeBuilder; |
||
43 | } |
||
45 | } |
This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.
If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress. Please note the @ignore annotation hint above.