Conditions | 2 |
Paths | 2 |
Total Lines | 20 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
15 | public function getConfigTreeBuilder(): TreeBuilder |
||
16 | { |
||
17 | $treeBuilder = new TreeBuilder('locastic_symfony_translation'); |
||
18 | if (\method_exists($treeBuilder, 'getRootNode')) { |
||
19 | $rootNode = $treeBuilder->getRootNode(); |
||
20 | } else { |
||
21 | // BC layer for symfony/config 4.1 and older |
||
22 | $rootNode = $treeBuilder->root('locastic_symfony_translation'); |
||
|
|||
23 | } |
||
24 | |||
25 | $rootNode |
||
26 | ->children() |
||
27 | ->scalarNode('default_locale') |
||
28 | ->defaultValue('en_US') |
||
29 | ->end() |
||
30 | ->arrayNode('locales')->scalarPrototype()->end()->end() |
||
31 | ->end() |
||
32 | ; |
||
33 | |||
34 | return $treeBuilder; |
||
35 | } |
||
37 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.