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.

AbstractConnection::getUri()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
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
     * @param string $uri
33
     */
34
    public function __construct(string $apikey, string $uri = null)
35
    {
36
        if (null === $uri) {
37
            $uri = static::DEFAULT_WS_ENDPOINT;
38
        }
39
40
        $this->apiKey = $apikey;
41
        $this->uri    = $uri;
42
    }
43
44
    final protected function getApiKey(): string
45
    {
46
        return $this->apiKey;
47
    }
48
49
    final protected function getUri(): string
50
    {
51
        return $this->uri;
52
    }
53
}
54