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::repository()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
ccs 0
cts 3
cp 0
cc 1
nc 1
nop 1
crap 2
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