SentEmail::setSent()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
c 1
b 0
f 1
nc 1
nop 1
dl 0
loc 5
ccs 0
cts 0
cp 0
crap 2
rs 10
1
<?php
2
3
namespace Azine\EmailBundle\Entity;
4
5
/**
6
 * SentEmail.
7
 */
8
class SentEmail
9
{
10
    /**
11
     * Generate a 23-char unique id.
12
     *
13
     * @return string
14
     */
15 5
    public static function getNewToken()
16
    {
17 5
        return uniqid('', true);
18
    }
19
20
    ///////////////////////////////////////////////////////////////////
21
    // generated stuff only below this line.
22
    // @codeCoverageIgnoreStart
23
    ///////////////////////////////////////////////////////////////////
24
25
    /**
26
     * @var int
27
     */
28
    private $id;
29
30
    /**
31
     * @var array
32
     */
33
    private $recipients;
34
35
    /**
36
     * @var string
37
     */
38
    private $template;
39
40
    /**
41
     * @var array
42
     */
43
    private $variables;
44
45
    /**
46
     * @var \DateTime
47
     */
48
    private $sent;
49
50
    /**
51
     * @var string
52
     */
53
    private $token;
54
55
    /**
56
     * Get id.
57
     *
58
     * @return int
59
     */
60
    public function getId()
61
    {
62
        return $this->id;
63
    }
64
65
    /**
66
     * Set recipients.
67
     *
68
     * @param array $recipients
69
     *
70
     * @return SentEmail
71
     */
72
    public function setRecipients($recipients)
73
    {
74
        $this->recipients = $recipients;
75
76
        return $this;
77
    }
78
79
    /**
80
     * Get recipients.
81
     *
82
     * @return array
83
     */
84
    public function getRecipients()
85
    {
86
        return $this->recipients;
87
    }
88
89
    /**
90
     * Set template.
91
     *
92
     * @param string $template
93
     *
94
     * @return SentEmail
95
     */
96
    public function setTemplate($template)
97
    {
98
        $this->template = $template;
99
100
        return $this;
101
    }
102
103
    /**
104
     * Get template.
105
     *
106
     * @return string
107
     */
108
    public function getTemplate()
109
    {
110
        return $this->template;
111
    }
112
113
    /**
114
     * Set variables.
115
     *
116
     * @param array $variables
117
     *
118
     * @return SentEmail
119
     */
120
    public function setVariables($variables)
121
    {
122
        $this->variables = $variables;
123
124
        return $this;
125
    }
126
127
    /**
128
     * Get variables.
129
     *
130
     * @return array
131
     */
132
    public function getVariables()
133
    {
134
        return $this->variables;
135
    }
136
137
    /**
138
     * Set sent.
139
     *
140
     * @param \DateTime $sent
141
     *
142
     * @return SentEmail
143
     */
144
    public function setSent($sent)
145
    {
146
        $this->sent = $sent;
147
148
        return $this;
149
    }
150
151
    /**
152
     * Get sent.
153
     *
154
     * @return \DateTime
155
     */
156
    public function getSent()
157
    {
158
        return $this->sent;
159
    }
160
161
    /**
162
     * Set token.
163
     *
164
     * @param string $token
165
     *
166
     * @return SentEmail
167
     */
168
    public function setToken($token)
169
    {
170
        $this->token = $token;
171
172
        return $this;
173
    }
174
175
    /**
176
     * Get token.
177
     *
178
     * @return string
179
     */
180
    public function getToken()
181
    {
182
        return $this->token;
183
    }
184
}
185