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

AbstractDocsMenuPage::useTabpanelForContent()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
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\ConditionalOnEnvironment\Admin\Services\MenuPages\AbstractMenuPage;
8
9
/**
10
 * Docs menu page
11
 */
12
abstract class AbstractDocsMenuPage extends AbstractMenuPage
13
{
14
    use GraphQLAPIMenuPageTrait;
15
    use OpenInModalMenuPageTrait;
16
    use UseTabpanelMenuPageTrait;
17
18
    public function print(): void
19
    {
20
        ?>
21
        <div
22
            class="<?php echo implode(' ', $this->getDivClasses()) ?>"
23
        >
24
            <?php echo $this->getContentToPrint() ?>
25
        </div>
26
        <?php
27
    }
28
29
    /**
30
     * Classes to add to the output <div>
31
     *
32
     * @return string[]
33
     */
34
    protected function getDivClasses(): array
35
    {
36
        $classes = [];
37
        if ($this->openInModalWindow()) {
38
            $classes[] = 'modal-window-content-wrapper';
39
        }
40
        return $classes;
41
    }
42
43
    abstract protected function getContentToPrint(): string;
44
45
    protected function openInModalWindow(): bool
46
    {
47
        return false;
48
    }
49
50
    protected function useTabpanelForContent(): bool
51
    {
52
        return false;
53
    }
54
55
    /**
56
     * Enqueue the required assets and initialize the localized scripts
57
     *
58
     * @return void
59
     */
60
    protected function enqueueAssets(): void
61
    {
62
        parent::enqueueAssets();
63
64
        /**
65
         * Add styles to open the page in a modal
66
         */
67
        if ($this->openInModalWindow()) {
68
            $this->enqueueModalAssets();
69
        }
70
71
        /**
72
         * Add styles/scripts to use a tabpanel
73
         */
74
        if ($this->useTabpanelForContent()) {
75
            $this->enqueueTabpanelAssets();
76
        }
77
    }
78
}
79