Completed
Push — ezp-30616 ( 3c2fb4...b64679 )
by
unknown
30:04 queued 14:26
created

CreateNotificationEvent   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 32
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 1

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getNotification() 0 4 1
A getCreateStruct() 0 4 1
1
<?php
2
3
/**
4
 * @copyright Copyright (C) eZ Systems AS. All rights reserved.
5
 * @license For full copyright and license information view LICENSE file distributed with this source code.
6
 */
7
declare(strict_types=1);
8
9
namespace eZ\Publish\Core\Event\Notification;
10
11
use eZ\Publish\API\Repository\Values\Notification\CreateStruct;
12
use eZ\Publish\API\Repository\Values\Notification\Notification;
13
use eZ\Publish\Core\Event\AfterEvent;
14
15
final class CreateNotificationEvent extends AfterEvent
16
{
17
    public const NAME = 'ezplatform.event.notification.create';
18
19
    /**
20
     * @var \eZ\Publish\API\Repository\Values\Notification\Notification
21
     */
22
    private $notification;
23
24
    /**
25
     * @var \eZ\Publish\API\Repository\Values\Notification\CreateStruct
26
     */
27
    private $createStruct;
28
29
    public function __construct(
30
        Notification $notification,
31
        CreateStruct $createStruct
32
    ) {
33
        $this->notification = $notification;
34
        $this->createStruct = $createStruct;
35
    }
36
37
    public function getNotification(): Notification
38
    {
39
        return $this->notification;
40
    }
41
42
    public function getCreateStruct(): CreateStruct
43
    {
44
        return $this->createStruct;
45
    }
46
}
47