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

src/Resource/Async/Repository.php 5 locations

@@ 147-156 (lines=10) @@
144
    /**
145
     * @return ObservableInterface
146
     */
147
    public function vars(): ObservableInterface
148
    {
149
        return Promise::toObservable(
150
            $this->getTransport()->request('/settings/env_vars?repository_id=' . $this->id())
151
        )->flatMap(function ($response) {
152
            return Observable::fromArray($response['env_vars']);
153
        })->map(function ($var) {
154
            return $this->getTransport()->getHydrator()->hydrate('EnvironmentVariable', $var);
155
        });
156
    }
157
158
    /**
159
     * @return ObservableInterface
@@ 20-29 (lines=10) @@
17
    /**
18
     * @return ObservableInterface
19
     */
20
    public function builds(): ObservableInterface
21
    {
22
        return Promise::toObservable(
23
            $this->getTransport()->request('repos/' . $this->slug() . '/builds')
24
        )->flatMap(function ($response) {
25
            return Observable::fromArray($response['builds']);
26
        })->map(function ($build) {
27
            return $this->getTransport()->getHydrator()->hydrate('Build', $build);
28
        });
29
    }
30
31
    /**
32
     * @param int $id
@@ 47-56 (lines=10) @@
44
    /**
45
     * @return ObservableInterface
46
     */
47
    public function commits(): ObservableInterface
48
    {
49
        return Promise::toObservable(
50
            $this->getTransport()->request('repos/' . $this->slug() . '/builds')
51
        )->flatMap(function ($response) {
52
            return Observable::fromArray($response['commits']);
53
        })->map(function ($build) {
54
            return $this->getTransport()->getHydrator()->hydrate('Commit', $build);
55
        });
56
    }
57
58
    /**
59
     * @return PromiseInterface
@@ 133-142 (lines=10) @@
130
    /**
131
     * @return ObservableInterface
132
     */
133
    public function branches(): ObservableInterface
134
    {
135
        return Promise::toObservable(
136
            $this->getTransport()->request('repos/' . $this->slug() . '/branches')
137
        )->flatMap(function ($response) {
138
            return Observable::fromArray($response['branches']);
139
        })->map(function ($branch) {
140
            return $this->getTransport()->getHydrator()->hydrate('Branch', $branch);
141
        });
142
    }
143
144
    /**
145
     * @return ObservableInterface
@@ 161-170 (lines=10) @@
158
    /**
159
     * @return ObservableInterface
160
     */
161
    public function caches(): ObservableInterface
162
    {
163
        return Promise::toObservable(
164
            $this->getTransport()->request('repos/' . $this->slug() . '/caches')
165
        )->flatMap(function ($response) {
166
            return Observable::fromArray($response['caches']);
167
        })->map(function ($cache) {
168
            return $this->getTransport()->getHydrator()->hydrate('Cache', $cache);
169
        });
170
    }
171
172
    /**
173
     * @return PromiseInterface

src/Resource/Async/Job.php 1 location

@@ 18-27 (lines=10) @@
15
    /**
16
     * @return ObservableInterface
17
     */
18
    public function annotations(): ObservableInterface
19
    {
20
        return Promise::toObservable(
21
            $this->getTransport()->request('jobs/' . $this->id() . '/annotations')
22
        )->flatMap(function ($response) {
23
            return Observable::fromArray($response['annotations']);
24
        })->map(function ($annotation) {
25
            return $this->getTransport()->getHydrator()->hydrate('Annotation', $annotation);
26
        });
27
    }
28
29
    /**
30
     * @return PromiseInterface