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

DescriptionNode   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 21
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 21
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A toConfig() 0 4 1
A cleanAstDescription() 0 13 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
9
class DescriptionNode implements NodeInterface
10
{
11 2
    public static function toConfig(Node $node): array
12
    {
13 2
        return ['description' => self::cleanAstDescription($node->description)];
14
    }
15
16 2
    private static function cleanAstDescription($description)
17
    {
18 2
        if (null === $description) {
19 2
            return null;
20
        }
21
22 1
        if (\property_exists($description, 'value')) {
23 1
            $description = $description->value;
24
        }
25 1
        $description = \trim($description);
26
27 1
        return empty($description) ? null : $description;
28
    }
29
}
30