GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 6f9d65...c30996 )
by Leonardo
02:49
created

VersioningFunctionalityModuleResolver   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 50
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 21
c 1
b 0
f 0
dl 0
loc 50
ccs 0
cts 40
cp 0
rs 10
wmc 8

5 Methods

Rating   Name   Duplication   Size   Complexity  
A isEnabledByDefault() 0 7 2
A getModulesToResolve() 0 4 1
A getDependedModuleLists() 0 11 2
A getDescription() 0 7 2
A getName() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GraphQLAPI\GraphQLAPI\ModuleResolvers;
6
7
use GraphQLAPI\GraphQLAPI\Plugin;
8
use GraphQLAPI\GraphQLAPI\ModuleResolvers\ModuleResolverTrait;
9
10
class VersioningFunctionalityModuleResolver extends AbstractFunctionalityModuleResolver
11
{
12
    use ModuleResolverTrait;
13
14
    public const FIELD_DEPRECATION = Plugin::NAMESPACE . '\field-deprecation';
15
16
    public static function getModulesToResolve(): array
17
    {
18
        return [
19
            self::FIELD_DEPRECATION,
20
        ];
21
    }
22
23
    public function getDependedModuleLists(string $module): array
24
    {
25
        switch ($module) {
26
            case self::FIELD_DEPRECATION:
27
                return [
28
                    [
29
                        FunctionalityModuleResolver::SCHEMA_CONFIGURATION,
30
                    ],
31
                ];
32
        }
33
        return parent::getDependedModuleLists($module);
34
    }
35
36
    public function getName(string $module): string
37
    {
38
        $names = [
39
            self::FIELD_DEPRECATION => \__('Field Deprecation', 'graphql-api'),
40
        ];
41
        return $names[$module] ?? $module;
42
    }
43
44
    public function getDescription(string $module): string
45
    {
46
        switch ($module) {
47
            case self::FIELD_DEPRECATION:
48
                return \__('Deprecate fields, and explain how to replace them, through a user interface', 'graphql-api');
49
        }
50
        return parent::getDescription($module);
51
    }
52
53
    public function isEnabledByDefault(string $module): bool
54
    {
55
        switch ($module) {
56
            case self::FIELD_DEPRECATION:
57
                return false;
58
        }
59
        return parent::isEnabledByDefault($module);
60
    }
61
}
62