Completed
Push — master ( 2afc29...29656f )
by Philip
06:07
created

AccessToken::getToken()   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
c 0
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Dontdrinkandroot\RestBundle\Entity;
4
5
use Symfony\Component\Security\Core\User\UserInterface;
6
7
/**
8
 * @author Philip Washington Sorst <[email protected]>
9
 */
10
abstract class AccessToken
11
{
12
    /**
13
     * @var int
14
     */
15
    private $id;
16
17
    /**
18
     * @var string
19
     */
20
    private $token;
21
22
    /**
23
     * @var \DateTime|null
24
     */
25
    private $expiry;
26
27
    /**
28
     * @return int
29
     */
30
    public function getId(): int
31
    {
32
        return $this->id;
33
    }
34
35
    /**
36
     * @return string
37
     */
38 50
    public function getToken()
39
    {
40 50
        return $this->token;
41
    }
42
43
    /**
44
     * @param string $token
45
     */
46 96
    public function setToken($token)
47
    {
48 96
        $this->token = $token;
49 96
    }
50
51
    /**
52
     * @return \DateTime|null
53
     */
54 50
    public function getExpiry()
55
    {
56 50
        return $this->expiry;
57
    }
58
59
    /**
60
     * @param \DateTime|null $expiry
61
     */
62 2
    public function setExpiry($expiry)
63
    {
64 2
        $this->expiry = $expiry;
65 2
    }
66
67
    /**
68
     * @return UserInterface
69
     */
70
    abstract public function getUser();
71
72
    /**
73
     * @param $user UserInterface
74
     */
75
    abstract public function setUser($user);
76
}
77