ProcessPaymentFailureEvent   A
last analyzed

Complexity

Total Complexity 11

Size/Duplication

Total Lines 61
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 11
dl 0
loc 61
rs 10
c 0
b 0
f 0
wmc 11

11 Methods

Rating   Name   Duplication   Size   Complexity  
A getPaymentController() 0 3 1
A getVariables() 0 3 1
A getRegistration() 0 3 1
A getRemoveRegistration() 0 3 1
A __construct() 0 9 1
A getUpdateRegistration() 0 3 1
A getGetVariables() 0 3 1
A getPaymentMethod() 0 3 1
A setRemoveRegistration() 0 3 1
A setVariables() 0 3 1
A setUpdateRegistration() 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\Event;
13
14
use DERHANSEN\SfEventMgt\Controller\PaymentController;
15
use DERHANSEN\SfEventMgt\Domain\Model\Registration;
16
17
/**
18
 * This event is triggered before the payment failure view is rendered. This event must be used to handle the
19
 * registration (e.g. update/delete) in case of the payment process failed.
20
 */
21
final class ProcessPaymentFailureEvent
22
{
23
    public function __construct(
24
        private array $variables,
25
        private readonly string $paymentMethod,
26
        private bool $updateRegistration,
27
        private bool $removeRegistration,
28
        private readonly Registration $registration,
29
        private readonly array $getVariables,
30
        private readonly PaymentController $paymentController
31
    ) {
32
    }
33
34
    public function getVariables(): array
35
    {
36
        return $this->variables;
37
    }
38
39
    public function getPaymentMethod(): string
40
    {
41
        return $this->paymentMethod;
42
    }
43
44
    public function getUpdateRegistration(): bool
45
    {
46
        return $this->updateRegistration;
47
    }
48
49
    public function getRemoveRegistration(): bool
50
    {
51
        return $this->removeRegistration;
52
    }
53
54
    public function getRegistration(): Registration
55
    {
56
        return $this->registration;
57
    }
58
59
    public function getGetVariables(): array
60
    {
61
        return $this->getVariables;
62
    }
63
64
    public function getPaymentController(): PaymentController
65
    {
66
        return $this->paymentController;
67
    }
68
69
    public function setVariables(array $variables): void
70
    {
71
        $this->variables = $variables;
72
    }
73
74
    public function setUpdateRegistration(bool $updateRegistration): void
75
    {
76
        $this->updateRegistration = $updateRegistration;
77
    }
78
79
    public function setRemoveRegistration(bool $removeRegistration): void
80
    {
81
        $this->removeRegistration = $removeRegistration;
82
    }
83
}
84