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

DescriptionNode::cleanAstDescription()   A

Complexity

Conditions 4
Paths 5

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 4

Importance

Changes 0
Metric Value
dl 0
loc 13
ccs 7
cts 7
cp 1
rs 9.8333
c 0
b 0
f 0
cc 4
nc 5
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
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