SuperJobResourceOwner::getEMail()   A
last analyzed

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\{
6
    Provider\ResourceOwnerInterface,
7
    Tool\ArrayAccessorTrait
8
};
9
10
class SuperJobResourceOwner implements ResourceOwnerInterface
11
{
12
    use ArrayAccessorTrait;
13
14 1
    public function __construct(array $response = [])
15
    {
16 1
        $this->response = $response;
17 1
    }
18
19
    /**
20
     * @return string
21
     */
22 1
    public function getPhoneNumber()
23
    {
24 1
        return $this->getValueByKey($this->response, 'phone_number');
25
    }
26
27
    /**
28
     * @return string
29
     */
30 1
    public function getId()
31
    {
32 1
        return $this->getValueByKey($this->response, 'id');
33
    }
34
35
    /**
36
     * @return string
37
     */
38 1
    public function getEMail()
39
    {
40 1
        return $this->getValueByKey($this->response, 'email');
41
    }
42
43
    /**
44
     * @return string
45
     */
46 1
    public function getName()
47
    {
48 1
        return $this->getValueByKey($this->response, 'name');
49
    }
50
51
    /**
52
     * @return array
53
     */
54 1
    public function toArray()
55
    {
56 1
        return $this->response;
57
    }
58
59
    /**
60
     * @var array
61
     */
62
    protected $response = [];
63
}
64