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.

Job::refresh()   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 0
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\AnnotationsCommand;
7
use ApiClients\Client\Travis\CommandBus\Command\JobCommand;
8
use ApiClients\Client\Travis\CommandBus\Command\JobLogCommand;
9
use ApiClients\Client\Travis\Resource\Job as BaseJob;
10
use React\Promise\PromiseInterface;
11
use Rx\Observable;
12
use Rx\ObservableInterface;
13
use function ApiClients\Tools\Rx\unwrapObservableFromPromise;
14
15
class Job extends BaseJob
16
{
17
    public function log(): Observable
18
    {
19
        return unwrapObservableFromPromise(
20
            $this->handleCommand(new JobLogCommand($this->id()))
21
        );
22
    }
23
24
    /**
25
     * @return ObservableInterface
26
     */
27
    public function annotations(): ObservableInterface
28
    {
29
        return unwrapObservableFromPromise($this->handleCommand(
30
            new AnnotationsCommand($this->id())
31
        ));
32
    }
33
34
    /**
35
     * @return PromiseInterface
36
     */
37
    public function refresh(): PromiseInterface
38
    {
39
        return $this->handleCommand(new JobCommand($this->id()));
40
    }
41
}
42