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 7 locations

src/Resource/Async/Build.php 1 location

@@ 15-24 (lines=10) @@
12
13
class Build extends BaseBuild
14
{
15
    public function jobs(): ObservableInterface
16
    {
17
        return Promise::toObservable(
18
            $this->getTransport()->request('builds/' . $this->id())
19
        )->flatMap(function ($response) {
20
            return Observable::fromArray($response['jobs']);
21
        })->map(function ($job) {
22
            return $this->getTransport()->getHydrator()->hydrate('Job', $job);
23
        });
24
    }
25
26
    public function job(int $id): PromiseInterface
27
    {

src/Resource/Async/Repository.php 5 locations

@@ 17-26 (lines=10) @@
14
15
class Repository extends BaseRepository
16
{
17
    public function builds(): ObservableInterface
18
    {
19
        return Promise::toObservable(
20
            $this->getTransport()->request('repos/' . $this->slug() . '/builds')
21
        )->flatMap(function ($response) {
22
            return Observable::fromArray($response['builds']);
23
        })->map(function ($build) {
24
            return $this->getTransport()->getHydrator()->hydrate('Build', $build);
25
        });
26
    }
27
28
    public function build(int $id): PromiseInterface
29
    {
@@ 37-46 (lines=10) @@
34
        });
35
    }
36
37
    public function commits(): ObservableInterface
38
    {
39
        return Promise::toObservable(
40
            $this->getTransport()->request('repos/' . $this->slug() . '/builds')
41
        )->flatMap(function ($response) {
42
            return Observable::fromArray($response['commits']);
43
        })->map(function ($build) {
44
            return $this->getTransport()->getHydrator()->hydrate('Commit', $build);
45
        });
46
    }
47
48
    public function isActive(): PromiseInterface
49
    {
@@ 95-104 (lines=10) @@
92
        );
93
    }
94
95
    public function branches(): ObservableInterface
96
    {
97
        return Promise::toObservable(
98
            $this->getTransport()->request('repos/' . $this->slug() . '/branches')
99
        )->flatMap(function ($response) {
100
            return Observable::fromArray($response['branches']);
101
        })->map(function ($branch) {
102
            return $this->getTransport()->getHydrator()->hydrate('Branch', $branch);
103
        });
104
    }
105
106
    public function vars(): ObservableInterface
107
    {
@@ 106-115 (lines=10) @@
103
        });
104
    }
105
106
    public function vars(): ObservableInterface
107
    {
108
        return Promise::toObservable(
109
            $this->getTransport()->request('/settings/env_vars?repository_id=' . $this->id())
110
        )->flatMap(function ($response) {
111
            return Observable::fromArray($response['env_vars']);
112
        })->map(function ($var) {
113
            return $this->getTransport()->getHydrator()->hydrate('EnvironmentVariable', $var);
114
        });
115
    }
116
117
    public function caches(): ObservableInterface
118
    {
@@ 117-126 (lines=10) @@
114
        });
115
    }
116
117
    public function caches(): ObservableInterface
118
    {
119
        return Promise::toObservable(
120
            $this->getTransport()->request('repos/' . $this->slug() . '/caches')
121
        )->flatMap(function ($response) {
122
            return Observable::fromArray($response['caches']);
123
        })->map(function ($cache) {
124
            return $this->getTransport()->getHydrator()->hydrate('Cache', $cache);
125
        });
126
    }
127
128
    public function key(): PromiseInterface
129
    {

src/Resource/Async/Job.php 1 location

@@ 13-22 (lines=10) @@
10
11
class Job extends BaseJob
12
{
13
    public function annotations(): ObservableInterface
14
    {
15
        return Promise::toObservable(
16
            $this->getTransport()->request('jobs/' . $this->id() . '/annotations')
17
        )->flatMap(function ($response) {
18
            return Observable::fromArray($response['annotations']);
19
        })->map(function ($annotation) {
20
            return $this->getTransport()->getHydrator()->hydrate('Annotation', $annotation);
21
        });
22
    }
23
}
24