AbstractPayment   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 11
c 1
b 0
f 0
dl 0
loc 46
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A isCancelLinkEnabled() 0 3 1
A isNotifyLinkEnabled() 0 3 1
A isFailureLinkEnabled() 0 3 1
A isSuccessLinkEnabled() 0 3 1
A isRedirectEnabled() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Extension "sf_event_mgt" for TYPO3 CMS.
7
 *
8
 * For the full copyright and license information, please read the
9
 * LICENSE.txt file that was distributed with this source code.
10
 */
11
12
namespace DERHANSEN\SfEventMgt\Payment;
13
14
abstract class AbstractPayment
15
{
16
    protected bool $enableRedirect = false;
17
    protected bool $enableSuccessLink = false;
18
    protected bool $enableFailureLink = false;
19
    protected bool $enableCancelLink = false;
20
    protected bool $enableNotifyLink = false;
21
22
    /**
23
     * Returns, if redirect is enabled for the payment method
24
     */
25
    public function isRedirectEnabled(): bool
26
    {
27
        return $this->enableRedirect;
28
    }
29
30
    /**
31
     * Returns, if the success link is enabled for the payment method
32
     */
33
    public function isSuccessLinkEnabled(): bool
34
    {
35
        return $this->enableSuccessLink;
36
    }
37
38
    /**
39
     * Returns, if the failure link is enabled for the payment method
40
     */
41
    public function isFailureLinkEnabled(): bool
42
    {
43
        return $this->enableFailureLink;
44
    }
45
46
    /**
47
     * Returns, if the cancel link is enabled for the payment method
48
     */
49
    public function isCancelLinkEnabled(): bool
50
    {
51
        return $this->enableCancelLink;
52
    }
53
54
    /**
55
     * Returns, if the notify link is enabled for the payment method
56
     */
57
    public function isNotifyLinkEnabled(): bool
58
    {
59
        return $this->enableNotifyLink;
60
    }
61
}
62