AuthorizationCode   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 32
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getGrantType() 0 3 1
A getValue() 0 3 1
A getType() 0 3 1
1
<?php
2
3
namespace tbclla\Revolut\Auth;
4
5
use tbclla\Revolut\Interfaces\GrantsAccessTokens;
6
7
class AuthorizationCode implements GrantsAccessTokens
8
{
9
    /**
10
     * The token value
11
     * 
12
     * @var string
13
     */
14
    public $value;
15
16
    /**
17
     * Create a new authorization code instance
18
     * 
19
     * @param string $value The authorization code supplied by Revolut
20
     */
21
    public function __construct(string $value)
22
    {
23
        $this->value = $value;
24
    }
25
26
    public function getValue()
27
    {
28
        return $this->value;
29
    }
30
31
    public static function getType()
32
    {
33
        return 'code';
34
    }
35
36
    public static function getGrantType()
37
    {
38
        return 'authorization_code';
39
    }
40
}
41