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.

EndpointBlockCategory   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 34
ccs 0
cts 6
cp 0
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getBlockCategoryTitle() 0 3 1
A getBlockCategorySlug() 0 3 1
A getPostTypes() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GraphQLAPI\GraphQLAPI\BlockCategories;
6
7
use GraphQLAPI\GraphQLAPI\PostTypes\GraphQLEndpointPostType;
8
9
class EndpointBlockCategory extends AbstractBlockCategory
10
{
11
    public const ENDPOINT_BLOCK_CATEGORY = 'graphql-api-endpoint';
12
13
    /**
14
     * Custom Post Type for which to enable the block category
15
     *
16
     * @return string[]
17
     */
18
    public function getPostTypes(): array
19
    {
20
        return [
21
            GraphQLEndpointPostType::POST_TYPE,
22
        ];
23
    }
24
25
    /**
26
     * Block category's slug
27
     *
28
     * @return string
29
     */
30
    protected function getBlockCategorySlug(): string
31
    {
32
        return self::ENDPOINT_BLOCK_CATEGORY;
33
    }
34
35
    /**
36
     * Block category's title
37
     *
38
     * @return string
39
     */
40
    protected function getBlockCategoryTitle(): string
41
    {
42
        return __('GraphQL endpoint', 'graphql-api');
43
    }
44
}
45