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.

Build   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 4
dl 0
loc 26
ccs 0
cts 7
cp 0
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A jobs() 0 6 1
A job() 0 4 1
A refresh() 0 4 1
1
<?php
2
declare(strict_types=1);
3
4
namespace ApiClients\Client\Travis\Resource\Async;
5
6
use ApiClients\Client\Travis\CommandBus\Command\BuildCommand;
7
use ApiClients\Client\Travis\CommandBus\Command\JobCommand;
8
use ApiClients\Client\Travis\CommandBus\Command\JobsCommand;
9
use ApiClients\Client\Travis\Resource\Build as BaseBuild;
10
use React\Promise\PromiseInterface;
11
use Rx\ObservableInterface;
12
use function ApiClients\Tools\Rx\unwrapObservableFromPromise;
13
14
class Build extends BaseBuild
15
{
16
    /**
17
     * @return ObservableInterface
18
     */
19
    public function jobs(): ObservableInterface
20
    {
21
        return unwrapObservableFromPromise($this->handleCommand(
22
            new JobsCommand($this->id())
23
        ));
24
    }
25
26
    /**
27
     * @param  int              $id
28
     * @return PromiseInterface
29
     */
30
    public function job(int $id): PromiseInterface
31
    {
32
        return $this->handleCommand(new JobCommand($id));
33
    }
34
35
    public function refresh(): PromiseInterface
36
    {
37
        return $this->handleCommand(new BuildCommand($this->id()));
38
    }
39
}
40