ParticipantTrait::getTargetMail()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace ProjetNormandie\EmailBundle\Entity\Part;
4
5
use Doctrine\ORM\Mapping as ORM;
6
7
/**
8
 * Trait that is representing a sender and a recipient.
9
 */
10
trait ParticipantTrait
11
{
12
    /**
13
     * @ORM\Column(name="emailFrom", type="string", length=255, nullable=false)
14
     */
15
    private string $from;
16
17
    /**
18
     * @ORM\Column(name="emailTo", type="string", length=255, nullable=false)
19
     */
20
    private string $to;
21
22
    /**
23
     * Get the recipient mail.
24
     * @return string
25
     */
26
    public function getTargetMail(): string
27
    {
28
        return $this->to;
29
    }
30
31
    /**
32
     * Set the recipient mail.
33
     * @param string $targetMail
34
     * @return $this
35
     */
36
    public function setTargetMail(string $targetMail): self
37
    {
38
        $this->to = $targetMail;
39
        return $this;
40
    }
41
42
    /**
43
     * Get the sender mail.
44
     * @return string
45
     */
46
    public function getFrom(): string
47
    {
48
        return $this->from;
49
    }
50
51
    /**
52
     * Set the sender mail.
53
     * @param mixed $from
54
     * @return $this
55
     */
56
    public function setFrom($from): self
57
    {
58
        $this->from = $from;
59
        return $this;
60
    }
61
}
62