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.

Organization   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 7

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 6
lcom 1
cbo 7
dl 0
loc 54
ccs 0
cts 23
cp 0
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A refresh() 0 6 1
A repository() 0 6 1
A repositories() 0 6 1
A organizations() 0 6 1
A addWebHook() 0 16 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\Organization\AddWebHookCommand;
6
use ApiClients\Client\Github\CommandBus\Command\RefreshCommand;
7
use ApiClients\Client\Github\CommandBus\Command\User\OrganizationsCommand;
8
use ApiClients\Client\Github\CommandBus\Command\User\RepositoriesCommand;
9
use ApiClients\Client\Github\CommandBus\Command\User\RepositoryCommand;
10
use ApiClients\Client\Github\CommandBus\Command\WebHooksCommand;
11
use ApiClients\Client\Github\Resource\Organization as BaseOrganization;
12
use function ApiClients\Tools\Rx\unwrapObservableFromPromise;
13
use React\Promise\PromiseInterface;
14
use Rx\ObservableInterface;
15
16
class Organization extends BaseOrganization
17
{
18
    public function refresh(): PromiseInterface
19
    {
20
        return $this->handleCommand(
21
            new RefreshCommand($this)
22
        );
23
    }
24
25
    public function repository(string $repository): PromiseInterface
26
    {
27
        return $this->handleCommand(
28
            new RepositoryCommand($this->login(), $repository)
29
        );
30
    }
31
32
    public function repositories(): ObservableInterface
33
    {
34
        return unwrapObservableFromPromise($this->handleCommand(
35
            new RepositoriesCommand($this->login())
36
        ));
37
    }
38
39
    public function organizations(): ObservableInterface
40
    {
41
        return unwrapObservableFromPromise($this->handleCommand(
42
            new OrganizationsCommand($this->login())
43
        ));
44
    }
45
46
    public function addWebHook(
47
        string $name,
48
        array $config,
49
        array $events,
50
        bool $active
51
    ): PromiseInterface {
52
        return $this->handleCommand(
53
            new AddWebHookCommand(
54
                $this->login(),
55
                $name,
56
                $config,
57
                $events,
58
                $active
59
            )
60
        );
61
    }
62
63
    public function webHooks(): ObservableInterface
64
    {
65
        return unwrapObservableFromPromise($this->handleCommand(
66
            new WebHooksCommand($this->login(), 'orgs')
67
        ));
68
    }
69
}
70