Passed
Push — main ( 52a7ec...5410b3 )
by Torben
03:32
created

getRegistration()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
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 registrationService after all `checkRegistrationSuccess` have been processed.
18
 * Event listeners can use this event to modify the `$success` and `$result` variable (e.g. if custom logic
19
 * is implemented)
20
 */
21
final class ModifyCheckRegistrationSuccessEvent
22
{
23
    public function __construct(private bool $success, private int $result, private readonly Registration $registration)
24
    {
25
    }
26
27
    public function getSuccess(): bool
28
    {
29
        return $this->success;
30
    }
31
32
    public function setSuccess(bool $success): void
33
    {
34
        $this->success = $success;
35
    }
36
37
    public function getResult(): int
38
    {
39
        return $this->result;
40
    }
41
42
    public function setResult(int $result): void
43
    {
44
        $this->result = $result;
45
    }
46
47
    public function getRegistration(): Registration
48
    {
49
        return $this->registration;
50
    }
51
}
52