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 ( 0e9d4f...7250ad )
by Cees-Jan
12s
created

Repository   A

Complexity

Total Complexity 12

Size/Duplication

Total Lines 88
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 13

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 12
lcom 1
cbo 13
dl 0
loc 88
ccs 0
cts 37
cp 0
rs 10
c 0
b 0
f 0

12 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
A subscribe() 0 6 1
A unSubscribe() 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\SubscribeCommand;
15
use ApiClients\Client\Github\CommandBus\Command\Repository\TagsCommand;
16
use ApiClients\Client\Github\CommandBus\Command\Repository\UnSubscribeCommand;
17
use ApiClients\Client\Github\Resource\Repository as BaseRepository;
18
use React\Promise\PromiseInterface;
19
use Rx\Observable;
20
use Rx\ObservableInterface;
21
use function ApiClients\Tools\Rx\unwrapObservableFromPromise;
22
23
class Repository extends BaseRepository
24
{
25
    public function refresh(): PromiseInterface
26
    {
27
        return $this->handleCommand(
28
            new RefreshCommand($this)
29
        );
30
    }
31
32
    public function branches(): ObservableInterface
33
    {
34
        return unwrapObservableFromPromise($this->handleCommand(
35
            new BranchesCommand($this->fullName())
36
        ));
37
    }
38
39
    public function commits(): ObservableInterface
40
    {
41
        return unwrapObservableFromPromise($this->handleCommand(
42
            new CommitsCommand($this->fullName())
43
        ));
44
    }
45
46
    public function labels(): ObservableInterface
47
    {
48
        return unwrapObservableFromPromise($this->handleCommand(
49
            new LabelsCommand($this->fullName())
50
        ));
51
    }
52
53
    public function addLabel(string $name, string $colour): PromiseInterface
54
    {
55
        return $this->handleCommand(
56
            new AddLabelCommand($this->fullName(), $name, $colour)
57
        );
58
    }
59
60
    public function contents(string $path = '/'): Observable
61
    {
62
        return unwrapObservableFromPromise(
63
            $this->handleCommand(
64
                new ContentsCommand($this->fullName(), $path)
65
            )
66
        );
67
    }
68
69
    public function communityHealth(): PromiseInterface
70
    {
71
        return $this->handleCommand(
72
            new CommunityHealthCommand($this->fullName())
73
        );
74
    }
75
76
    public function tags(): ObservableInterface
77
    {
78
        return unwrapObservableFromPromise($this->handleCommand(
79
            new TagsCommand($this->fullName())
80
        ));
81
    }
82
83
    public function releases(): ObservableInterface
84
    {
85
        return unwrapObservableFromPromise($this->handleCommand(
86
            new ReleasesCommand($this->fullName())
87
        ));
88
    }
89
90
    public function languages(): PromiseInterface
91
    {
92
        return $this->handleCommand(
93
            new LanguagesCommand($this->fullName())
94
        );
95
    }
96
97
    public function subscribe(bool $subscribed = true, bool $ignored = false): PromiseInterface
98
    {
99
        return $this->handleCommand(
100
            new SubscribeCommand($this->fullName(), $subscribed, $ignored)
101
        );
102
    }
103
104
    public function unSubscribe(): PromiseInterface
105
    {
106
        return $this->handleCommand(
107
            new UnSubscribeCommand($this->fullName())
108
        );
109
    }
110
}
111