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   A

Complexity

Total Complexity 9

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 88.89%

Importance

Changes 10
Bugs 3 Features 2
Metric Value
wmc 9
c 10
b 3
f 2
lcom 1
cbo 2
dl 0
loc 42
ccs 16
cts 18
cp 0.8889
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A setDefaultResolveFn() 0 6 1
A getDefaultResolveFn() 0 4 1
B resolve() 0 17 6
A supportedSolutionClass() 0 4 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\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