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 settings(): PromiseInterface
49
    {
@@ 104-113 (lines=10) @@
101
        );
102
    }
103
104
    public function branches(): ObservableInterface
105
    {
106
        return Promise::toObservable(
107
            $this->getTransport()->request('repos/' . $this->slug() . '/branches')
108
        )->flatMap(function ($response) {
109
            return Observable::fromArray($response['branches']);
110
        })->map(function ($branch) {
111
            return $this->getTransport()->getHydrator()->hydrate('Branch', $branch);
112
        });
113
    }
114
115
    public function vars(): ObservableInterface
116
    {
@@ 115-124 (lines=10) @@
112
        });
113
    }
114
115
    public function vars(): ObservableInterface
116
    {
117
        return Promise::toObservable(
118
            $this->getTransport()->request('/settings/env_vars?repository_id=' . $this->id())
119
        )->flatMap(function ($response) {
120
            return Observable::fromArray($response['env_vars']);
121
        })->map(function ($var) {
122
            return $this->getTransport()->getHydrator()->hydrate('EnvironmentVariable', $var);
123
        });
124
    }
125
126
    public function caches(): ObservableInterface
127
    {
@@ 126-135 (lines=10) @@
123
        });
124
    }
125
126
    public function caches(): ObservableInterface
127
    {
128
        return Promise::toObservable(
129
            $this->getTransport()->request('repos/' . $this->slug() . '/caches')
130
        )->flatMap(function ($response) {
131
            return Observable::fromArray($response['caches']);
132
        })->map(function ($cache) {
133
            return $this->getTransport()->getHydrator()->hydrate('Cache', $cache);
134
        });
135
    }
136
137
    public function key(): PromiseInterface
138
    {

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