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.

getDefaultLanguage()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 2
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GraphQLAPI\GraphQLAPI\EditorScripts;
6
7
use GraphQLAPI\GraphQLAPI\Scripts\GraphQLByPoPScriptTrait;
8
use GraphQLAPI\GraphQLAPI\PostTypes\GraphQLEndpointPostType;
9
10
/**
11
 * Components required to edit a GraphQL endpoint CPT
12
 */
13
class EndpointComponentEditorScript extends AbstractEditorScript
14
{
15
    use GraphQLByPoPScriptTrait;
16
17
    /**
18
     * Block name
19
     *
20
     * @return string
21
     */
22
    protected function getScriptName(): string
23
    {
24
        return 'endpoint-editor-components';
25
    }
26
27
    /**
28
     * Add the locale language to the localized data?
29
     *
30
     * @return bool
31
     */
32
    protected function addLocalLanguage(): bool
33
    {
34
        return true;
35
    }
36
37
    /**
38
     * Default language for the script/component's documentation
39
     */
40
    protected function getDefaultLanguage(): ?string
41
    {
42
        // English
43
        return 'en';
44
    }
45
46
    /**
47
     * In what languages is the documentation available
48
     *
49
     * @return string[]
50
     */
51
    protected function getDocLanguages(): array
52
    {
53
        return array_merge(
54
            parent::getDocLanguages(),
55
            [
56
                'es', // Spanish
57
            ]
58
        );
59
    }
60
61
    /**
62
     * Post types for which to register the script
63
     *
64
     * @return string[]
65
     */
66
    protected function getAllowedPostTypes(): array
67
    {
68
        return array_merge(
69
            parent::getAllowedPostTypes(),
70
            [
71
                GraphQLEndpointPostType::POST_TYPE,
72
            ]
73
        );
74
    }
75
}
76