SendMailEvent   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 58
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 58
ccs 12
cts 12
cp 1
rs 10
c 0
b 0
f 0

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 2
    public function __construct(string $recipient, string $subject, string $body)
36
    {
37 2
        parent::__construct(self::TYPE);
38
39 2
        $this->recipient = $recipient;
40 2
        $this->subject   = $subject;
41 2
        $this->body      = $body;
42 2
    }
43
44
    /**
45
     * @return string
46
     */
47 2
    public function getRecipient() : string
48
    {
49 2
        return $this->recipient;
50
    }
51
52
    /**
53
     * @return string
54
     */
55 2
    public function getSubject() : string
56
    {
57 2
        return $this->subject;
58
    }
59
60
    /**
61
     * @return string
62
     */
63 2
    public function getBody() : string
64
    {
65 2
        return $this->body;
66
    }
67
}
68