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 (#1)
by Cees-Jan
03:29
created

Repository   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 46
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 7

Importance

Changes 0
Metric Value
wmc 6
lcom 1
cbo 7
dl 0
loc 46
rs 10
c 0
b 0
f 0

6 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
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\ContentsCommand;
10
use ApiClients\Client\Github\CommandBus\Command\Repository\LabelsCommand;
11
use ApiClients\Client\Github\Resource\Repository as BaseRepository;
12
use ApiClients\Foundation\Transport\Response;
13
use React\Promise\PromiseInterface;
14
use Rx\Observable;
15
use Rx\ObservableInterface;
16
use function ApiClients\Tools\Rx\unwrapObservableFromPromise;
17
use function React\Promise\resolve;
18
19
class Repository extends BaseRepository
20
{
21
    public function refresh() : PromiseInterface
22
    {
23
        return $this->handleCommand(
24
            new RefreshCommand($this)
25
        );
26
    }
27
28
    public function branches(): ObservableInterface
29
    {
30
        return unwrapObservableFromPromise($this->handleCommand(
31
            new BranchesCommand($this->fullName())
32
        ));
33
    }
34
35
    public function commits(): ObservableInterface
36
    {
37
        return unwrapObservableFromPromise($this->handleCommand(
38
            new CommitsCommand($this->fullName())
39
        ));
40
    }
41
42
    public function labels(): ObservableInterface
43
    {
44
        return unwrapObservableFromPromise($this->handleCommand(
45
            new LabelsCommand($this->fullName())
46
        ));
47
    }
48
49
    public function addLabel(string $name, string $colour): PromiseInterface
50
    {
51
        return $this->handleCommand(
52
            new AddLabelCommand($this->fullName(), $name, $colour)
53
        );
54
    }
55
56
    public function contents(): Observable
57
    {
58
        return unwrapObservableFromPromise(
59
            $this->handleCommand(
60
                new ContentsCommand($this->fullName())
61
            )
62
        );
63
    }
64
}
65