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.
Completed
Push — master ( d245d8...82e8c7 )
by Leonardo
10:28
created

getAdminGraphQLEndpoint()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 7
c 1
b 0
f 0
nc 2
nop 0
dl 0
loc 11
ccs 0
cts 5
cp 0
crap 6
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GraphQLAPI\GraphQLAPI\Blocks;
6
7
use GraphQLAPI\GraphQLAPI\General\EditorHelpers;
8
use GraphQLAPI\GraphQLAPI\General\RequestParams;
9
10
/**
11
 * GraphiQL block for Persisted Queries
12
 */
13
class PersistedQueryGraphiQLBlock extends AbstractGraphiQLBlock
14
{
15
    /**
16
     * If we are editing a Persisted Query, pass its ID to the endpoint,
17
     * so it can set-up the Schema Configuration for the schema
18
     */
19
    protected function getAdminGraphQLEndpoint(): string
20
    {
21
        $endpoint = parent::getAdminGraphQLEndpoint();
22
        if ($persistedQueryID = EditorHelpers::getEditingPostID()) {
23
            $endpoint = \add_query_arg(
24
                RequestParams::PERSISTED_QUERY_ID,
25
                $persistedQueryID,
26
                $endpoint
27
            );
28
        }
29
        return $endpoint;
30
    }
31
}
32