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
Push — master ( 024700...341ac6 )
by Jérémiah
04:30
created

ObjectTypeDefinition   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 6

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
c 1
b 0
f 0
lcom 1
cbo 6
dl 0
loc 43
ccs 29
cts 29
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
B getDefinition() 0 40 5
1
<?php
2
3
/*
4
 * This file is part of the OverblogGraphQLBundle package.
5
 *
6
 * (c) Overblog <http://github.com/overblog/>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Overblog\GraphQLBundle\Config;
13
14
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
15
16
class ObjectTypeDefinition extends TypeWithOutputFieldsDefinition
17
{
18 15
    public function getDefinition()
19
    {
20 15
        $builder = new TreeBuilder();
21 15
        $node = $builder->root('_object_config');
22
23
        $node
0 ignored issues
show
Bug introduced by
The method variableNode() 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...
24 15
            ->children()
25 15
                ->append($this->nameSection())
26 15
                ->append($this->outputFieldsSelection('fields', true))
27 15
                ->append($this->descriptionSection())
28 15
                ->arrayNode('interfaces')
29 15
                    ->prototype('scalar')->info('One of internal or custom interface types.')->end()
30 15
                ->end()
31 15
                ->variableNode('isTypeOf')->end()
32 15
                ->variableNode('resolveField')->end()
33 15
                ->variableNode('fieldsDefaultAccess')
34 15
                ->info('Default access control to fields (expression language can be use here)')
35 15
                ->end()
36 15
            ->end();
37
38 15
        $node->validate()
39
            ->ifTrue(function ($v) {
40
41 9
                return array_key_exists('fieldsDefaultAccess', $v) && null !== $v['fieldsDefaultAccess'];
42 15
            })
43 15
            ->then(function ($v) {
44 1
                foreach ($v['fields'] as &$field) {
45 1
                    if (array_key_exists('access', $field) && null !== $field['access']) {
46 1
                        continue;
47
                    }
48
49 1
                    $field['access'] = $v['fieldsDefaultAccess'];
50 1
                }
51
52 1
                return $v;
53 15
            })
54 15
            ->end();
55
56 15
        return $node;
57
    }
58
}
59