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

Completed
Pull Request — master (#137)
by Jérémiah
05:30
created

GlobalID   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
lcom 0
cbo 1
dl 0
loc 19
rs 10
c 1
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
B __construct() 0 16 5
1
<?php
2
3
/*
4
 * This file is part of the OverblogGraphQLBundle package.
5
 *
6
 * (c) Overblog <http://github.com/overblog/>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Overblog\GraphQLBundle\ExpressionLanguage\ExpressionFunction\GraphQL\Relay;
13
14
use Overblog\GraphQLBundle\ExpressionLanguage\ExpressionFunction;
15
16
final class GlobalID extends ExpressionFunction
17
{
18
    public function __construct($name = 'globalId')
19
    {
20
        parent::__construct(
21
            $name,
22
            function ($id, $typeName = null) {
23
                $typeNameEmpty = null === $typeName || '""' === $typeName || 'null' === $typeName || 'false' === $typeName;
24
25
                return sprintf(
26
                    '%s::toGlobalId(%s, %s)',
27
                    \Overblog\GraphQLBundle\Relay\Node\GlobalId::class,
28
                    sprintf($typeNameEmpty ? '$info->parentType->name' : '%s', $typeName),
29
                    $id
30
                );
31
            }
32
        );
33
    }
34
}
35