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 = 30-30 lines in 2 locations

src/CommandBus/Handler/BuildsHandler.php 1 location

@@ 12-41 (lines=30) @@
9
use React\Promise\PromiseInterface;
10
use function React\Promise\resolve;
11
12
final class BuildsHandler
13
{
14
    /**
15
     * @var FetchAndHydrateService
16
     */
17
    private $service;
18
19
    /**
20
     * @param FetchAndIterateService $service
21
     */
22
    public function __construct(FetchAndIterateService $service)
23
    {
24
        $this->service = $service;
25
    }
26
27
    /**
28
     * Fetch the given repository and hydrate it.
29
     *
30
     * @param  BuildsCommand    $command
31
     * @return PromiseInterface
32
     */
33
    public function handle(BuildsCommand $command): PromiseInterface
34
    {
35
        return resolve($this->service->iterate(
36
            'repos/' . $command->getRepository() . '/builds',
37
            'builds',
38
            BuildInterface::HYDRATE_CLASS
39
        ));
40
    }
41
}
42

src/CommandBus/Handler/CommitsHandler.php 1 location

@@ 12-41 (lines=30) @@
9
use React\Promise\PromiseInterface;
10
use function React\Promise\resolve;
11
12
final class CommitsHandler
13
{
14
    /**
15
     * @var FetchAndHydrateService
16
     */
17
    private $service;
18
19
    /**
20
     * @param FetchAndIterateService $service
21
     */
22
    public function __construct(FetchAndIterateService $service)
23
    {
24
        $this->service = $service;
25
    }
26
27
    /**
28
     * Fetch the given repository and hydrate it.
29
     *
30
     * @param  CommitsCommand   $command
31
     * @return PromiseInterface
32
     */
33
    public function handle(CommitsCommand $command): PromiseInterface
34
    {
35
        return resolve($this->service->iterate(
36
            'repos/' . $command->getRepository() . '/builds',
37
            'commits',
38
            CommitInterface::HYDRATE_CLASS
39
        ));
40
    }
41
}
42