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 (#18)
by Cees-Jan
02:04
created

Repository   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 0
cbo 3
dl 0
loc 20
ccs 0
cts 16
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A builds() 0 9 1
A build() 0 7 1
1
<?php
2
declare(strict_types=1);
3
4
namespace WyriHaximus\Travis\Resource\Sync;
5
6
use Rx\Observable;
7
use Rx\React\Promise;
8
use WyriHaximus\Travis\Resource\Repository as BaseRepository;
9
use function Clue\React\Block\await;
10
use function React\Promise\resolve;
11
12
class Repository extends BaseRepository
13
{
14
    public function builds(): array
15
    {
16
        return await(
17
            Promise::fromObservable(
18
                $this->getTransport()->buildAsyncFromSync('Repository', $this)->builds()->toArray()
19
            ),
20
            $this->getTransport()->getLoop()
21
        );
22
    }
23
24
    public function build(int $id): Build
25
    {
26
        return await(
27
            $this->getTransport()->buildAsyncFromSync('Repository', $this)->build($id),
28
            $this->getTransport()->getLoop()
29
        );
30
    }
31
}
32