Completed
Push — master ( 689521...8ed57c )
by Matze
09:40
created

SendMailEvent   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A getRecipient() 0 4 1
A getSubject() 0 4 1
A getBody() 0 4 1
1
<?php
2
3
namespace BrainExe\Core\Mail;
4
5
use BrainExe\Core\EventDispatcher\AbstractEvent;
6
7
/**
8
 * @api
9
 */
10
class SendMailEvent extends AbstractEvent
11
{
12
13
    const TYPE = 'email.send';
14
15
    /**
16
     * @var string
17
     */
18
    private $recipient;
19
20
    /**
21
     * @var string
22
     */
23
    private $subject;
24
25
    /**
26
     * @var string
27
     */
28
    private $body;
29
30
    /**
31
     * @param string $recipient
32
     * @param string $subject
33
     * @param string $body
34
     */
35
    public function __construct($recipient, $subject, $body)
36
    {
37
        parent::__construct(self::TYPE);
38
39
        $this->recipient = $recipient;
40
        $this->subject   = $subject;
41
        $this->body      = $body;
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getRecipient()
48
    {
49
        return $this->recipient;
50
    }
51
52
    /**
53
     * @return string
54
     */
55
    public function getSubject()
56
    {
57
        return $this->subject;
58
    }
59
60
    /**
61
     * @return string
62
     */
63
    public function getBody()
64
    {
65
        return $this->body;
66
    }
67
}
68