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

Passed
Push — annotations ( 16d0c2...28ae84 )
by Jérémiah
17:04
created

UnionNode::toConfig()   A

Complexity

Conditions 3
Paths 2

Size

Total Lines 17

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 9
CRAP Score 3

Importance

Changes 0
Metric Value
dl 0
loc 17
ccs 9
cts 9
cp 1
rs 9.7
c 0
b 0
f 0
cc 3
nc 2
nop 1
crap 3
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Overblog\GraphQLBundle\Config\Parser\GraphQL\ASTConverter;
6
7
use GraphQL\Language\AST\Node;
8
9
class UnionNode implements NodeInterface
10
{
11 1
    public static function toConfig(Node $node): array
12
    {
13 1
        $config = DescriptionNode::toConfig($node);
14
15 1
        if (!empty($node->types)) {
16 1
            $types = [];
17 1
            foreach ($node->types as $type) {
18 1
                $types[] = TypeNode::astTypeNodeToString($type);
19
            }
20 1
            $config['types'] = $types;
21
        }
22
23
        return [
24 1
            'type' => 'union',
25 1
            'config' => $config,
26
        ];
27
    }
28
}
29