Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Completed
Pull Request — 0.11 (#427)
by Jérémiah
20:28 queued 17:07
created

Configuration::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 5
c 0
b 0
f 0
ccs 4
cts 4
cp 1
rs 10
cc 1
nc 1
nop 2
crap 1
1
<?php
2
3
namespace Overblog\GraphQLBundle\DependencyInjection;
4
5
use GraphQL\Validator\Rules\QueryComplexity;
6
use GraphQL\Validator\Rules\QueryDepth;
7
use Overblog\GraphQLBundle\Error\ErrorHandler;
8
use Overblog\GraphQLBundle\EventListener\ErrorLoggerListener;
9
use Overblog\GraphQLBundle\Resolver\Resolver;
10
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
11
use Symfony\Component\Config\Definition\Builder\EnumNodeDefinition;
12
use Symfony\Component\Config\Definition\Builder\ScalarNodeDefinition;
13
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
14
use Symfony\Component\Config\Definition\ConfigurationInterface;
15
16
class Configuration implements ConfigurationInterface
17
{
18
    const NAME = 'overblog_graphql';
19
20
    /** bool */
21
    private $debug;
22
23
    /** null|string */
24
    private $cacheDir;
25
26
    /**
27
     * Constructor.
28
     *
29
     * @param bool        $debug    Whether to use the debug mode
30
     * @param null|string $cacheDir
31
     */
32 33
    public function __construct($debug, $cacheDir = null)
33
    {
34 33
        $this->debug = (bool) $debug;
35 33
        $this->cacheDir = $cacheDir;
36 33
    }
37
38 33
    public function getConfigTreeBuilder()
39
    {
40 33
        $treeBuilder = new TreeBuilder(self::NAME);
0 ignored issues
show
Unused Code introduced by
The call to TreeBuilder::__construct() has too many arguments starting with self::NAME.

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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
41
42 33
        $rootNode = self::getRootNodeWithoutDeprecation($treeBuilder, self::NAME);
43
44
        $rootNode
45 33
            ->children()
46 33
                ->append($this->batchingMethodSection())
47 33
                ->append($this->definitionsSection())
48 33
                ->append($this->errorsHandlerSection())
49 33
                ->append($this->servicesSection())
50 33
                ->append($this->securitySection())
51 33
            ->end();
52
53 33
        return $treeBuilder;
54
    }
55
56 33
    private function batchingMethodSection()
57
    {
58 33
        $builder = new TreeBuilder('batching_method', 'enum');
0 ignored issues
show
Unused Code introduced by
The call to TreeBuilder::__construct() has too many arguments starting with 'batching_method'.

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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
59
        /** @var EnumNodeDefinition $node */
60 33
        $node = self::getRootNodeWithoutDeprecation($builder, 'batching_method', 'enum');
61
62
        $node
0 ignored issues
show
Unused Code introduced by
The call to the method Symfony\Component\Config...umNodeDefinition::end() seems un-needed as the method has no side-effects.

PHP Analyzer performs a side-effects analysis of your code. A side-effect is basically anything that might be visible after the scope of the method is left.

Let’s take a look at an example:

class User
{
    private $email;

    public function getEmail()
    {
        return $this->email;
    }

    public function setEmail($email)
    {
        $this->email = $email;
    }
}

If we look at the getEmail() method, we can see that it has no side-effect. Whether you call this method or not, no future calls to other methods are affected by this. As such code as the following is useless:

$user = new User();
$user->getEmail(); // This line could safely be removed as it has no effect.

On the hand, if we look at the setEmail(), this method _has_ side-effects. In the following case, we could not remove the method call:

$user = new User();
$user->setEmail('email@domain'); // This line has a side-effect (it changes an
                                 // instance variable).
Loading history...
63 33
            ->values(['relay', 'apollo'])
64 33
            ->defaultValue('relay')
65 33
        ->end();
66
67 33
        return $node;
68
    }
69
70 33
    private function errorsHandlerSection()
71
    {
72 33
        $builder = new TreeBuilder('errors_handler');
0 ignored issues
show
Unused Code introduced by
The call to TreeBuilder::__construct() has too many arguments starting with 'errors_handler'.

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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
73
        /** @var ArrayNodeDefinition $node */
74 33
        $node = self::getRootNodeWithoutDeprecation($builder, 'errors_handler');
75
        $node
0 ignored issues
show
Bug introduced by
The method arrayNode() does not seem to exist on object<Symfony\Component...odeDefinitionInterface>.

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.

Loading history...
76 33
            ->treatFalseLike(['enabled' => false])
77 33
            ->treatTrueLike(['enabled' => true])
78 33
            ->treatNullLike(['enabled' => true])
79 33
            ->addDefaultsIfNotSet()
80 33
            ->children()
81 33
                ->booleanNode('enabled')->defaultTrue()->end()
82 33
                ->scalarNode('internal_error_message')->defaultValue(ErrorHandler::DEFAULT_ERROR_MESSAGE)->end()
83 33
                ->booleanNode('rethrow_internal_exceptions')->defaultFalse()->end()
84 33
                ->booleanNode('debug')->defaultValue($this->debug)->end()
85 33
                ->booleanNode('log')->defaultTrue()->end()
86 33
                ->scalarNode('logger_service')->defaultValue(ErrorLoggerListener::DEFAULT_LOGGER_SERVICE)->end()
87 33
                ->booleanNode('map_exceptions_to_parent')->defaultFalse()->end()
88 33
                ->arrayNode('exceptions')
89 33
                    ->addDefaultsIfNotSet()
90 33
                    ->children()
91 33
                        ->arrayNode('warnings')
92 33
                            ->treatNullLike([])
93 33
                            ->prototype('scalar')->end()
94 33
                        ->end()
95 33
                        ->arrayNode('errors')
96 33
                            ->treatNullLike([])
97 33
                            ->prototype('scalar')->end()
98 33
                    ->end()
99 33
                ->end()
100 33
            ->end();
101
102 33
        return $node;
103
    }
104
105 33
    private function definitionsSection()
106
    {
107 33
        $builder = new TreeBuilder('definitions');
0 ignored issues
show
Unused Code introduced by
The call to TreeBuilder::__construct() has too many arguments starting with 'definitions'.

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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
108
        /** @var ArrayNodeDefinition $node */
109 33
        $node = \method_exists($builder, 'getRootNode') ? $builder->getRootNode() : $builder->root('definitions');
0 ignored issues
show
Bug introduced by
The method getRootNode() does not seem to exist on object<Symfony\Component...on\Builder\TreeBuilder>.

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.

Loading history...
110
        $node
111 33
            ->addDefaultsIfNotSet()
112 33
            ->children()
113 33
                ->variableNode('default_resolver')->defaultValue([Resolver::class, 'defaultResolveFn'])->end()
114 33
                ->scalarNode('class_namespace')->defaultValue('Overblog\\GraphQLBundle\\__DEFINITIONS__')->end()
115 33
                ->scalarNode('cache_dir')->defaultNull()->end()
116 33
                ->booleanNode('use_classloader_listener')->defaultTrue()->end()
117 33
                ->booleanNode('auto_compile')->defaultTrue()->end()
118 33
                ->booleanNode('show_debug_info')->info('Show some performance stats in extensions')->defaultFalse()->end()
119 33
                ->booleanNode('config_validation')->defaultValue($this->debug)->end()
120 33
                ->append($this->definitionsSchemaSection())
121 33
                ->append($this->definitionsAutoMappingSection())
122 33
                ->append($this->definitionsMappingsSection())
123 33
                ->arrayNode('builders')
124 33
                    ->children()
125 33
                        ->append($this->builderSection('field'))
126 33
                        ->append($this->builderSection('args'))
127 33
                    ->end()
128 33
                ->end()
129
130 33
            ->end()
131 33
        ->end();
132
133 33
        return $node;
134
    }
135
136 33
    private function servicesSection()
137
    {
138 33
        $builder = new TreeBuilder('services');
0 ignored issues
show
Unused Code introduced by
The call to TreeBuilder::__construct() has too many arguments starting with 'services'.

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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
139
        /** @var ArrayNodeDefinition $node */
140 33
        $node = self::getRootNodeWithoutDeprecation($builder, 'services');
141
        $node
142 33
            ->addDefaultsIfNotSet()
143 33
            ->children()
144 33
                ->scalarNode('executor')
145 33
                    ->defaultValue(self::NAME.'.executor.default')
146 33
                ->end()
147 33
                ->scalarNode('promise_adapter')
148 33
                    ->defaultValue(self::NAME.'.promise_adapter.default')
149 33
                ->end()
150 33
                ->scalarNode('expression_language')
151 33
                    ->defaultValue(self::NAME.'.expression_language.default')
152 33
                ->end()
153 33
                ->scalarNode('cache_expression_language_parser')->end()
154 33
            ->end()
155 33
        ->end();
156
157 33
        return $node;
158
    }
159
160 33
    private function securitySection()
161
    {
162 33
        $builder = new TreeBuilder('security');
0 ignored issues
show
Unused Code introduced by
The call to TreeBuilder::__construct() has too many arguments starting with 'security'.

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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
163
        /** @var ArrayNodeDefinition $node */
164 33
        $node = \method_exists($builder, 'getRootNode') ? $builder->getRootNode() : $builder->root('security');
0 ignored issues
show
Bug introduced by
The method getRootNode() does not seem to exist on object<Symfony\Component...on\Builder\TreeBuilder>.

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.

Loading history...
165
        $node
166 33
            ->addDefaultsIfNotSet()
167 33
            ->children()
168 33
                ->append($this->securityQuerySection('query_max_depth', QueryDepth::DISABLED))
169 33
                ->append($this->securityQuerySection('query_max_complexity', QueryComplexity::DISABLED))
170 33
                ->booleanNode('enable_introspection')->defaultTrue()->end()
171 33
                ->booleanNode('handle_cors')->defaultFalse()->end()
172 33
            ->end()
173 33
        ->end();
174
175 33
        return $node;
176
    }
177
178 33
    private function definitionsSchemaSection()
179
    {
180 33
        $builder = new TreeBuilder('schema');
0 ignored issues
show
Unused Code introduced by
The call to TreeBuilder::__construct() has too many arguments starting with 'schema'.

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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
181
        /** @var ArrayNodeDefinition $node */
182 33
        $node = self::getRootNodeWithoutDeprecation($builder, 'schema');
183
        $node
0 ignored issues
show
Bug introduced by
The method useAttributeAsKey() does not exist on Symfony\Component\Config...\Builder\NodeDefinition. Did you maybe mean attribute()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
184 33
            ->beforeNormalization()
185
                ->ifTrue(function ($v) {
186 29
                    return isset($v['query']) && \is_string($v['query']) || isset($v['mutation']) && \is_string($v['mutation']);
187 33
                })
188
                ->then(function ($v) {
189 28
                    return ['default' => $v];
190 33
                })
191 33
            ->end()
192 33
            ->useAttributeAsKey('name')
193 33
            ->prototype('array')
194 33
                ->addDefaultsIfNotSet()
195 33
                ->children()
196 33
                    ->scalarNode('query')->defaultNull()->end()
197 33
                    ->scalarNode('mutation')->defaultNull()->end()
198 33
                    ->scalarNode('subscription')->defaultNull()->end()
199 33
                    ->arrayNode('resolver_maps')
200 33
                        ->defaultValue([])
201 33
                        ->prototype('scalar')->end()
202 33
                    ->end()
203 33
                    ->arrayNode('types')
204 33
                        ->defaultValue([])
205 33
                        ->prototype('scalar')->end()
206 33
                    ->end()
207 33
                ->end()
208 33
            ->end()
209 33
        ->end();
210
211 33
        return $node;
212
    }
213
214 33
    private function definitionsAutoMappingSection()
215
    {
216 33
        $builder = new TreeBuilder('auto_mapping');
0 ignored issues
show
Unused Code introduced by
The call to TreeBuilder::__construct() has too many arguments starting with 'auto_mapping'.

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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
217
        /** @var ArrayNodeDefinition $node */
218 33
        $node = self::getRootNodeWithoutDeprecation($builder, 'auto_mapping');
219
        $node
220 33
            ->treatFalseLike(['enabled' => false])
221 33
            ->treatTrueLike(['enabled' => true])
222 33
            ->treatNullLike(['enabled' => true])
223 33
            ->addDefaultsIfNotSet()
224 33
            ->children()
225 33
                ->booleanNode('enabled')->defaultTrue()->end()
226 33
                ->arrayNode('directories')
227 33
                    ->info('List of directories containing GraphQL classes.')
228 33
                    ->prototype('scalar')->end()
229 33
                ->end()
230 33
            ->end()
231 33
        ->end();
232
233 33
        return $node;
234
    }
235
236 33
    private function definitionsMappingsSection()
237
    {
238 33
        $builder = new TreeBuilder('mappings');
0 ignored issues
show
Unused Code introduced by
The call to TreeBuilder::__construct() has too many arguments starting with 'mappings'.

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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
239 33
        $node = self::getRootNodeWithoutDeprecation($builder, 'mappings');
240
        $node
241 33
            ->children()
242 33
                ->arrayNode('auto_discover')
243 33
                    ->treatFalseLike(['bundles' => false, 'root_dir' => false])
244 33
                    ->treatTrueLike(['bundles' => true, 'root_dir' => true])
245 33
                    ->treatNullLike(['bundles' => true, 'root_dir' => true])
246 33
                    ->addDefaultsIfNotSet()
247 33
                    ->children()
248 33
                        ->booleanNode('bundles')->defaultTrue()->end()
249 33
                        ->booleanNode('root_dir')->defaultTrue()->end()
250 33
                    ->end()
251 33
                ->end()
252 33
                ->arrayNode('types')
253 33
                    ->prototype('array')
254 33
                        ->addDefaultsIfNotSet()
255 33
                        ->beforeNormalization()
256
                            ->ifTrue(function ($v) {
257 28
                                return isset($v['type']) && \is_string($v['type']);
258 33
                            })
259
                            ->then(function ($v) {
260 27
                                if ('yml' === $v['type']) {
261 7
                                    $v['types'] = ['yaml'];
262
                                } else {
263 20
                                    $v['types'] = [$v['type']];
264
                                }
265 27
                                unset($v['type']);
266
267 27
                                return $v;
268 33
                            })
269 33
                        ->end()
270 33
                        ->children()
271 33
                            ->arrayNode('types')
272 33
                                ->prototype('enum')->values(\array_keys(OverblogGraphQLTypesExtension::SUPPORTED_TYPES_EXTENSIONS))->isRequired()->end()
273 33
                            ->end()
274 33
                            ->scalarNode('dir')->defaultNull()->end()
275 33
                            ->scalarNode('suffix')->defaultValue(OverblogGraphQLTypesExtension::DEFAULT_TYPES_SUFFIX)->end()
276 33
                        ->end()
277 33
                    ->end()
278 33
                ->end()
279 33
            ->end()
280
        ;
281
282 33
        return $node;
283
    }
284
285
    /**
286
     * @param string $name
287
     *
288
     * @return ArrayNodeDefinition
289
     */
290 33
    private function builderSection($name)
291
    {
292 33
        $builder = new TreeBuilder($name);
0 ignored issues
show
Unused Code introduced by
The call to TreeBuilder::__construct() has too many arguments starting with $name.

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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
293
        /** @var ArrayNodeDefinition $node */
294 33
        $node = self::getRootNodeWithoutDeprecation($builder, $name);
295 33
        $node->beforeNormalization()
296
            ->ifTrue(function ($v) {
297 1
                return \is_array($v) && !empty($v);
298 33
            })
299
            ->then(function ($v) {
300 1
                foreach ($v as $key => &$config) {
301 1
                    if (\is_string($config)) {
302
                        $config = [
303 1
                            'alias' => $key,
304 1
                            'class' => $config,
305
                        ];
306
                    }
307
                }
308
309 1
                return $v;
310 33
            })
311 33
        ->end();
312
313 33
        $node->prototype('array')
0 ignored issues
show
Bug introduced by
It seems like you code against a specific sub-type and not the parent class Symfony\Component\Config...\Builder\NodeDefinition as the method children() does only exist in the following sub-classes of Symfony\Component\Config...\Builder\NodeDefinition: Symfony\Component\Config...der\ArrayNodeDefinition. Maybe you want to instanceof check for one of these explicitly?

Let’s take a look at an example:

abstract class User
{
    /** @return string */
    abstract public function getPassword();
}

class MyUser extends User
{
    public function getPassword()
    {
        // return something
    }

    public function getDisplayName()
    {
        // return some name.
    }
}

class AuthSystem
{
    public function authenticate(User $user)
    {
        $this->logger->info(sprintf('Authenticating %s.', $user->getDisplayName()));
        // do something.
    }
}

In the above example, the authenticate() method works fine as long as you just pass instances of MyUser. However, if you now also want to pass a different sub-classes of User which does not have a getDisplayName() method, the code will break.

Available Fixes

  1. Change the type-hint for the parameter:

    class AuthSystem
    {
        public function authenticate(MyUser $user) { /* ... */ }
    }
    
  2. Add an additional type-check:

    class AuthSystem
    {
        public function authenticate(User $user)
        {
            if ($user instanceof MyUser) {
                $this->logger->info(/** ... */);
            }
    
            // or alternatively
            if ( ! $user instanceof MyUser) {
                throw new \LogicException(
                    '$user must be an instance of MyUser, '
                   .'other instances are not supported.'
                );
            }
    
        }
    }
    
Note: PHP Analyzer uses reverse abstract interpretation to narrow down the types inside the if block in such a case.
  1. Add the method to the parent class:

    abstract class User
    {
        /** @return string */
        abstract public function getPassword();
    
        /** @return string */
        abstract public function getDisplayName();
    }
    
Loading history...
314 33
            ->children()
315 33
                ->scalarNode('alias')->isRequired()->end()
316 33
                ->scalarNode('class')->isRequired()->end()
317 33
            ->end()
318 33
        ->end()
319
        ;
320
321 33
        return $node;
322
    }
323
324
    /**
325
     * @param string $name
326
     * @param bool   $disabledValue
327
     *
328
     * @return ScalarNodeDefinition
329
     */
330 33
    private function securityQuerySection($name, $disabledValue)
331
    {
332 33
        $builder = new TreeBuilder($name, 'scalar');
0 ignored issues
show
Unused Code introduced by
The call to TreeBuilder::__construct() has too many arguments starting with $name.

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.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
333
        /** @var ScalarNodeDefinition $node */
334 33
        $node = self::getRootNodeWithoutDeprecation($builder, $name, 'scalar');
335 33
        $node->beforeNormalization()
336
                ->ifTrue(function ($v) {
337 31
                    return \is_string($v) && \is_numeric($v);
338 33
                })
339
                ->then(function ($v) {
340 4
                    return (int) $v;
341 33
                })
342 33
            ->end();
343
344
        $node
345 33
            ->info('Disabled if equal to false.')
346 33
            ->beforeNormalization()
347
                ->ifTrue(function ($v) {
348 31
                    return false === $v;
349 33
                })
350
                ->then(function () use ($disabledValue) {
351 31
                    return $disabledValue;
352 33
                })
353 33
            ->end()
354 33
            ->defaultFalse()
355 33
            ->validate()
356
                ->ifTrue(function ($v) {
357 31
                    return \is_int($v) && $v < 0;
358 33
                })
359 33
                ->thenInvalid(\sprintf('"%s.security.%s" must be greater or equal to 0.', self::NAME, $name))
360 33
            ->end()
361
        ;
362
363 33
        return $node;
364
    }
365
366
    /**
367
     * @internal
368
     *
369
     * @param TreeBuilder $builder
370
     * @param string|null $name
371
     * @param string      $type
372
     *
373
     * @return ArrayNodeDefinition|\Symfony\Component\Config\Definition\Builder\NodeDefinition
374
     */
375 38
    public static function getRootNodeWithoutDeprecation(TreeBuilder $builder, $name, $type = 'array')
376
    {
377
        // BC layer for symfony/config 4.1 and older
378 38
        return \method_exists($builder, 'getRootNode') ? $builder->getRootNode() : $builder->root($name, $type);
0 ignored issues
show
Bug introduced by
The method getRootNode() does not seem to exist on object<Symfony\Component...on\Builder\TreeBuilder>.

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.

Loading history...
379
    }
380
}
381