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 — 0.14 (#851)
by Jérémiah
08:23
created

Field   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 20
c 1
b 0
f 0
dl 0
loc 42
ccs 7
cts 7
cp 1
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 2
A normalizeArgs() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Overblog\GraphQLBundle\Generator\Config;
6
7
final class Field extends AbstractConfig
8
{
9
    protected const NORMALIZERS = [
10
        'resolver' => 'normalizeCallback',
11
//        'access' => 'normalizeCallback',
12
//        'public' => 'normalizeCallback',
13
//        'complexity' => 'normalizeCallback',
14
    ];
15
16
    public string $type;
17
    public ?string $description = null;
18
    /** @var Arg[]|null */
19
    public ?array $args = null;
20
    public ?Callback $resolver = null;
21
/** @var mixed|null */
22
    /*?Callback*/ public $access = null;
23
/** @var mixed|null */
24
    /*?Callback*/ public $public = null;
25
/** @var mixed|null */
26
    /*?Callback*/ public $complexity = null;
27
    public ?Validation $validation = null;
28
    public ?array $validationGroups = null;
29
    public ?string $deprecationReason = null;
30
31
    /**
32
     * @var mixed
33
     */
34
    public $defaultValue;
35
36
    public bool $hasDefaultValue;
37
    public bool $hasOnlyType;
38
39 38
    public function __construct(array $config)
40
    {
41 38
        parent::__construct($config);
42 38
        $this->hasOnlyType = 1 === count($config) && isset($config['type']);
43 38
        $this->hasDefaultValue = array_key_exists('defaultValue', $config);
44 38
    }
45
46 29
    protected function normalizeArgs(array $args): array
47
    {
48 29
        return array_map(fn (array $arg) => new Arg($arg), $args);
49
    }
50
}
51