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
03:24 queued 01:27
created

Repository   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Test Coverage

Coverage 0%

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A builds() 0 13 2
1
<?php
2
declare(strict_types=1);
3
4
namespace WyriHaximus\Travis\Resource\Sync;
5
6
use Rx\Observable;
7
use Rx\ObservableInterface;
8
use Rx\ObserverInterface;
9
use WyriHaximus\Travis\Resource\Sync\Build;
10
use WyriHaximus\Travis\Resource\Repository as BaseRepository;
11
use function Clue\React\Block\await;
12
use function React\Promise\resolve;
13
14
class Repository extends BaseRepository
15
{
16
    public function builds()
17
    {
18
        return await(
19
            $this->getTransport()->request('repos/' . $this->slug() . '/builds')->then(function ($json) {
20
                $builds = [];
21
                foreach ($json['builds'] as $build) {
22
                    $builds[] = $this->getTransport()->hydrate(Build::class, $build);
23
                }
24
                return resolve($builds);
25
            }),
26
            $this->getTransport()->getLoop()
27
        );
28
    }
29
}
30