SerieToken   A
last analyzed

Complexity

Total Complexity 11

Size/Duplication

Total Lines 89
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 11
lcom 0
cbo 0
dl 0
loc 89
ccs 30
cts 30
cp 1
rs 10
c 0
b 0
f 0

11 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getSerie() 0 4 1
A setSerie() 0 4 1
A getToken() 0 4 1
A setToken() 0 4 1
A getUserId() 0 4 1
A setUserId() 0 4 1
A getExpiresAt() 0 4 1
A setExpiresAt() 0 4 1
A getValidUntil() 0 4 1
A setValidUntil() 0 4 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 15
    public function __construct($userId = null, $serie = null, $token = null)
38
    {
39 15
        $this->setUserId($userId);
40 15
        $this->setSerie($serie);
41 15
        $this->setToken($token);
42 15
    }
43
44 13
    public function getSerie()
45
    {
46 13
        return $this->serie;
47
    }
48
49 15
    public function setSerie($serie)
50
    {
51 15
        $this->serie = $serie;
52 15
    }
53
54 8
    public function getToken()
55
    {
56 8
        return $this->token;
57
    }
58
59 15
    public function setToken($token)
60
    {
61 15
        $this->token = $token;
62 15
    }
63
64 14
    public function getUserId()
65
    {
66 14
        return $this->userId;
67
    }
68
69 15
    public function setUserId($userId)
70
    {
71 15
        $this->userId = $userId;
72 15
    }
73
74 6
    public function getExpiresAt()
75
    {
76 6
        return $this->expiresAt;
77
    }
78
79 13
    public function setExpiresAt($expiresAt)
80
    {
81 13
        $this->expiresAt = $expiresAt;
82 13
    }
83
84 7
    public function getValidUntil()
85
    {
86 7
        return $this->validUntil;
87
    }
88
89 3
    public function setValidUntil($validUntil)
90
    {
91 3
        $this->validUntil = $validUntil;
92 3
    }
93
}
94