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

Test Setup Failed
Pull Request — master (#198)
by Jérémiah
24:58
created

Executor::setDefaultFieldResolver()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
crap 1
1
<?php
2
3
/*
4
 * This file is part of the OverblogGraphQLBundle package.
5
 *
6
 * (c) Overblog <http://github.com/overblog/>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Overblog\GraphQLBundle\Executor;
13
14
use GraphQL\Executor\Promise\PromiseAdapter;
15
use GraphQL\GraphQL;
16
use GraphQL\Type\Schema;
17
18
class Executor implements ExecutorInterface
19
{
20
    /**
21
     * @var PromiseAdapter
22
     */
23
    private $promiseAdapter;
24
25
    /**
26
     * {@inheritdoc}
27
     */
28
    public function execute(Schema $schema, $requestString, $rootValue = null, $contextValue = null, $variableValues = null, $operationName = null)
29
    {
30
        $args = func_get_args();
31
32
        if (null === $this->promiseAdapter) {
33
            $method = 'executeQuery';
34
        } else {
35
            array_unshift($args, $this->promiseAdapter);
36
            $method = 'promiseToExecute';
37 59
        }
38
39 59
        return call_user_func_array(sprintf('\%s::%s', GraphQL::class, $method), $args);
40
    }
41 59
42 2
    /**
43 2
     * {@inheritdoc}
44 57
     */
45 57
    public function setPromiseAdapter(PromiseAdapter $promiseAdapter = null)
46
    {
47
        $this->promiseAdapter = $promiseAdapter;
48 59
    }
49
50
    /**
51
     * {@inheritdoc}
52
     */
53
    public function setDefaultFieldResolver(callable $fn)
54 61
    {
55
        call_user_func_array(sprintf('\%s::setDefaultFieldResolver', GraphQL::class), func_get_args());
56 61
    }
57
}
58