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

ReleaseNotesAboutMenuPage   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 30
rs 10
c 0
b 0
f 0
wmc 5

4 Methods

Rating   Name   Duplication   Size   Complexity  
A isCurrentScreen() 0 3 2
A getMenuPageSlug() 0 8 1
A __construct() 0 3 1
A getRelativePathDir() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GraphQLAPI\GraphQLAPI\ConditionalOnEnvironment\Admin\Services\MenuPages;
6
7
use GraphQLAPI\GraphQLAPI\ConditionalOnEnvironment\Admin\Services\Helpers\MenuPageHelper;
8
use PoP\ComponentModel\Facades\Instances\InstanceManagerFacade;
9
10
/**
11
 * Release notes menu page
12
 */
13
class ReleaseNotesAboutMenuPage extends AbstractDocAboutMenuPage
14
{
15
    protected MenuPageHelper $menuPageHelper;
16
17
    function __construct(MenuPageHelper $menuPageHelper)
18
    {
19
        $this->menuPageHelper = $menuPageHelper;
20
    }
21
22
    public function getMenuPageSlug(): string
23
    {
24
        $instanceManager = InstanceManagerFacade::getInstance();
25
        /**
26
         * @var AboutMenuPage
27
         */
28
        $modulesMenuPage = $instanceManager->getInstance(AboutMenuPage::class);
29
        return $modulesMenuPage->getMenuPageSlug();
30
    }
31
32
    /**
33
     * Validate the param also
34
     */
35
    protected function isCurrentScreen(): bool
36
    {
37
        return $this->menuPageHelper->isDocumentationScreen() && parent::isCurrentScreen();
38
    }
39
40
    protected function getRelativePathDir(): string
41
    {
42
        return 'release-notes';
43
    }
44
}
45