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

getPerformPaidCheck()   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
    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