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
06:26
created

GlobalID::__construct()   B

Complexity

Conditions 5
Paths 1

Size

Total Lines 16
Code Lines 10

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 12
CRAP Score 5

Importance

Changes 0
Metric Value
dl 0
loc 16
ccs 12
cts 12
cp 1
rs 8.8571
c 0
b 0
f 0
cc 5
eloc 10
nc 1
nop 1
crap 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 29
    public function __construct($name = 'globalId')
19
    {
20 29
        parent::__construct(
21 29
            $name,
22 1
            function ($id, $typeName = null) {
23 1
                $typeNameEmpty = null === $typeName || '""' === $typeName || 'null' === $typeName || 'false' === $typeName;
24
25 1
                return sprintf(
26 1
                    '%s::toGlobalId(%s, %s)',
27 1
                    \Overblog\GraphQLBundle\Relay\Node\GlobalId::class,
28 1
                    sprintf($typeNameEmpty ? '$info->parentType->name' : '%s', $typeName),
29
                    $id
30 1
                );
31
            }
32 29
        );
33 29
    }
34
}
35