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
03:24
created

AbstractProxyResolver::resolve()   B

Complexity

Conditions 6
Paths 12

Size

Total Lines 31
Code Lines 17

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 31
rs 8.439
cc 6
eloc 17
nc 12
nop 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
    public function resolve($input)
24
    {
25
        if (!is_array($input)) {
26
            $input = [$input];
27
        }
28
29
        if (!isset($input[0]) || !isset($input[1])) {
30
            $optionResolver = new OptionsResolver();
31
            $optionResolver->setDefaults([null, []]);
32
            $input = $optionResolver->resolve($input);
33
        }
34
35
        $alias = $input[0];
36
        $funcArgs = $input[1];
37
38
        if (null === $func = $this->cache->fetch($alias)) {
39
            $solution = $this->getSolution($alias);
40
41
            if (null === $solution) {
42
                throw new UnresolvableException($this->unresolvableMessage($alias));
43
            }
44
45
            $options = $this->getSolutionOptions($alias);
46
47
            $func = [$solution, $options['method']];
48
49
            $this->cache->save($alias, $func);
50
        }
51
52
        return call_user_func_array($func, $funcArgs);
53
    }
54
55
    abstract protected function unresolvableMessage($alias);
56
}
57