Completed
Push — master ( 374db5...638b83 )
by Alex
02:01
created

HeadHunterResourceOwner::getFirstName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 2
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
    public function __construct(array $response)
18
    {
19
        $this->response = $response;
20
    }
21
22
    /**
23
     * @return string
24
     */
25
    public function getId()
26
    {
27
        return $this->response['id'];
28
    }
29
30
    /**
31
     * @return string
32
     */
33
    public function getLastName()
34
    {
35
        return $this->response['last_name'];
36
    }
37
38
    /**
39
     * @return string
40
     */
41
    public function getFirstName()
42
    {
43
        return $this->response['first_name'];
44
    }
45
46
    /**
47
     * @return string
48
     */
49
    public function getMiddleName()
50
    {
51
        return $this->response['middle_name'];
52
    }
53
54
    /**
55
     * @return array
56
     */
57
    public function toArray()
58
    {
59
        return $this->response;
60
    }
61
}
62