Passed
Push — 6.x ( 261295...2c00aa )
by Torben
02:47
created

ProceedWithPaymentActionEvent   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 10
c 2
b 0
f 0
dl 0
loc 30
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getRegistration() 0 3 1
A getActionName() 0 3 1
A getPerformPaidCheck() 0 3 1
A setPerformPaidCheck() 0 3 1
A __construct() 0 4 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\Domain\Model\Registration;
15
16
/**
17
 * This event is triggered in PaymentController::proceedWithAction() and allows to skip the "$registration->getPaid()"
18
 * check for various actions.
19
 */
20
final class ProceedWithPaymentActionEvent
21
{
22
    private bool $performPaidCheck = true;
23
    private Registration $registration;
24
    private string $actionName;
25
26
    public function __construct(Registration $registration, string $actionName)
27
    {
28
        $this->registration = $registration;
29
        $this->actionName = $actionName;
30
    }
31
32
    public function getRegistration(): Registration
33
    {
34
        return $this->registration;
35
    }
36
37
    public function getActionName(): string
38
    {
39
        return $this->actionName;
40
    }
41
42
    public function getPerformPaidCheck(): bool
43
    {
44
        return $this->performPaidCheck;
45
    }
46
47
    public function setPerformPaidCheck(bool $performPaidCheck): void
48
    {
49
        $this->performPaidCheck = $performPaidCheck;
50
    }
51
}
52