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
Push — master ( a14b66...df0125 )
by Jérémiah
18:19
created

Executor::setPromiseAdapter()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Overblog\GraphQLBundle\Executor;
6
7
use GraphQL\Executor\ExecutionResult;
8
use GraphQL\Executor\Promise\PromiseAdapter;
9
use GraphQL\GraphQL;
10
use GraphQL\Type\Schema;
11
use Overblog\GraphQLBundle\Executor\Promise\PromiseAdapterInterface;
12
13
class Executor implements ExecutorInterface
14
{
15
    /**
16
     * {@inheritdoc}
17
     */
18 84
    public function execute(
19
        PromiseAdapter $promiseAdapter,
20
        Schema $schema,
21
        string $requestString,
22
        $rootValue = null,
23
        $contextValue = null,
24
        $variableValues = null,
25
        $operationName = null,
26
        ?callable $fieldResolver = null,
27
        ?array $validationRules = null
28
    ): ExecutionResult {
29 84
        if (!\method_exists($promiseAdapter, 'wait')) {
30 1
            throw new \RuntimeException(
31 1
                \sprintf(
32 1
                    'PromiseAdapter should be an object instantiating "%s" or "%s" with a "wait" method.',
33 1
                    PromiseAdapterInterface::class,
34 1
                    PromiseAdapter::class
35
                )
36
            );
37
        }
38
39 83
        return $promiseAdapter->wait(GraphQL::promiseToExecute(...\func_get_args()));
40
    }
41
}
42