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 (#496)
by Jérémiah
19:36
created

Executor   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 5
eloc 10
dl 0
loc 34
ccs 10
cts 10
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setPromiseAdapter() 0 3 1
A execute() 0 21 4
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
    /** @var PromiseAdapter */
16
    private $promiseAdapter;
17
18
    /**
19
     * {@inheritdoc}
20
     */
21 84
    public function execute(
22
        Schema $schema,
23
        string $requestString,
24
        $rootValue = null,
25
        $contextValue = null,
26
        $variableValues = null,
27
        $operationName = null,
28
        ?callable $fieldResolver = null,
29
        ?array $validationRules = null
30
    ): ExecutionResult {
31 84
        if ($this->promiseAdapter && !$this->promiseAdapter instanceof PromiseAdapterInterface && !\is_callable([$this->promiseAdapter, 'wait'])) {
32 1
            throw new \RuntimeException(
33 1
                \sprintf(
34 1
                    'PromiseAdapter should be an object instantiating "%s" or "%s" with a "wait" method.',
35 1
                    PromiseAdapterInterface::class,
36 1
                    PromiseAdapter::class
37
                )
38
            );
39
        }
40
41 83
        return $this->promiseAdapter->wait(GraphQL::promiseToExecute($this->promiseAdapter, ...\func_get_args()));
0 ignored issues
show
Bug introduced by
The method wait() does not exist on GraphQL\Executor\Promise\PromiseAdapter. It seems like you code against a sub-type of said class. However, the method does not exist in GraphQL\Executor\Promise...ter\ReactPromiseAdapter. Are you sure you never get one of those? ( Ignorable by Annotation )

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

41
        return $this->promiseAdapter->/** @scrutinizer ignore-call */ wait(GraphQL::promiseToExecute($this->promiseAdapter, ...\func_get_args()));
Loading history...
42
    }
43
44 103
    public function setPromiseAdapter(PromiseAdapter $promiseAdapter): void
45
    {
46 103
        $this->promiseAdapter = $promiseAdapter;
47 103
    }
48
}
49