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

Passed
Pull Request — master (#137)
by Jérémiah
08:18
created

PluralIdentifyingRootFieldResolver   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 18.18%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 1
dl 0
loc 31
ccs 2
cts 11
cp 0.1818
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A __invoke() 0 10 2
A getAliases() 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\GraphQL\Relay\Node;
13
14
use GraphQL\Executor\Promise\PromiseAdapter;
15
use Overblog\GraphQLBundle\Definition\Resolver\AliasedInterface;
16
use Overblog\GraphQLBundle\Definition\Resolver\ResolverInterface;
17
18
final class PluralIdentifyingRootFieldResolver implements ResolverInterface, AliasedInterface
19
{
20
    /**
21
     * @var PromiseAdapter
22
     */
23
    private $promiseAdapter;
24
25
    public function __construct(PromiseAdapter $promiseAdapter)
26
    {
27
        $this->promiseAdapter = $promiseAdapter;
28
    }
29
30
    public function __invoke(array $inputs, $context, $info, callable $resolveSingleInput)
31
    {
32
        $data = [];
33
34
        foreach ($inputs as $input) {
35
            $data[$input] = $this->promiseAdapter->createFulfilled(call_user_func_array($resolveSingleInput, [$input, $context, $info]));
36
        }
37
38
        return $this->promiseAdapter->all($data);
39
    }
40
41
    /**
42
     * {@inheritdoc}
43
     */
44 71
    public static function getAliases()
45
    {
46 71
        return ['__invoke' => 'relay_plural_identifying_field'];
47
    }
48
}
49