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 (#20)
by Cees-Jan
07:08
created

Repository   A

Complexity

Total Complexity 11

Size/Duplication

Total Lines 81
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 12

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 11
lcom 1
cbo 12
dl 0
loc 81
ccs 0
cts 34
cp 0
rs 10
c 0
b 0
f 0

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