Completed
Push — master ( 033351...57b9be )
by
unknown
9s
created

Token::getVideoManagerId()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace MovingImage\Client\VMPro\Entity;
4
5
class Token
6
{
7
    /**
8
     * @var string
9
     */
10
    private $tokenString;
11
12
    /**
13
     * @var array
14
     */
15
    private $tokenData;
16
17
    /**
18
     * Token constructor.
19
     *
20
     * @param string $tokenString
21
     * @param array  $tokenData
22
     */
23
    public function __construct($tokenString, array $tokenData)
24
    {
25
        $this->tokenString = $tokenString;
26
        $this->tokenData = $tokenData;
27
    }
28
29
    /**
30
     * @return string
31
     */
32
    public function getTokenString()
33
    {
34
        return $this->tokenString;
35
    }
36
37
    /**
38
     * @return array
39
     */
40
    public function getTokenData()
41
    {
42
        return $this->tokenData;
43
    }
44
45
    /**
46
     * @return bool
47
     */
48
    public function expired()
49
    {
50
        return $this->getTokenData()['exp'] < time();
51
    }
52
}
53