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

ProceedWithPaymentActionEvent::getActionName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
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