SuperJobResourceOwner   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 6
lcom 1
cbo 1
dl 0
loc 54
ccs 13
cts 13
cp 1
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getPhoneNumber() 0 4 1
A getId() 0 4 1
A getEMail() 0 4 1
A getName() 0 4 1
A toArray() 0 4 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