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:09
created

Repository::builds()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
dl 0
loc 12
ccs 0
cts 12
cp 0
rs 9.4285
c 2
b 0
f 0
cc 1
eloc 8
nc 1
nop 0
crap 2
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\Async\Repository as AsyncRepository;
9
use WyriHaximus\Travis\Resource\Repository as BaseRepository;
10
use function Clue\React\Block\await;
11
use function React\Promise\resolve;
12
13
class Repository extends BaseRepository
14
{
15
    public function builds()
16
    {
17
        return await(
18
            Promise::fromObservable(
19
                $this->getTransport()->hydrateFQCN(
20
                    AsyncRepository::class,
21
                    $this->getTransport()->extractFQCN(AsyncRepository::class, $this)
22
                )->builds()->toArray()
23
            ),
24
            $this->getTransport()->getLoop()
25
        );
26
    }
27
}
28