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 (#7)
by Jérémiah
09:02
created

ConfigResolver::resolveResolveCallbackArgs()   A

Complexity

Conditions 3
Paths 2

Size

Total Lines 22
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 13
CRAP Score 3

Importance

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