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 — master ( 48eab4...bce55d )
by Jérémiah
14:36
created

DirectiveNode::toConfig()   A

Complexity

Conditions 4
Paths 4

Size

Total Lines 16

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 9
CRAP Score 4

Importance

Changes 0
Metric Value
dl 0
loc 16
ccs 9
cts 9
cp 1
rs 9.7333
c 0
b 0
f 0
cc 4
nc 4
nop 1
crap 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