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 (#786)
by Timur
25:02
created

PluralIdentifyingRootFieldQuery   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 4
eloc 7
dl 0
loc 29
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A __invoke() 0 9 2
A getAliases() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Overblog\GraphQLBundle\GraphQL\Relay\Node;
6
7
use GraphQL\Executor\Promise\Promise;
8
use GraphQL\Executor\Promise\PromiseAdapter;
9
use GraphQL\Type\Definition\ResolveInfo;
10
use Overblog\GraphQLBundle\Definition\Resolver\AliasedInterface;
11
use Overblog\GraphQLBundle\Definition\Resolver\QueryInterface;
12
use function call_user_func_array;
13
14
final class PluralIdentifyingRootFieldQuery implements QueryInterface, AliasedInterface
15
{
16
    private PromiseAdapter $promiseAdapter;
17
18
    public function __construct(PromiseAdapter $promiseAdapter)
19
    {
20
        $this->promiseAdapter = $promiseAdapter;
21
    }
22
23
    /**
24
     * @param mixed $context
25
     */
26
    public function __invoke(array $inputs, $context, ResolveInfo $info, callable $resolveSingleInput): Promise
27
    {
28
        $data = [];
29
30
        foreach ($inputs as $input) {
31
            $data[$input] = $this->promiseAdapter->createFulfilled(call_user_func_array($resolveSingleInput, [$input, $context, $info]));
32
        }
33
34
        return $this->promiseAdapter->all($data);
35
    }
36
37
    /**
38
     * {@inheritdoc}
39
     */
40
    public static function getAliases(): array
41
    {
42
        return ['__invoke' => 'relay_plural_identifying_field'];
43
    }
44
}
45