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

ModifyCheckRegistrationSuccessEvent   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
dl 0
loc 29
rs 10
c 1
b 0
f 0
wmc 6

6 Methods

Rating   Name   Duplication   Size   Complexity  
A getSuccess() 0 3 1
A setResult() 0 3 1
A getResult() 0 3 1
A getRegistration() 0 3 1
A setSuccess() 0 3 1
A __construct() 0 2 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 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