Passed
Push — typo3-v13 ( ba73f3...83a476 )
by Torben
02:10
created

ModifyRegistrationPriceEvent::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 0
nc 1
nop 4
dl 0
loc 6
rs 10
c 1
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\Event;
15
use DERHANSEN\SfEventMgt\Domain\Model\Registration;
16
use Psr\Http\Message\ServerRequestInterface;
17
18
/**
19
 * This event should be used to modify the price set to new registrations
20
 */
21
final class ModifyRegistrationPriceEvent
22
{
23
    public function __construct(
24
        private float $price,
25
        private readonly Event $event,
26
        private readonly Registration $registration,
27
        private readonly ServerRequestInterface $request
28
    ) {
29
    }
30
31
    public function getPrice(): float
32
    {
33
        return $this->price;
34
    }
35
36
    public function setPrice(float $price): void
37
    {
38
        $this->price = $price;
39
    }
40
41
    public function getEvent(): Event
42
    {
43
        return $this->event;
44
    }
45
46
    public function getRegistration(): Registration
47
    {
48
        return $this->registration;
49
    }
50
51
    public function getRequest(): ServerRequestInterface
52
    {
53
        return $this->request;
54
    }
55
}
56