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.
Passed
Push — master ( f51f95...468920 )
by Andreas
03:39
created

Config::isEnabled()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
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_ENABLED = 'activecampaign/general/enabled';
15
    private const XML_PATH_API_URL = 'activecampaign/general/api_url';
16
    private const XML_PATH_API_TOKEN = 'activecampaign/general/api_token';
17
    private const XML_PATH_CONNECTION_ID = 'activecampaign/general/connection_id';
18
    private const XML_PATH_ABANDONED_CART_EXPORT_AFTER = 'activecampaign/abandoned_cart/export_after';
19
20
    /**
21
     * @return bool
22
     */
23
    public function isEnabled(): bool
24
    {
25
        return (bool)$this->scopeConfig->isSetFlag(self::XML_PATH_ENABLED);
26
    }
27
28
    /**
29
     * @return string|null
30
     */
31
    public function getApiUrl(): ?string
32
    {
33
        return $this->scopeConfig->getValue(self::XML_PATH_API_URL);
34
    }
35
36
    /**
37
     * @return string|null
38
     */
39
    public function getApiToken(): ?string
40
    {
41
        return $this->scopeConfig->getValue(self::XML_PATH_API_TOKEN);
42
    }
43
44
    /**
45
     * @return string|null
46
     */
47
    public function getConnectionId(): ?string
48
    {
49
        return $this->scopeConfig->getValue(self::XML_PATH_CONNECTION_ID);
50
    }
51
52
    /**
53
     * @return string|null
54
     */
55
    public function getAbandonedCartExportAfter(): ?string
56
    {
57
        return $this->scopeConfig->getValue(self::XML_PATH_ABANDONED_CART_EXPORT_AFTER);
58
    }
59
}
60