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.

Issues (74)

src/Config/Config.php (1 issue)

Severity
1
<?php
2
3
namespace AlibabaCloud\Client\Config;
4
5
use Exception;
6
use clagiordano\weblibs\configmanager\ConfigManager;
7
8
/**
9
 * Class Config
10
 *
11
 * @package   AlibabaCloud\Client\Config
12
 */
13
class Config
14
{
15
16
    /**
17
     * @var ConfigManager|null
18
     */
19
    private static $configManager;
20
21
    /**
22
     * @param string      $configPath
23
     *
24
     * @param string|null $defaultValue
25
     *
26
     * @return mixed
27
     */
28 55
    public static function get($configPath, $defaultValue = null)
29
    {
30 55
        return self::getConfigManager()
31 55
                   ->getValue(
32 55
                       \strtolower($configPath),
33
                       $defaultValue
34 55
                   );
35
    }
36
37
    /**
38
     * @return ConfigManager
39
     */
40 56
    private static function getConfigManager()
41
    {
42 56
        if (!self::$configManager instanceof ConfigManager) {
43 2
            self::$configManager = new ConfigManager(__DIR__ . DIRECTORY_SEPARATOR . 'Data.php');
0 ignored issues
show
Deprecated Code introduced by
The class clagiordano\weblibs\configmanager\ConfigManager has been deprecated: This is a wrapper for the same class with the new name, please use directly ArrayConfigManager instead ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

43
            self::$configManager = /** @scrutinizer ignore-deprecated */ new ConfigManager(__DIR__ . DIRECTORY_SEPARATOR . 'Data.php');
Loading history...
44 2
        }
45
46 56
        return self::$configManager;
47
    }
48
49
    /**
50
     * @param string $configPath
51
     * @param mixed  $newValue
52
     *
53
     * @return ConfigManager
54
     * @throws Exception
55
     */
56 1
    public static function set($configPath, $newValue)
57
    {
58 1
        self::getConfigManager()->setValue(\strtolower($configPath), $newValue);
59
60 1
        return self::getConfigManager()->saveConfigFile();
61
    }
62
}
63