Passed
Push — master ( f137da...c4f5b9 )
by Petr
03:20
created

AccessToken   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 0
dl 0
loc 29
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getVkontakteTokenHash() 0 4 1
A getUserVkontakteId() 0 4 1
1
<?php
2
3
namespace AppBundle\Service\Vkontakte;
4
5
/**
6
 * @author Vehsamrak
7
 */
8
class AccessToken
9
{
10
11
    /** @var int */
12
    public $userVkontakteId;
13
14
    /** @var string */
15
    public $userEmail;
16
17
    /** @var string */
18
    private $vkontakteTokenHash;
19
20 2
    public function __construct(int $userVkontakteId, string $vkontakteTokenHash, string $userEmail = '')
21
    {
22 2
        $this->userVkontakteId = $userVkontakteId;
23 2
        $this->vkontakteTokenHash = $vkontakteTokenHash;
24 2
        $this->userEmail = $userEmail;
25 2
    }
26
27 2
    public function getVkontakteTokenHash(): string
28
    {
29 2
        return $this->vkontakteTokenHash;
30
    }
31
32 2
    public function getUserVkontakteId(): int
33
    {
34 2
        return $this->userVkontakteId;
35
    }
36
}
37