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
Pull Request — master (#536)
by
unknown
19:43
created

MutateAndGetPayloadCallback   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 63.64%

Importance

Changes 0
Metric Value
wmc 1
eloc 14
dl 0
loc 22
ccs 7
cts 11
cp 0.6364
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 20 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 MutateAndGetPayloadCallback extends ExpressionFunction
12
{
13 119
    public function __construct(GlobalVariables $globalVariables, $name = 'mutateAndGetPayloadCallback')
14
    {
15 119
        parent::__construct(
16 119
            $name,
17
            function ($mutateAndGetPayload) {
18 4
                $code = 'function ($value) use ('.TypeGenerator::USE_FOR_CLOSURES.', $args, $context, $info) { ';
19 4
                $code .= 'return '.$mutateAndGetPayload.'; }';
20
21 4
                return $code;
22 119
            },
23
            // TODO: finish this callback
24
            function ($arguments, $mutateAndGetPayload) use ($globalVariables) {
25
                [
26
                    'context' => $context,
27
                    'args'    => $args,
28
                    'info'    => $info
29
                ] = $arguments;
30
31
                return function($value) use ($mutateAndGetPayload, $globalVariables, $args, $context, $info) {
0 ignored issues
show
Unused Code introduced by
The import $context 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...
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...
Unused Code introduced by
The import $info 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...
Unused Code introduced by
The parameter $value 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

31
                return function(/** @scrutinizer ignore-unused */ $value) use ($mutateAndGetPayload, $globalVariables, $args, $context, $info) {

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 $args 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...
32
                    return $mutateAndGetPayload;
33
                };
34 119
            }
35
        );
36 119
    }
37
}
38