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

TypeNode   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 0
loc 27
ccs 12
cts 12
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A toConfig() 0 4 1
A astTypeNodeToString() 0 19 4
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
use GraphQL\Language\AST\NodeKind;
9
10
class TypeNode implements NodeInterface
11
{
12 2
    public static function toConfig(Node $node): array
13
    {
14 2
        return ['type' => self::astTypeNodeToString($node->type)];
15
    }
16
17 2
    public static function astTypeNodeToString(\GraphQL\Language\AST\TypeNode $typeNode): string
18
    {
19 2
        $type = '';
20 2
        switch ($typeNode->kind) {
21
            case NodeKind::NAMED_TYPE:
22 2
                $type = $typeNode->name->value;
23 2
                break;
24
25
            case NodeKind::NON_NULL_TYPE:
26 2
                $type = self::astTypeNodeToString($typeNode->type).'!';
27 2
                break;
28
29
            case NodeKind::LIST_TYPE:
30 2
                $type = '['.self::astTypeNodeToString($typeNode->type).']';
31 2
                break;
32
        }
33
34 2
        return $type;
35
    }
36
}
37