Test Setup Failed
Push — dependabot/composer/squizlabs/... ( de5def )
by
unknown
14:28
created

SerieToken::getIpAddress()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
ccs 2
cts 2
cp 1
cc 1
eloc 2
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
    }
43
44
    public function getSerie()
45
    {
46
        return $this->serie;
47
    }
48
49
    public function setSerie($serie)
50
    {
51
        $this->serie = $serie;
52
    }
53
54
    public function getToken()
55
    {
56
        return $this->token;
57
    }
58
59
    public function setToken($token)
60
    {
61
        $this->token = $token;
62
    }
63
64
    public function getUserId()
65
    {
66
        return $this->userId;
67
    }
68
69
    public function setUserId($userId)
70
    {
71
        $this->userId = $userId;
72
    }
73
74
    public function getExpiresAt()
75
    {
76
        return $this->expiresAt;
77
    }
78
79
    public function setExpiresAt($expiresAt)
80
    {
81
        $this->expiresAt = $expiresAt;
82
    }
83
84
    public function getValidUntil()
85
    {
86
        return $this->validUntil;
87
    }
88
89
    public function setValidUntil($validUntil)
90
    {
91
        $this->validUntil = $validUntil;
92
    }
93
}
94