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   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 40
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 9 2
A getApiKey() 0 4 1
A getUri() 0 4 1
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