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 ( ea923b...434eca )
by Christian
03:15
created

AbstractConnection::getApiKey()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * (c) Christian Gripp <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Core23\SetlistFm\Connection;
13
14
abstract class AbstractConnection implements ConnectionInterface
15
{
16
    /**
17
     * Default Endpoint.
18
     */
19
    public const DEFAULT_WS_ENDPOINT = 'https://api.setlist.fm/rest/1.0/';
20
21
    /**
22
     * @var string
23
     */
24
    private $apiKey;
25
26
    /**
27
     * @var string
28
     */
29
    private $uri;
30
31
    /**
32
     * AbstractConnection constructor.
33
     *
34
     * @param string $apikey
35
     * @param string $uri
36
     */
37
    public function __construct(string $apikey, string $uri = null)
38
    {
39
        if (null === $uri) {
40
            $uri = static::DEFAULT_WS_ENDPOINT;
41
        }
42
43
        $this->apiKey = $apikey;
44
        $this->uri    = $uri;
45
    }
46
47
    /**
48
     * @return string
49
     */
50
    protected function getApiKey(): string
51
    {
52
        return $this->apiKey;
53
    }
54
55
    /**
56
     * @return string
57
     */
58
    protected function getUri(): string
59
    {
60
        return $this->uri;
61
    }
62
}
63