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

src/CommandBus/Handler/AnnotationsHandler.php 1 location

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

src/CommandBus/Handler/BranchesHandler.php 1 location

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

src/CommandBus/Handler/CachesHandler.php 1 location

@@ 15-44 (lines=30) @@
12
use function React\Promise\resolve;
13
use function WyriHaximus\React\futureFunctionPromise;
14
15
final class CachesHandler
16
{
17
    /**
18
     * @var FetchAndHydrateService
19
     */
20
    private $service;
21
22
    /**
23
     * @param FetchAndIterateService $service
24
     */
25
    public function __construct(FetchAndIterateService $service)
26
    {
27
        $this->service = $service;
28
    }
29
30
    /**
31
     * Fetch the given repository and hydrate it
32
     *
33
     * @param CachesCommand $command
34
     * @return PromiseInterface
35
     */
36
    public function handle(CachesCommand $command): PromiseInterface
37
    {
38
        return $this->service->handle(
39
            'repos/' . (string)$command->getRepositoryId() . '/caches',
40
            'caches',
41
            CacheInterface::HYDRATE_CLASS
42
        );
43
    }
44
}
45

src/CommandBus/Handler/VarsHandler.php 1 location

@@ 13-42 (lines=30) @@
10
use function React\Promise\resolve;
11
use function WyriHaximus\React\futureFunctionPromise;
12
13
final class VarsHandler
14
{
15
    /**
16
     * @var FetchAndHydrateService
17
     */
18
    private $service;
19
20
    /**
21
     * @param FetchAndIterateService $service
22
     */
23
    public function __construct(FetchAndIterateService $service)
24
    {
25
        $this->service = $service;
26
    }
27
28
    /**
29
     * Fetch the given repository and hydrate it
30
     *
31
     * @param VarsCommand $command
32
     * @return PromiseInterface
33
     */
34
    public function handle(VarsCommand $command): PromiseInterface
35
    {
36
        return $this->service->handle(
37
            'settings/env_vars?repository_id=' . (string)$command->getRepositoryId(),
38
            'env_vars',
39
            EnvironmentVariableInterface::HYDRATE_CLASS
40
        );
41
    }
42
}
43