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.

Code Duplication    Length = 10-10 lines in 5 locations

src/Resource/Async/Build.php 1 location

@@ 21-30 (lines=10) @@
18
    /**
19
     * @return ObservableInterface
20
     */
21
    public function jobs(): ObservableInterface
22
    {
23
        return Promise::toObservable(
24
            $this->handleCommand(new SimpleRequestCommand('builds/' . $this->id()))
25
        )->flatMap(function ($response) {
26
            return Observable::fromArray($response->getBody()->getJson()['jobs']);
27
        })->flatMap(function ($job) {
28
            return Promise::toObservable($this->handleCommand(new HydrateCommand('Job', $job)));
29
        });
30
    }
31
32
    /**
33
     * @param int $id

src/Resource/Async/Job.php 1 location

@@ 46-55 (lines=10) @@
43
    /**
44
     * @return ObservableInterface
45
     */
46
    public function annotations(): ObservableInterface
47
    {
48
        return Promise::toObservable(
49
            $this->handleCommand(new SimpleRequestCommand('jobs/' . $this->id() . '/annotations'))
50
        )->flatMap(function ($response) {
51
            return Observable::fromArray($response['annotations']);
52
        })->flatMap(function ($annotation) {
53
            return Promise::toObservable($this->handleCommand(new HydrateCommand('Annotation', $annotation)));
54
        });
55
    }
56
57
    /**
58
     * @return PromiseInterface

src/Resource/Async/Repository.php 3 locations

@@ 32-41 (lines=10) @@
29
30
class Repository extends BaseRepository
31
{
32
    public function builds(): Observable
33
    {
34
        return Promise::toObservable(
35
            $this->handleCommand(new SimpleRequestCommand('repos/' . $this->slug() . '/builds'))
36
        )->flatMap(function (ResponseInterface $response) {
37
            return Observable::fromArray($response->getBody()->getJson()['builds']);
38
        })->flatMap(function (array $build) {
39
            return Promise::toObservable($this->handleCommand(new HydrateCommand('Build', $build)));
40
        });
41
    }
42
43
    public function jobs(int $buildId): Observable
44
    {
@@ 68-77 (lines=10) @@
65
    /**
66
     * @return ObservableInterface
67
     */
68
    public function commits(): ObservableInterface
69
    {
70
        return Promise::toObservable(
71
            $this->handleCommand(new SimpleRequestCommand('repos/' . $this->slug() . '/builds'))
72
        )->flatMap(function (ResponseInterface $response) {
73
            return Observable::fromArray($response->getBody()->getJson()['commits']);
74
        })->flatMap(function (array $commit) {
75
            return Promise::toObservable($this->handleCommand(new HydrateCommand('Commit', $commit)));
76
        });
77
    }
78
79
    public function events(): Observable
80
    {
@@ 188-197 (lines=10) @@
185
    /**
186
     * @return ObservableInterface
187
     */
188
    public function branches(): ObservableInterface
189
    {
190
        return Promise::toObservable(
191
            $this->handleCommand(new SimpleRequestCommand('repos/' . $this->slug() . '/branches'))
192
        )->flatMap(function (ResponseInterface $response) {
193
            return Observable::fromArray($response->getBody()->getJson()['branches']);
194
        })->flatMap(function (array $branch) {
195
            return Promise::toObservable($this->handleCommand(new HydrateCommand('Branch', $branch)));
196
        });
197
    }
198
199
    /**
200
     * @return ObservableInterface