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

DirectiveNode   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 19
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A toConfig() 0 16 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\Type\Definition\Directive;
9
10
class DirectiveNode implements NodeInterface
11
{
12 2
    public static function toConfig(Node $node): array
13
    {
14 2
        $config = [];
15
16 2
        foreach ($node->directives as $directiveDef) {
17 1
            if ('deprecated' === $directiveDef->name->value) {
18 1
                $reason = $directiveDef->arguments->count() ?
19 1
                    $directiveDef->arguments[0]->value->value : Directive::DEFAULT_DEPRECATION_REASON;
20
21 1
                $config['deprecationReason'] = $reason;
22 1
                break;
23
            }
24
        }
25
26 2
        return $config;
27
    }
28
}
29