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 ( 892269...174360 )
by
unknown
02:34
created

Vindi::getApiTimeOut()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 2.0625

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 3
cts 4
cp 0.75
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 4
nc 2
nop 0
crap 2.0625
1
<?php
2
3
namespace Vindi;
4
5
class Vindi
6
{
7
8
    /**
9
     * This Package SDK Version.
10
     *
11
     * @var string
12
     */
13
    public static $sdkVersion = '1.0.10';
14
15
    /**
16
     * The Environment variable name for API URI.
17
     *
18
     * @var string
19
     */
20
    public static $apiUriEnvVar = 'VINDI_API_URI';
21
22
    /**
23
     * The Environment variable name for API Key.
24
     *
25
     * @var string
26
     */
27
    public static $apiKeyEnvVar = 'VINDI_API_KEY';
28
29
    /**
30
     * The Environment variable name for API Time Out.
31
     *
32
     * @var string
33
     */
34
    public static $apiTimeOutEnvVar = 'VINDI_API_TIME_OUT';
35
36
    /**
37
     * Get Vindi API URI from environment.
38
     *
39
     * @return string
40
     */
41 428
    public static function getApiUri()
42
    {
43 428
        if (empty(getenv(static::$apiUriEnvVar))) {
44 428
            return 'https://app.vindi.com.br/api/v1/';
45
        }
46
        return getenv(static::$apiUriEnvVar);
47
    }
48
49
    /**
50
     * Get Vindi API Key from environment.
51
     *
52
     * @return string
53
     */
54 430
    public static function getApiKey()
55
    {
56 430
        return getenv(static::$apiKeyEnvVar);
57
    }
58
59
    /**
60
     * Get Vindi API Time Out from environment.
61
     *
62
     * @return string
63
     */
64 428
    public static function getApiTimeOut()
65
    {
66 428
        if (empty(getenv(static::$apiTimeOutEnvVar))) {
67 428
            return 60;
68
        }
69
        return getenv(static::$apiTimeOutEnvVar);
70
    }
71
72
    /**
73
     * Get CA Bundle Path.
74
     *
75
     * @return string
76
     */
77 430
    public static function getCertPath()
78
    {
79 430
        return realpath(sprintf('%s/%s', dirname(__FILE__), '/../data/ssl/ca-bundle.crt'));
80
    }
81
}
82