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

PersistedQueryGraphiQLBlock   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 17
ccs 0
cts 5
cp 0
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A getAdminGraphQLEndpoint() 0 11 2
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