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
13:28
created

Organization::repository()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 6
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 6
loc 6
ccs 0
cts 3
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
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\RefreshCommand;
6
use ApiClients\Client\Github\CommandBus\Command\User\OrganizationsCommand;
7
use ApiClients\Client\Github\CommandBus\Command\User\RepositoriesCommand;
8
use ApiClients\Client\Github\CommandBus\Command\User\RepositoryCommand;
9
use ApiClients\Client\Github\Resource\Organization as BaseOrganization;
10
use React\Promise\PromiseInterface;
11
use Rx\ObservableInterface;
12
use function ApiClients\Tools\Rx\unwrapObservableFromPromise;
13
14 View Code Duplication
class Organization extends BaseOrganization
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
15
{
16
    public function refresh(): PromiseInterface
17
    {
18
        return $this->handleCommand(
19
            new RefreshCommand($this)
20
        );
21
    }
22
23
    public function repository(string $repository): PromiseInterface
24
    {
25
        return $this->handleCommand(
26
            new RepositoryCommand($this->login(), $repository)
27
        );
28
    }
29
30
    public function repositories(): ObservableInterface
31
    {
32
        return unwrapObservableFromPromise($this->handleCommand(
33
            new RepositoriesCommand($this->login())
34
        ));
35
    }
36
37
    public function organizations(): ObservableInterface
38
    {
39
        return unwrapObservableFromPromise($this->handleCommand(
40
            new OrganizationsCommand($this->login())
41
        ));
42
    }
43
}
44