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 ( b38aca...ed3c2e )
by Leonardo
06:08 queued 57s
created

AboutMenuPage::enqueueAssets()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 5
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 InvalidArgumentException;
8
use GraphQLAPI\GraphQLAPI\ContentProcessors\ContentParserOptions;
9
use GraphQLAPI\GraphQLAPI\Facades\ContentProcessors\MarkdownContentParserFacade;
10
11
/**
12
 * About menu page
13
 */
14
class AboutMenuPage extends AbstractDocsMenuPage
15
{
16
    use OpenInModalTriggerMenuPageTrait;
17
18
    public function getMenuPageSlug(): string
19
    {
20
        return 'about';
21
    }
22
23
    protected function useTabpanelForContent(): bool
24
    {
25
        return true;
26
    }
27
28
    protected function getContentToPrint(): string
29
    {
30
        $markdownContentParser = MarkdownContentParserFacade::getInstance();
31
        try {
32
            return $markdownContentParser->getContent('about.md', '', [ContentParserOptions::TAB_CONTENT => true]);
33
        } catch (InvalidArgumentException $e) {
34
            return sprintf(
35
                '<p>%s</p>',
36
                \__('Oops, there was a problem loading the page', 'graphql-api')
37
            );
38
        }
39
    }
40
41
    /**
42
     * Enqueue the required assets
43
     */
44
    protected function enqueueAssets(): void
45
    {
46
        parent::enqueueAssets();
47
48
        $this->enqueueModalTriggerAssets();
49
    }
50
}
51