MailMotorUnsubscribedEvent::getEmail()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 2
b 0
f 1
1
<?php
2
3
namespace MailMotor\Bundle\MailMotorBundle\Event;
4
5
use Symfony\Contracts\EventDispatcher\Event;
6
7
/**
8
 * This class is in fact an immutable event class holding all the data
9
 * that could be needed by event subscribers on the MailMotorUnsubscribedEvent
10
 *
11
 * @author Jeroen Desloovere <[email protected]>
12
 */
13
class MailMotorUnsubscribedEvent extends Event
14
{
15
    const EVENT_NAME = 'mail_motor_event.unsubscribed';
16
17
    /** @var string */
18
    protected $email;
19
20
    /** @var string */
21
    protected $listId;
22
23
    /** @var array */
24
    protected $mergeFields;
25
26
    public function __construct(
27
        string $email,
28
        string $listId = null,
29
        array $mergeFields = array()
30
    ) {
31
        $this->email = $email;
32
        $this->listId = $listId;
33
        $this->mergeFields = $mergeFields;
34
    }
35
36
    public function getEmail(): string
37
    {
38
        return $this->email;
39
    }
40
41
    public function getListId(): string
42
    {
43
        return $this->listId;
44
    }
45
46
    public function getMergeFields(): array
47
    {
48
        return $this->mergeFields;
49
    }
50
}
51