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 ( 94a725...12fdff )
by Leonardo
03:33
created

ModulesMenuPage::hasViews()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
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 3
ccs 0
cts 3
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\Admin\MenuPages;
6
7
use GraphQLAPI\GraphQLAPI\Admin\MenuPages\AbstractTableMenuPage;
8
use GraphQLAPI\GraphQLAPI\Admin\Tables\ModuleListTable;
9
10
/**
11
 * Module menu page
12
 */
13
class ModulesMenuPage extends AbstractTableMenuPage
14
{
15
    use GraphQLAPIMenuPageTrait;
16
17
    public const SCREEN_OPTION_NAME = 'graphql_api_modules_per_page';
18
19
    public function getMenuPageSlug(): string
20
    {
21
        return 'modules';
22
    }
23
24
    protected function getHeader(): string
25
    {
26
        return \__('GraphQL API — Modules', 'graphql-api');
27
    }
28
29
    protected function hasViews(): bool
30
    {
31
        return true;
32
    }
33
34
    protected function getScreenOptionLabel(): string
35
    {
36
        return \__('Modules', 'graphql-api');
37
    }
38
39
    protected function getScreenOptionName(): string
40
    {
41
        return self::SCREEN_OPTION_NAME;
42
    }
43
44
    protected function getTableClass(): string
45
    {
46
        return ModuleListTable::class;
47
    }
48
49
    // protected function showScreenOptions(): bool
50
    // {
51
    //     return true;
52
    // }
53
54
    /**
55
     * Enqueue the required assets and initialize the localized scripts
56
     *
57
     * @return void
58
     */
59
    protected function enqueueAssets(): void
60
    {
61
        parent::enqueueAssets();
62
63
        /**
64
         * Hack to open the modal thickbox iframe with the documentation
65
         */
66
        \wp_enqueue_style(
67
            'thickbox'
68
        );
69
        \wp_enqueue_script(
70
            'plugin-install'
71
        );
72
    }
73
}
74