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
Pull Request — master (#30)
by Jérémiah
09:59
created

ConfigResolver::getDefaultResolveFn()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
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\Resolver;
13
14
use GraphQL\Executor\Executor;
15
16
class ConfigResolver extends AbstractResolver
17
{
18
    /**
19
     * @var callable
20
     */
21
    private $defaultResolveFn = ['GraphQL\Executor\Executor', 'defaultResolveFn'];
22
23 27
    public function setDefaultResolveFn(callable $defaultResolveFn)
24
    {
25 27
        Executor::setDefaultResolveFn($defaultResolveFn);
26
27 27
        $this->defaultResolveFn = $defaultResolveFn;
28 27
    }
29
30
    public function getDefaultResolveFn()
31
    {
32
        return $this->defaultResolveFn;
33
    }
34
35 33
    public function resolve($config)
36
    {
37 33
        if (!is_array($config) || $config instanceof \ArrayAccess) {
38 1
            throw new \RuntimeException('Config must be an array or implement \ArrayAccess interface');
39
        }
40
41 32
        foreach ($config as $name => &$values) {
42 32
            if ((!$solution = $this->getSolution($name)) || empty($values)) {
43 32
                continue;
44
            }
45 27
            $options = $this->getSolutionOptions($name);
46
47 27
            $values = call_user_func_array([$solution, $options['method']], [$values, &$config]);
48 32
        }
49
50 32
        return $config;
51
    }
52
53 27
    protected function supportedSolutionClass()
54
    {
55 27
        return 'Overblog\\GraphQLBundle\\Resolver\\Config\\ConfigSolutionInterface';
56
    }
57
}
58