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.

Config::getUrl()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 2.0625

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 3
cts 4
cp 0.75
rs 10
c 0
b 0
f 0
cc 2
nc 2
nop 0
crap 2.0625
1
<?php
2
3
namespace NickEscobedo\MicroBilt;
4
5
6
class Config
7
{
8
9
    const PRODUCTION_URL = 'https://api.microbilt.com';
10
11
    const SANDBOX_URL = 'https://apitest.microbilt.com';
12
13
    protected static $defaultOptions = [
14
        'productionApiUrl' => self::PRODUCTION_URL,
15
        'sandboxApiUrl' => self::SANDBOX_URL,
16
17
        'mode' => 'prod',
18
    ];
19
20
    protected static $settings = [];
21
22 146
    public static function setOptions(array $options = [])
23
    {
24 146
        static::$settings = array_merge(static::$defaultOptions, $options);
25
26 146
        return static::$settings;
27
    }
28
29 144
    public static function get(string $key)
30
    {
31 144
        return static::$settings[$key];
32
    }
33
34 142
    public static function getUrl(): string
35
    {
36 142
        if (self::get('mode') === 'prod') {
37 142
            return self::PRODUCTION_URL;
38
        }
39
40
        return self::SANDBOX_URL;
41
    }
42
43
}
44