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 = 27-38 lines in 4 locations

src/Provider/Http/UserAgentStringCom.php 1 location

@@ 207-240 (lines=34) @@
204
        }
205
    }
206
207
    public function parse($userAgent, array $headers = [])
208
    {
209
        $resultRaw = $this->getResult($userAgent, $headers);
210
211
        /*
212
         * No result found?
213
         */
214
        if ($this->hasResult($resultRaw) !== true) {
215
            throw new Exception\NoResultFoundException('No result found for user agent: ' . $userAgent);
216
        }
217
218
        /*
219
         * Hydrate the model
220
         */
221
        $result = new Model\UserAgent();
222
        $result->setProviderResultRaw($resultRaw);
223
224
        /*
225
         * Bot detection
226
         */
227
        if ($this->isBot($resultRaw) === true) {
228
            $this->hydrateBot($result->getBot(), $resultRaw);
229
230
            return $result;
231
        }
232
233
        /*
234
         * hydrate the result
235
         */
236
        $this->hydrateBrowser($result->getBrowser(), $resultRaw);
237
        $this->hydrateOperatingSystem($result->getOperatingSystem(), $resultRaw);
238
239
        return $result;
240
    }
241
}
242

src/Provider/Http/NeutrinoApiCom.php 1 location

@@ 266-300 (lines=35) @@
263
        }
264
    }
265
266
    public function parse($userAgent, array $headers = [])
267
    {
268
        $resultRaw = $this->getResult($userAgent, $headers);
269
270
        /*
271
         * No result found?
272
         */
273
        if ($this->hasResult($resultRaw) !== true) {
274
            throw new Exception\NoResultFoundException('No result found for user agent: ' . $userAgent);
275
        }
276
277
        /*
278
         * Hydrate the model
279
         */
280
        $result = new Model\UserAgent();
281
        $result->setProviderResultRaw($resultRaw);
282
283
        /*
284
         * Bot detection
285
         */
286
        if ($this->isBot($resultRaw) === true) {
287
            $this->hydrateBot($result->getBot(), $resultRaw);
288
289
            return $result;
290
        }
291
292
        /*
293
         * hydrate the result
294
         */
295
        $this->hydrateBrowser($result->getBrowser(), $resultRaw);
296
        $this->hydrateOperatingSystem($result->getOperatingSystem(), $resultRaw);
297
        $this->hydrateDevice($result->getDevice(), $resultRaw);
298
299
        return $result;
300
    }
301
}
302

src/Provider/Http/WhatIsMyBrowserCom.php 1 location

@@ 274-300 (lines=27) @@
271
        }
272
    }
273
274
    public function parse($userAgent, array $headers = [])
275
    {
276
        $resultRaw = $this->getResult($userAgent, $headers);
277
278
        /*
279
         * No result found?
280
         */
281
        if ($this->hasResult($resultRaw) !== true) {
282
            throw new Exception\NoResultFoundException('No result found for user agent: ' . $userAgent);
283
        }
284
285
        /*
286
         * Hydrate the model
287
         */
288
        $result = new Model\UserAgent();
289
        $result->setProviderResultRaw($resultRaw);
290
291
        /*
292
         * hydrate the result
293
         */
294
        $this->hydrateBrowser($result->getBrowser(), $resultRaw);
295
        $this->hydrateRenderingEngine($result->getRenderingEngine(), $resultRaw);
296
        $this->hydrateOperatingSystem($result->getOperatingSystem(), $resultRaw);
297
        $this->hydrateDevice($result->getDevice(), $resultRaw);
298
299
        return $result;
300
    }
301
}
302

src/Provider/Woothee.php 1 location

@@ 181-218 (lines=38) @@
178
        }
179
    }
180
181
    public function parse($userAgent, array $headers = [])
182
    {
183
        $parser = $this->getParser();
184
185
        $resultRaw = $parser->parse($userAgent);
186
187
        /*
188
         * No result found?
189
         */
190
        if ($this->hasResult($resultRaw) !== true) {
191
            throw new NoResultFoundException('No result found for user agent: ' . $userAgent);
192
        }
193
194
        /*
195
         * Hydrate the model
196
         */
197
        $result = new Model\UserAgent();
198
        $result->setProviderResultRaw($resultRaw);
199
200
        /*
201
         * Bot detection
202
         */
203
        if ($this->isBot($resultRaw) === true) {
204
            $this->hydrateBot($result->getBot(), $resultRaw);
205
206
            return $result;
207
        }
208
209
        /*
210
         * hydrate the result
211
         */
212
        $this->hydrateBrowser($result->getBrowser(), $resultRaw);
213
        // renderingEngine not available
214
        // operatingSystem filled OS is mixed! Examples: iPod, iPhone, Android...
215
        $this->hydrateDevice($result->getDevice(), $resultRaw);
216
217
        return $result;
218
    }
219
}
220