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 (#5)
by Jérémiah
07:11
created

AbstractProxyResolver   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 6
c 1
b 0
f 0
lcom 1
cbo 4
dl 0
loc 41
ccs 20
cts 20
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
B resolve() 0 31 6
unresolvableMessage() 0 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 Symfony\Component\OptionsResolver\OptionsResolver;
15
16
abstract class AbstractProxyResolver extends AbstractResolver
17
{
18
    /**
19
     * @param $input
20
     *
21
     * @return mixed
22
     */
23 19
    public function resolve($input)
24
    {
25 19
        if (!is_array($input)) {
26 2
            $input = [$input];
27 2
        }
28
29 19
        if (!isset($input[0]) || !isset($input[1])) {
30 2
            $optionResolver = new OptionsResolver();
31 2
            $optionResolver->setDefaults([null, []]);
32 2
            $input = $optionResolver->resolve($input);
33 2
        }
34
35 19
        $alias = $input[0];
36 19
        $funcArgs = $input[1];
37
38 19
        if (null === $func = $this->cache->fetch($alias)) {
39 19
            $solution = $this->getSolution($alias);
40
41 19
            if (null === $solution) {
42 2
                throw new UnresolvableException($this->unresolvableMessage($alias));
43
            }
44
45 17
            $options = $this->getSolutionOptions($alias);
46
47 17
            $func = [$solution, $options['method']];
48
49 17
            $this->cache->save($alias, $func);
50 17
        }
51
52 17
        return call_user_func_array($func, $funcArgs);
53
    }
54
55
    abstract protected function unresolvableMessage($alias);
56
}
57