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.

ApiCredentials::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 3
crap 1
1
<?php
2
3
namespace Speicher210\Monsum\Api;
4
5
/**
6
 * Store the API credentials for Monsum API.
7
 *
8
 * @see Look for the account hash under hosted pages in Monsum dashboard settings.
9
 */
10
class ApiCredentials
11
{
12
    /**
13
     * The email for authentication to Monsum API.
14
     *
15
     * @var string
16
     */
17
    protected $email;
18
19
    /**
20
     * The API key for authentication to Monsum API.
21
     *
22
     * @var string
23
     */
24
    protected $apiKey;
25
26
    /**
27
     * The Monsum account hash.
28
     *
29
     * @var string
30
     */
31
    protected $accountHash;
32
33
    /**
34
     * Constructor.
35
     *
36
     * @param string $email The email for authentication to Monsum API.
37
     * @param string $apiKey The email for authentication to Monsum API.
38
     * @param string $accountHash The Monsum account hash.
39
     */
40 126
    public function __construct($email, $apiKey, $accountHash = null)
41
    {
42 126
        $this->email = $email;
43 126
        $this->apiKey = $apiKey;
44 126
        $this->accountHash = $accountHash;
45 126
    }
46
47
    /**
48
     * Get the email for authentication to Monsum API.
49
     *
50
     * @return string
51
     */
52
    public function getEmail()
53
    {
54
        return $this->email;
55
    }
56
57
    /**
58
     * Get the API key for authentication to Monsum API.
59
     *
60
     * @return string
61
     */
62
    public function getApiKey()
63
    {
64
        return $this->apiKey;
65
    }
66
67
    /**
68
     * Get the account hash.
69
     *
70
     * @return null|string
71
     */
72 9
    public function getAccountHash()
73
    {
74 9
        return $this->accountHash;
75
    }
76
}
77