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::toConfig()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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