MessageTrait::getSubject()   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 all that represent a message (subject, bodies ...).
9
 */
10
trait MessageTrait
11
{
12
    /**
13
     * @ORM\Column(name="subject", type="string", length=255, nullable=false)
14
     */
15
    private string $subject;
16
17
    /**
18
     * @ORM\Column(name="bodyText", type="text", nullable=true)
19
     */
20
    private string $bodyText;
21
22
    /**
23
     * @ORM\Column(name="bodyHtml", type="text", nullable=false)
24
     */
25
    private string $bodyHtml;
26
27
    /**
28
     * Get the subject of the message.
29
     * @return string
30
     */
31
    public function getSubject(): string
32
    {
33
        return $this->subject;
34
    }
35
36
    /**
37
     * Set the subject of the message.
38
     * @param string $subject
39
     * @return $this
40
     */
41
    public function setSubject(string $subject): self
42
    {
43
        $this->subject = $subject;
44
        return $this;
45
    }
46
47
    /**
48
     * Get the body of the message, in text format.
49
     * @return string
50
     */
51
    public function getBodyText(): string
52
    {
53
        return $this->bodyText;
54
    }
55
56
    /**
57
     * Set the body of the message, in text format.
58
     * @param string $bodyText
59
     * @return $this
60
     */
61
    public function setBodyText(string $bodyText): self
62
    {
63
        $this->bodyText = $bodyText;
64
        return $this;
65
    }
66
67
    /**
68
     * Get the body of the message, in HTML format.
69
     * @return string
70
     */
71
    public function getBodyHtml(): string
72
    {
73
        return $this->bodyHtml;
74
    }
75
76
    /**
77
     * Set the body of the message, in HTML format.
78
     * @param string $bodyHtml
79
     * @return $this
80
     */
81
    public function setBodyHtml(string $bodyHtml): self
82
    {
83
        $this->bodyHtml = $bodyHtml;
84
        return $this;
85
    }
86
}
87