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 ( 490a5c...0322d9 )
by Leonardo
03:15
created

ApplicationStateHooks::addComponent()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 4
ccs 0
cts 4
cp 0
crap 2
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GraphQLAPI\GraphQLAPI\Hooks;
6
7
use PoP\Engine\Hooks\AbstractHookSet;
8
use PoP\ComponentModel\ModelInstance\ModelInstance;
9
10
class ApplicationStateHooks extends AbstractHookSet
11
{
12
    protected function init()
13
    {
14
        $this->hooksAPI->addFilter(
15
            ModelInstance::HOOK_COMPONENTSFROMVARS_RESULT,
16
            [$this, 'addComponent']
17
        );
18
    }
19
    /**
20
     * Admin and non-admin have different schemas
21
     */
22
    public function addComponent(array $components): array
23
    {
24
        $components[] = $this->translationAPI->__('is admin:', 'graphql-api') . \is_admin();
25
        return $components;
26
    }
27
}
28