Conditions | 2 |
Paths | 2 |
Total Lines | 49 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 6 |
Changes | 0 |
1 | <?php |
||
12 | public function getConfigTreeBuilder(): TreeBuilder |
||
13 | { |
||
14 | $treeBuilder = new TreeBuilder('monolog_sentry'); |
||
15 | // Forward compatibility with Symfony 4.2. |
||
16 | // @see https://symfony.com/blog/new-in-symfony-4-2-important-deprecations |
||
17 | $rootNode = method_exists($treeBuilder, 'getRootNode') |
||
18 | ? $treeBuilder->getRootNode() |
||
19 | : $treeBuilder->root('monolog_sentry'); |
||
|
|||
20 | |||
21 | // @formatter:off |
||
22 | $rootNode |
||
23 | ->children() |
||
24 | ->booleanNode('user_context') |
||
25 | ->info('whether to log or not username obtained from TokenStorage') |
||
26 | ->defaultFalse() |
||
27 | ->end() |
||
28 | ->scalarNode('user_agent_parser') |
||
29 | ->info('phpuseragent (default), native or id of custom service implementing ParserInterface interface') |
||
30 | ->defaultNull() |
||
31 | ->end() |
||
32 | ->scalarNode('cache') |
||
33 | ->info('"CacheInterface" implementing cache service ID') |
||
34 | ->defaultNull() |
||
35 | ->end() |
||
36 | ->arrayNode('tags') |
||
37 | ->arrayPrototype() |
||
38 | ->beforeNormalization() |
||
39 | ->ifString() |
||
40 | ->then(function ($value) { |
||
41 | return ['value' => $value]; |
||
42 | }) |
||
43 | ->end() |
||
44 | ->children() |
||
45 | ->scalarNode('value') |
||
46 | ->isRequired() |
||
47 | ->cannotBeEmpty() |
||
48 | ->end() |
||
49 | ->scalarNode('name') |
||
50 | ->defaultNull() |
||
51 | ->end() |
||
52 | ->end() |
||
53 | ->end() |
||
54 | ->end() |
||
55 | ->end() |
||
56 | ; |
||
57 | // @formatter:on |
||
58 | |||
59 | return $treeBuilder; |
||
60 | } |
||
61 | } |
||
62 |
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.