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 ( 5e78ac...c92182 )
by Leonardo
03:26
created

AboutMenuPage::getMenuPageSlug()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
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
    public function getMenuPageSlug(): string
17
    {
18
        return 'about';
19
    }
20
21
    protected function useTabpanelForContent(): bool
22
    {
23
        return true;
24
    }
25
26
    protected function getContentToPrint(): string
27
    {
28
        $markdownContentParser = MarkdownContentParserFacade::getInstance();
29
        try {
30
            return $markdownContentParser->getContent('about.md', '', [ContentParserOptions::TAB_CONTENT => true]);
31
        } catch (InvalidArgumentException $e) {
32
            return sprintf(
33
                '<p>%s</p>',
34
                \__('Oops, there was a problem loading the page', 'graphql-api')
35
            );
36
        }
37
    }
38
}
39