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 (#198)
by Jérémiah
06:23
created

Executor::execute()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 13
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 13
ccs 7
cts 7
cp 1
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 8
nc 2
nop 6
crap 2
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 59
    public function execute(Schema $schema, $requestString, $rootValue = null, $contextValue = null, $variableValues = null, $operationName = null)
29
    {
30 59
        $args = func_get_args();
31
32 59
        if (null === $this->promiseAdapter) {
33 2
            $method = 'executeQuery';
34
        } else {
35 57
            array_unshift($args, $this->promiseAdapter);
36 57
            $method = 'promiseToExecute';
37
        }
38
39 59
        return call_user_func_array(sprintf('\%s::%s', GraphQL::class, $method), $args);
40
    }
41
42
    /**
43
     * {@inheritdoc}
44
     */
45 61
    public function setPromiseAdapter(PromiseAdapter $promiseAdapter = null)
46
    {
47 61
        $this->promiseAdapter = $promiseAdapter;
48 61
    }
49
50
    /**
51
     * {@inheritdoc}
52
     */
53 57
    public function setDefaultFieldResolver(callable $fn)
54
    {
55 57
        call_user_func_array(sprintf('\%s::setDefaultFieldResolver', GraphQL::class), func_get_args());
56 57
    }
57
}
58