Completed
Push — master ( 638b83...705810 )
by Alex
01:58
created

HeadHunterResourceOwner::getId()   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
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace AlexMasterov\OAuth2\Client\Provider;
4
5
use League\OAuth2\Client\Provider\ResourceOwnerInterface;
6
7
class HeadHunterResourceOwner implements ResourceOwnerInterface
8
{
9
    /**
10
     * @var array
11
     */
12
    protected $response = [];
13
14
    /**
15
     * @param array $response
16
     */
17 1
    public function __construct(array $response)
18
    {
19 1
        $this->response = $response;
20 1
    }
21
22
    /**
23
     * @return string
24
     */
25 1
    public function getId()
26
    {
27 1
        return $this->response['id'];
28
    }
29
30
    /**
31
     * @return string
32
     */
33 1
    public function getLastName()
34
    {
35 1
        return $this->response['last_name'];
36
    }
37
38
    /**
39
     * @return string
40
     */
41 1
    public function getFirstName()
42
    {
43 1
        return $this->response['first_name'];
44
    }
45
46
    /**
47
     * @return string
48
     */
49 1
    public function getMiddleName()
50
    {
51 1
        return $this->response['middle_name'];
52
    }
53
54
    /**
55
     * @return array
56
     */
57 1
    public function toArray()
58
    {
59 1
        return $this->response;
60
    }
61
}
62