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::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 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