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

NodeDefinition   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 25
ccs 14
cts 14
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A toMappingDefinition() 0 22 2
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\Relay\Node;
13
14
use Overblog\GraphQLBundle\Definition\Builder\MappingInterface;
15
16
class NodeDefinition implements MappingInterface
17
{
18 2
    public function toMappingDefinition(array $config)
19
    {
20 2
        $name = $config['name'];
21 2
        $resolveType = empty($config['resolveType']) ? null : $config['resolveType'];
22
23
        return [
24
            $name => [
25 2
                'type' => 'interface',
26
                'config' => [
27 2
                    'name' => $config['name'],
28 2
                    'description' => 'Fetches an object given its ID',
29
                    'fields' => [
30
                        'id' => [
31 2
                            'type' => 'ID!',
32 2
                            'description' => 'The ID of an object',
33 2
                        ],
34 2
                    ],
35 2
                    'resolveType' => $resolveType,
36 2
                ],
37 2
            ],
38 2
        ];
39
    }
40
}
41