Passed
Push — 7.x ( 46400b...fb51d4 )
by Torben
03:19
created

ProceedWithPaymentActionEvent   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 28
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
24
    public function __construct(
25
        private readonly Registration $registration,
26
        private readonly string $actionName
27
    ) {
28
    }
29
30
    public function getRegistration(): Registration
31
    {
32
        return $this->registration;
33
    }
34
35
    public function getActionName(): string
36
    {
37
        return $this->actionName;
38
    }
39
40
    public function getPerformPaidCheck(): bool
41
    {
42
        return $this->performPaidCheck;
43
    }
44
45
    public function setPerformPaidCheck(bool $performPaidCheck): void
46
    {
47
        $this->performPaidCheck = $performPaidCheck;
48
    }
49
}
50