NotificationEvent   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 42
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
eloc 8
dl 0
loc 42
rs 10
c 0
b 0
f 0
ccs 9
cts 9
cp 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the core-bundle package.
5
 *
6
 * (c) 2018 WEBEWEB
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace WBW\Bundle\CoreBundle\Event;
13
14
use WBW\Library\Symfony\Assets\NotificationInterface;
15
use WBW\Library\Symfony\Assets\NotificationTrait;
16
17
/**
18
 * Notification event.
19
 *
20
 * @author webeweb <https://github.com/webeweb>
21
 * @package WBW\Bundle\CoreBundle\Event
22
 */
23
class NotificationEvent extends AbstractEvent {
24
25
    use NotificationTrait;
26
27
    /**
28
     * Event "danger".
29
     *
30
     * @var string
31
     */
32
    const DANGER = "wbw.core.event.notification.danger";
33
34
    /**
35
     * Event "info".
36
     *
37 50
     * @var string
38 50
     */
39 50
    const INFO = "wbw.core.event.notification.info";
40 50
41
    /**
42
     * Event "success".
43
     *
44
     * @var string
45
     */
46
    const SUCCESS = "wbw.core.event.notification.success";
47 30
48 30
    /**
49
     * Event "warning".
50
     *
51
     * @var string
52
     */
53
    const WARNING = "wbw.core.event.notification.warning";
54
55
    /**
56
     * Constructor.
57 50
     *
58 50
     * @param string $eventName The event name.
59 50
     * @param NotificationInterface $notification The notification.
60
     */
61
    public function __construct(string $eventName, NotificationInterface $notification) {
62
        parent::__construct($eventName);
63
64
        $this->setNotification($notification);
65
    }
66
}
67