NotificationSentEvent   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 37
c 0
b 0
f 0
wmc 4
lcom 0
cbo 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getNotifiable() 0 4 1
A getNotification() 0 4 1
A getResponse() 0 4 1
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