Conditions | 2 |
Paths | 2 |
Total Lines | 19 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
15 | public function getConfigTreeBuilder(): TreeBuilder |
||
16 | { |
||
17 | $treeBuilder = new TreeBuilder(self::ROOT_NAME); |
||
18 | |||
19 | if (method_exists($treeBuilder, 'getRootNode')) { |
||
20 | $rootNode = $treeBuilder->getRootNode(); |
||
21 | } else { |
||
22 | // BC layer for symfony/config 4.1 and older |
||
23 | $rootNode = $treeBuilder->root(self::ROOT_NAME); |
||
|
|||
24 | } |
||
25 | |||
26 | $rootNode |
||
27 | ->children() |
||
28 | ->scalarNode('cookie_name') |
||
29 | ->defaultValue('cookies-accepted') |
||
30 | ->end() |
||
31 | ->end(); |
||
32 | |||
33 | return $treeBuilder; |
||
34 | } |
||
36 |
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.