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 ( aac044...cc3c72 )
by Leonardo
14:28
created

ModulesMenuPage::isCurrentScreen()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 1
nc 2
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GraphQLAPI\GraphQLAPI\ConditionalOnEnvironment\Admin\Services\MenuPages;
6
7
use GraphQLAPI\GraphQLAPI\Admin\Tables\ModuleListTable;
8
use GraphQLAPI\GraphQLAPI\ConditionalOnEnvironment\Admin\Services\Helpers\MenuPageHelper;
9
use GraphQLAPI\GraphQLAPI\ConditionalOnEnvironment\Admin\Services\MenuPages\AbstractTableMenuPage;
10
use GraphQLAPI\GraphQLAPI\General\RequestParams;
11
12
/**
13
 * Module menu page
14
 */
15
class ModulesMenuPage extends AbstractTableMenuPage
16
{
17
    use GraphQLAPIMenuPageTrait;
18
    use OpenInModalTriggerMenuPageTrait;
19
20
    public const SCREEN_OPTION_NAME = 'graphql_api_modules_per_page';
21
22
    protected MenuPageHelper $menuPageHelper;
23
24
    function __construct(MenuPageHelper $menuPageHelper)
25
    {
26
        $this->menuPageHelper = $menuPageHelper;
27
    }
28
29
    public function getMenuPageSlug(): string
30
    {
31
        return 'modules';
32
    }
33
34
    protected function getHeader(): string
35
    {
36
        return \__('GraphQL API — Modules', 'graphql-api');
37
    }
38
39
    protected function hasViews(): bool
40
    {
41
        return true;
42
    }
43
44
    protected function getScreenOptionLabel(): string
45
    {
46
        return \__('Modules', 'graphql-api');
47
    }
48
49
    /**
50
     * Validate the param also
51
     */
52
    protected function isCurrentScreen(): bool
53
    {
54
        return !$this->menuPageHelper->isDocumentationScreen() && parent::isCurrentScreen();
55
    }
56
57
    protected function getScreenOptionName(): string
58
    {
59
        return self::SCREEN_OPTION_NAME;
60
    }
61
62
    protected function getTableClass(): string
63
    {
64
        return ModuleListTable::class;
65
    }
66
67
    // protected function showScreenOptions(): bool
68
    // {
69
    //     return true;
70
    // }
71
72
    /**
73
     * Enqueue the required assets
74
     */
75
    protected function enqueueAssets(): void
76
    {
77
        parent::enqueueAssets();
78
79
        $this->enqueueModalTriggerAssets();
80
    }
81
}
82