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::toMappingDefinition()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 22
Code Lines 14

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 14
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 22
ccs 14
cts 14
cp 1
rs 9.2
cc 2
eloc 14
nc 2
nop 1
crap 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