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 ( 5b18e5...d5a27a )
by Leonardo
12:09
created

CacheConfigurationManager   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
c 0
b 0
f 0
dl 0
loc 21
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A getNamespace() 0 12 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace GraphQLAPI\GraphQLAPI\ConditionalOnEnvironment\ConfigurationCache\Overrides;
6
7
use GraphQLAPI\GraphQLAPI\Facades\UserSettingsManagerFacade;
8
use PoP\ComponentModel\Cache\CacheConfigurationManagerInterface;
9
10
/**
11
 * Inject configuration to the cache
12
 *
13
 * @author Leonardo Losoviz <[email protected]>
14
 */
15
class CacheConfigurationManager implements CacheConfigurationManagerInterface
16
{
17
    /**
18
     * Save into the DB, and inject to the FilesystemAdapter:
19
     * A string used as the subdirectory of the root cache directory, where cache
20
     * items will be stored
21
     *
22
     * @see https://symfony.com/doc/current/components/cache/adapters/filesystem_adapter.html
23
     */
24
    public function getNamespace(): string
25
    {
26
        // (Needed for development) Don't share cache among plugin versions
27
        $timestamp = '_v' . \GRAPHQL_API_VERSION;
28
        // The timestamp from when last saving settings/modules to the DB
29
        $userSettingsManager = UserSettingsManagerFacade::getInstance();
30
        $timestamp .= '_' . $userSettingsManager->getTimestamp();
31
        // admin/non-admin screens have different services enabled
32
        if (\is_admin()) {
33
            $timestamp .= '_admin';
34
        }
35
        return $timestamp;
36
    }
37
}
38