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 (#536)
by
unknown
20:27
created

ResolveSingleInputCallback   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 87.5%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 9
c 1
b 0
f 0
dl 0
loc 24
ccs 7
cts 8
cp 0.875
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 22 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Overblog\GraphQLBundle\ExpressionLanguage\ExpressionFunction\GraphQL\Relay;
6
7
use Overblog\GraphQLBundle\Definition\GlobalVariables;
8
use Overblog\GraphQLBundle\ExpressionLanguage\ExpressionFunction;
9
use Overblog\GraphQLBundle\Generator\TypeGenerator;
10
11
final class ResolveSingleInputCallback extends ExpressionFunction
12
{
13 123
    public function __construct(GlobalVariables $globalVariables, $name = 'resolveSingleInputCallback')
14
    {
15 123
        parent::__construct(
16 123
            $name,
17
            function ($resolveSingleInput) {
18 1
                $code = 'function ($value) use ('.TypeGenerator::USE_FOR_CLOSURES.', $args, $context, $info) { ';
19 1
                $code .= 'return '.$resolveSingleInput.'; }';
20
21 1
                return $code;
22 123
            },
23
            // TODO: finish this callback
24
            function ($arguments, $mutateAndGetPayload) use ($globalVariables) {
0 ignored issues
show
Unused Code introduced by
The parameter $arguments is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

24
            function (/** @scrutinizer ignore-unused */ $arguments, $mutateAndGetPayload) use ($globalVariables) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The parameter $mutateAndGetPayload is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

24
            function ($arguments, /** @scrutinizer ignore-unused */ $mutateAndGetPayload) use ($globalVariables) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
Unused Code introduced by
The import $globalVariables is not used and could be removed.

This check looks for imports that have been defined, but are not used in the scope.

Loading history...
25
//                [
26
//                    'context' => $context,
27
//                    'args'    => $args,
28
//                    'info'    => $info
29
//                ] = $arguments;
30
//
31
//                return function($value) use ($mutateAndGetPayload, $globalVariables, $args, $context, $info) {
32
//                    return $mutateAndGetPayload;
33
//                };
34
                throw new \RuntimeException("The expression function 'resolveSingleInputCallback' is not yet finished and therefore is not allowed to be used.");
35 123
            }
36
        );
37 123
    }
38
}
39