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
Pull Request — master (#14)
by Cees-Jan
05:33 queued 03:11
created

AcceptHeader   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 30
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getHeader() 0 4 1
1
<?php declare(strict_types=1);
2
3
namespace ApiClients\Client\Github;
4
5
final class AcceptHeader
6
{
7
    const PRESET_DEFAULT = [
8
        self::LICENSE,
9
        self::TOPICS,
10
        self::DEFAULT,
11
    ];
12
13
    const PRESET_COMMUNITY_HEALTH = [
14
        self::COMMUNITY_HEALTH,
15
        self::DEFAULT,
16
    ];
17
18
    // Community Health: https://developer.github.com/v3/repos/community/#community-health
19
    const COMMUNITY_HEALTH = 'application/vnd.github.black-panther-preview+json';
20
21
    // Default header: https://developer.github.com/v3/#current-version
22
    const DEFAULT = 'application/vnd.github.v3+json';
23
24
    // License on repository object: https://developer.github.com/v3/licenses/#licenses
25
    const LICENSE = 'application/vnd.github.drax-preview+json';
26
27
    // Topics on repository object: https://developer.github.com/v3/repos/#repositories
28
    const TOPICS = 'application/vnd.github.mercy-preview+json';
29
30 3
    public static function getHeader(array $chunks): string
31
    {
32 3
        return implode('; ', $chunks);
33
    }
34
}
35