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.
Completed
Push — master ( 16fae1...23f9f4 )
by Arne
02:47
created

AhoiResourceOwner   A

Complexity

Total Complexity 12

Size/Duplication

Total Lines 79
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 13.33%

Importance

Changes 0
Metric Value
wmc 12
lcom 1
cbo 0
dl 0
loc 79
ccs 2
cts 15
cp 0.1333
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getEmail() 0 4 2
A getFirstname() 0 4 2
A getImageurl() 0 4 2
A getLastname() 0 4 2
A getId() 0 4 2
A toArray() 0 4 1
1
<?php namespace FVJM\OAuth2\Client\Provider;
2
3
use League\OAuth2\Client\Provider\ResourceOwnerInterface;
4
5
class AhoiResourceOwner implements ResourceOwnerInterface
6
{
7
    /**
8
     * Raw response
9
     *
10
     * @var array
11
     */
12
    protected $response;
13
14
    /**
15
     * Creates new resource owner.
16
     *
17
     * @param array  $response
18
     */
19 3
    public function __construct(array $response = array())
20
    {
21 3
        $this->response = $response["message"];
22
    }
23
24
    /**
25
     * Get user email
26
     *
27
     * @return string|null
28
     */
29
    public function getEmail()
30
    {
31
        return $this->response['email'] ?: null;
32
    }
33
34
    /**
35
     * Get user firstname
36
     *
37
     * @return string|null
38
     */
39
    public function getFirstname()
40
    {
41
        return $this->response['firstname'] ?: null;
42
    }
43
44
    /**
45
     * Get user imageurl
46
     *
47
     * @return string|null
48
     */
49
    public function getImageurl()
50
    {
51
        return $this->response['picture'] ?: null;
52
    }
53
54
    /**
55
     * Get user lastname
56
     *
57
     * @return string|null
58
     */
59
    public function getLastname()
60
    {
61
        return $this->response['lastname'] ?: null;
62
    }
63
64
    /**
65
     * Get user userId
66
     *
67
     * @return string|null
68
     */
69
    public function getId()
70
    {
71
        return $this->response['id'] ?: null;
72
    }
73
74
    /**
75
     * Return all of the owner details available as an array.
76
     *
77
     * @return array
78
     */
79
    public function toArray()
80
    {
81
        return $this->response;
82
    }
83
}
84