getCustomNotification()   A
last analyzed

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
c 0
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\Dto\CustomNotification;
15
use DERHANSEN\SfEventMgt\Domain\Model\Registration;
16
use DERHANSEN\SfEventMgt\Service\NotificationService;
17
use Psr\Http\Message\ServerRequestInterface;
18
19
/**
20
 * This event should be used to modify the attachments of a user message. Use the $type variable to distinguish
21
 * between the different types of messages
22
 */
23
final class ModifyUserMessageAttachmentsEvent
24
{
25
    public function __construct(
26
        private array $attachments,
27
        private readonly Registration $registration,
28
        private readonly int $type,
29
        private readonly array $settings,
30
        private readonly ?CustomNotification $customNotification,
31
        private readonly NotificationService $notificationService,
32
        private readonly ServerRequestInterface $request
33
    ) {
34
    }
35
36
    public function getAttachments(): array
37
    {
38
        return $this->attachments;
39
    }
40
41
    public function getRegistration(): Registration
42
    {
43
        return $this->registration;
44
    }
45
46
    public function getType(): int
47
    {
48
        return $this->type;
49
    }
50
51
    public function getSettings(): array
52
    {
53
        return $this->settings;
54
    }
55
56
    public function getCustomNotification(): ?CustomNotification
57
    {
58
        return $this->customNotification;
59
    }
60
61
    public function getNotificationService(): NotificationService
62
    {
63
        return $this->notificationService;
64
    }
65
66
    public function setAttachments(array $attachments): void
67
    {
68
        $this->attachments = $attachments;
69
    }
70
71
    public function getRequest(): ServerRequestInterface
72
    {
73
        return $this->request;
74
    }
75
}
76