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

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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