AccessToken   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 24
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getExpiration() 0 3 1
A getType() 0 3 1
1
<?php
2
3
namespace tbclla\Revolut\Auth;
4
5
use tbclla\Revolut\Auth\Token;
6
use tbclla\Revolut\Interfaces\PersistableToken;
7
8
class AccessToken extends Token implements PersistableToken
9
{
10
    /**
11
     * The name of the token
12
     * 
13
     * @var string
14
     */
15
    const TYPE = 'access_token';
16
17
    /**
18
     * The time to live in minutes
19
     * 
20
     * @var int
21
     */
22
    const TTL = 40;
23
24
    public static function getType()
25
    {
26
        return self::TYPE;
27
    }
28
29
    public static function getExpiration()
30
    {
31
        return now()->addMinutes(self::TTL);
32
    }
33
}
34