Completed
Pull Request — master (#13)
by
unknown
17:25 queued 14:28
created

SerieToken::getValidUntil()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
3
namespace JwPersistentUser\Model;
4
5
class SerieToken implements SerieTokenInterface
6
{
7
    /**
8
     * @var int
9
     */
10
    protected $userId;
11
12
    /**
13
     * @var string
14
     */
15
    protected $serie;
16
17
    /**
18
     * @var string
19
     */
20
    protected $token;
21
22
    /**
23
     * @var \DateTime
24
     */
25
    protected $expiresAt;
26
27
    /**
28
     * @var \DateTime|null
29
     */
30
    protected $validUntil;
31
32
    /**
33
     * @param null|int $userId
34
     * @param null|string $serie
35
     * @param null|string $token
36
     */
37
    public function __construct($userId = null, $serie = null, $token = null)
38
    {
39
        $this->setUserId($userId);
40
        $this->setSerie($serie);
41
        $this->setToken($token);
42 11
    }
43
44 11
    public function getSerie()
45 11
    {
46 11
        return $this->serie;
47 11
    }
48
49 9
    public function setSerie($serie)
50
    {
51 9
        $this->serie = $serie;
52
    }
53
54 11
    public function getToken()
55
    {
56 11
        return $this->token;
57 11
    }
58
59 5
    public function setToken($token)
60
    {
61 5
        $this->token = $token;
62
    }
63
64 11
    public function getUserId()
65
    {
66 11
        return $this->userId;
67 11
    }
68
69 10
    public function setUserId($userId)
70
    {
71 10
        $this->userId = $userId;
72
    }
73
74 11
    public function getExpiresAt()
75
    {
76 11
        return $this->expiresAt;
77 11
    }
78
79 4
    public function setExpiresAt($expiresAt)
80
    {
81 4
        $this->expiresAt = $expiresAt;
82
    }
83
84 9
    public function getValidUntil()
85
    {
86 9
        return $this->validUntil;
87 9
    }
88
89 1
    public function setValidUntil($validUntil)
90
    {
91 1
        $this->validUntil = $validUntil;
92
    }
93
}
94