GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

ShopifyResourceOwner::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 namespace Pizdata\OAuth2\Client\Provider;
2
3
use League\OAuth2\Client\Tool\ArrayAccessorTrait;
4
use League\OAuth2\Client\Provider\ResourceOwnerInterface;
5
6
class ShopifyResourceOwner implements ResourceOwnerInterface
7
{
8
    use ArrayAccessorTrait;
9
10
    /**
11
     * Raw response
12
     *
13
     * @var array
14
     */
15
    protected $response;
16
17
    /**
18
     * Creates new resource owner.
19
     *
20
     * @param array  $response
21
     */
22 3
    public function __construct(array $response = array())
23
    {
24 3
        $this->response = $response;
25 3
    }
26
27
    /**
28
     * Get resource owner id
29
     *
30
     * @return string|null
31
     */
32 3
    public function getId()
33
    {
34 3
        return $this->getValueByKey($this->response, 'shop.id');
35
    }
36
37
    /**
38
     * Get resource owner email
39
     *
40
     * @return string|null
41
     */
42 3
    public function getEmail()
43
    {
44 3
        return $this->getValueByKey($this->response, 'shop.email');
45
    }
46
47
    /**
48
     * Get resource owner name
49
     *
50
     * @return string|null
51
     */
52 3
    public function getName()
53
    {
54 3
        return $this->getValueByKey($this->response, 'shop.name');
55
    }
56
57
    /**
58
     * Get resource owner domain
59
     *
60
     * @return string|null
61
     */
62 3
    public function getDomain()
63
    {
64 3
        return $this->getValueByKey($this->response, 'shop.domain');
65
    }
66
67
    /**
68
     * Return all of the owner details available as an array.
69
     *
70
     * @return array
71
     */
72 3
    public function toArray()
73
    {
74 3
        return $this->getValueByKey($this->response, 'shop');
75
    }
76
}
77