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
Pull Request — master (#26)
by
unknown
14:23
created

Vindi   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
lcom 2
cbo 0
dl 0
loc 42
ccs 4
cts 4
cp 1
rs 10
c 1
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getApiKey() 0 4 1
A getApiBase() 0 4 1
A getCertPath() 0 4 1
1
<?php
2
3
namespace Vindi;
4
5
class Vindi
6
{
7
    /**
8
     * This Package SDK Version.
9
     * @var string
10
     */
11
    public static $sdkVersion = '1.0.10';
12
13
    /**
14
     * The base URL for the Vindi API.
15
     * @var string
16
     */
17
    public static $apiBase = 'https://sandbox-app.vindi.com.br/api/v1/';
18
19
    /**
20
     * The Environment variable name for API Key.
21
     * @var string
22
     */
23
    public static $apiKeyEnvVar = 'VINDI_API_KEY';
24
    public static $baseApiEnvVar = 'VINDI_API_BASE';
25
26
    /**
27
     * Get Vindi API Key from environment.
28
     * @return string
29 430
     */
30
    public function getApiKey()
31 430
    {
32
        return getenv(static::$apiKeyEnvVar);
33
    }
34
    public static function getApiBase()
35
    {
36
        return getenv(static::$baseApiEnvVar);
37
    }
38 430
    /**
39
     * Get CA Bundle Path.
40 430
     * @return string
41
     */
42
    public function getCertPath()
43
    {
44
        return realpath(sprintf('%s/%s', dirname(__FILE__), '/../data/ssl/ca-bundle.crt'));
45
    }
46
}
47