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 ( c3352e...e935d9 )
by Andreas
04:05
created

Config   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 37
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getApiToken() 0 3 1
A getApiUrl() 0 3 1
A isApiEnabled() 0 3 1
A getConnectionId() 0 3 1
1
<?php
2
declare(strict_types=1);
3
/**
4
 */
5
namespace CommerceLeague\ActiveCampaign\Helper;
6
7
use Magento\Framework\App\Helper\AbstractHelper;
8
9
/**
10
 * Class Config
11
 */
12
class Config extends AbstractHelper
13
{
14
    private const XML_PATH_API_ENABLED = 'activecampaign/api/enabled';
15
    private const XML_PATH_API_URL = 'activecampaign/api/url';
16
    private const XML_PATH_API_TOKEN = 'activecampaign/api/token';
17
    private const XML_PATH_CONNECTION_ID = 'activecampaign/api/connection_id';
18
19
    /**
20
     * @return bool
21
     */
22
    public function isApiEnabled(): bool
23
    {
24
        return (bool)$this->scopeConfig->isSetFlag(self::XML_PATH_API_ENABLED);
25
    }
26
27
    /**
28
     * @return string|null
29
     */
30
    public function getApiUrl(): ?string
31
    {
32
        return $this->scopeConfig->getValue(self::XML_PATH_API_URL);
33
    }
34
35
    /**
36
     * @return string|null
37
     */
38
    public function getApiToken(): ?string
39
    {
40
        return $this->scopeConfig->getValue(self::XML_PATH_API_TOKEN);
41
    }
42
43
    /**
44
     * @return string|null
45
     */
46
    public function getConnectionId(): ?string
47
    {
48
        return $this->scopeConfig->getValue(self::XML_PATH_CONNECTION_ID);
49
    }
50
}
51