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 ( cc83a8...7c2c4f )
by Jérémiah
48s
created

IdFetcherCallback::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 7

Duplication

Lines 12
Ratio 100 %

Code Coverage

Tests 9
CRAP Score 1

Importance

Changes 0
Metric Value
dl 12
loc 12
ccs 9
cts 9
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 1
crap 1
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
use Overblog\GraphQLBundle\Generator\TypeGenerator;
16
17 View Code Duplication
final class IdFetcherCallback extends ExpressionFunction
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
18
{
19 29
    public function __construct($name = 'idFetcherCallback')
20
    {
21 29
        parent::__construct(
22 29
            $name,
23 2
            function ($idFetcher) {
24 2
                $code = 'function ($value) use ('.TypeGenerator::USE_FOR_CLOSURES.', $args, $context, $info) { ';
25 2
                $code .= 'return '.$idFetcher.'; }';
26
27 2
                return $code;
28
            }
29 29
        );
30 29
    }
31
}
32