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 (#19)
by Cees-Jan
02:47
created

Repository   A

Complexity

Total Complexity 10

Size/Duplication

Total Lines 74
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 11

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 10
lcom 1
cbo 11
dl 0
loc 74
ccs 0
cts 31
cp 0
rs 10
c 0
b 0
f 0

10 Methods

Rating   Name   Duplication   Size   Complexity  
A refresh() 0 6 1
A branches() 0 6 1
A commits() 0 6 1
A labels() 0 6 1
A addLabel() 0 6 1
A contents() 0 8 1
A communityHealth() 0 6 1
A tags() 0 6 1
A releases() 0 6 1
A languages() 0 6 1
1
<?php declare(strict_types=1);
2
3
namespace ApiClients\Client\Github\Resource\Async;
4
5
use ApiClients\Client\Github\CommandBus\Command\RefreshCommand;
6
use ApiClients\Client\Github\CommandBus\Command\Repository\AddLabelCommand;
7
use ApiClients\Client\Github\CommandBus\Command\Repository\BranchesCommand;
8
use ApiClients\Client\Github\CommandBus\Command\Repository\CommitsCommand;
9
use ApiClients\Client\Github\CommandBus\Command\Repository\CommunityHealthCommand;
10
use ApiClients\Client\Github\CommandBus\Command\Repository\ContentsCommand;
11
use ApiClients\Client\Github\CommandBus\Command\Repository\LabelsCommand;
12
use ApiClients\Client\Github\CommandBus\Command\Repository\LanguagesCommand;
13
use ApiClients\Client\Github\CommandBus\Command\Repository\ReleasesCommand;
14
use ApiClients\Client\Github\CommandBus\Command\Repository\TagsCommand;
15
use ApiClients\Client\Github\Resource\Repository as BaseRepository;
16
use React\Promise\PromiseInterface;
17
use Rx\Observable;
18
use Rx\ObservableInterface;
19
use function ApiClients\Tools\Rx\unwrapObservableFromPromise;
20
21
class Repository extends BaseRepository
22
{
23
    public function refresh(): PromiseInterface
24
    {
25
        return $this->handleCommand(
26
            new RefreshCommand($this)
27
        );
28
    }
29
30
    public function branches(): ObservableInterface
31
    {
32
        return unwrapObservableFromPromise($this->handleCommand(
33
            new BranchesCommand($this->fullName())
34
        ));
35
    }
36
37
    public function commits(): ObservableInterface
38
    {
39
        return unwrapObservableFromPromise($this->handleCommand(
40
            new CommitsCommand($this->fullName())
41
        ));
42
    }
43
44
    public function labels(): ObservableInterface
45
    {
46
        return unwrapObservableFromPromise($this->handleCommand(
47
            new LabelsCommand($this->fullName())
48
        ));
49
    }
50
51
    public function addLabel(string $name, string $colour): PromiseInterface
52
    {
53
        return $this->handleCommand(
54
            new AddLabelCommand($this->fullName(), $name, $colour)
55
        );
56
    }
57
58
    public function contents(string $path = '/'): Observable
59
    {
60
        return unwrapObservableFromPromise(
61
            $this->handleCommand(
62
                new ContentsCommand($this->fullName(), $path)
63
            )
64
        );
65
    }
66
67
    public function communityHealth(): PromiseInterface
68
    {
69
        return $this->handleCommand(
70
            new CommunityHealthCommand($this->fullName())
71
        );
72
    }
73
74
    public function tags(): ObservableInterface
75
    {
76
        return unwrapObservableFromPromise($this->handleCommand(
77
            new TagsCommand($this->fullName())
78
        ));
79
    }
80
81
    public function releases(): ObservableInterface
82
    {
83
        return unwrapObservableFromPromise($this->handleCommand(
84
            new ReleasesCommand($this->fullName())
85
        ));
86
    }
87
88
    public function languages(): PromiseInterface
89
    {
90
        return $this->handleCommand(
91
            new LanguagesCommand($this->fullName())
92
        );
93
    }
94
}
95