NotificationSentEvent::getNotification()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace IrishDan\NotificationBundle\Event;
4
5
use IrishDan\NotificationBundle\Notification\NotifiableInterface;
6
use IrishDan\NotificationBundle\Notification\NotificationInterface;
7
use Symfony\Component\EventDispatcher\Event;
8
9
/**
10
 * Class NotificationSent
11
 *
12
 * @package NotificationBundle\Events
13
 */
14
class NotificationSentEvent extends Event
15
{
16
    const NAME = 'notification.sent';
17
    /** @var NotifiableInterface */
18
    public $notifiable;
19
    /** @var NotificationInterface */
20
    public $notification;
21
    /** @var boolean */
22
    public $response;
23
24
    /**
25
     * NotificationSent constructor.
26
     *
27
     * @param NotificationInterface $notification
28
     * @param null                  $response
29
     */
30
    public function __construct(NotificationInterface $notification, $response = null)
31
    {
32
        $this->response = $response;
33
        $this->notification = $notification;
34
    }
35
36
    public function getNotifiable()
37
    {
38
        return $this->notifiable;
39
    }
40
41
    public function getNotification()
42
    {
43
        return $this->notification;
44
    }
45
46
    public function getResponse()
47
    {
48
        return $this->response;
49
    }
50
}
51