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 ( c92bdf...416677 )
by Andreas
04:49
created

Config::isAbandonedCartExportEnabled()   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
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
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_GENERAL_ENABLED = 'activecampaign/general/enabled';
15
    private const XML_PATH_GENERAL_API_URL = 'activecampaign/general/api_url';
16
    private const XML_PATH_GENERAL_API_TOKEN = 'activecampaign/general/api_token';
17
    private const XML_PATH_GENERAL_CONNECTION_ID = 'activecampaign/general/connection_id';
18
19
    private const XML_PATH_EXPORT_CONTACT_ENABLED = 'activecampaign/export/contact_enabled';
20
    private const XML_PATH_EXPORT_CUSTOMER_ENABLED = 'activecampaign/export/customer_enabled';
21
    private const XML_PATH_EXPORT_ORDER_ENABLED = 'activecampaign/export/order_enabled';
22
    private const XML_PATH_EXPORT_ABANDONED_CART_ENABLED = 'activecampaign/export/abandoned_cart_enabled';
23
24
    /**
25
     * @return bool
26
     */
27
    public function isEnabled(): bool
28
    {
29
        return (bool)$this->scopeConfig->isSetFlag(self::XML_PATH_GENERAL_ENABLED);
30
    }
31
32
    /**
33
     * @return string|null
34
     */
35
    public function getApiUrl(): ?string
36
    {
37
        return $this->scopeConfig->getValue(self::XML_PATH_GENERAL_API_URL);
38
    }
39
40
    /**
41
     * @return string|null
42
     */
43
    public function getApiToken(): ?string
44
    {
45
        return $this->scopeConfig->getValue(self::XML_PATH_GENERAL_API_TOKEN);
46
    }
47
48
    /**
49
     * @return string|null
50
     */
51
    public function getConnectionId(): ?string
52
    {
53
        return $this->scopeConfig->getValue(self::XML_PATH_GENERAL_CONNECTION_ID);
54
    }
55
56
    /**
57
     * @return bool
58
     */
59
    public function isContactExportEnabled(): bool
60
    {
61
        return (bool)$this->scopeConfig->isSetFlag(self::XML_PATH_EXPORT_CONTACT_ENABLED);
62
    }
63
64
    /**
65
     * @return bool
66
     */
67
    public function isCustomerExportEnabled(): bool
68
    {
69
        return (bool)$this->scopeConfig->isSetFlag(self::XML_PATH_EXPORT_CUSTOMER_ENABLED);
70
    }
71
72
    /**
73
     * @return bool
74
     */
75
    public function isOrderExportEnabled(): bool
76
    {
77
        return (bool)$this->scopeConfig->isSetFlag(self::XML_PATH_EXPORT_ORDER_ENABLED);
78
    }
79
80
    /**
81
     * @return bool
82
     */
83
    public function isAbandonedCartExportEnabled(): bool
84
    {
85
        return (bool)$this->scopeConfig->isSetFlag(self::XML_PATH_EXPORT_ABANDONED_CART_ENABLED);
86
    }
87
}
88