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.
Completed
Pull Request — master (#11)
by Cees-Jan
12:19 queued 06:26
created

LicensesHandler::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 10
ccs 6
cts 6
cp 1
rs 9.4285
c 1
b 0
f 0
cc 1
eloc 6
nc 1
nop 1
crap 1
1
<?php declare(strict_types=1);
2
3
namespace ApiClients\Client\Github\CommandBus\Handler;
4
5
use ApiClients\Client\Github\CommandBus\Command\LicensesCommand;
6
use ApiClients\Client\Github\CommandBus\Command\MyOrganizationsCommand;
7
use ApiClients\Client\Github\Resource\LicenseInterface;
8
use ApiClients\Tools\Services\Client\FetchAndIterateService;
9
use React\Promise\PromiseInterface;
10
use function React\Promise\resolve;
11
12
final class LicensesHandler
13
{
14
    /**
15
     * @var FetchAndIterateService
16
     */
17
    private $service;
18
19
    /**
20
     * LicensesHandler constructor.
21
     * @param FetchAndIterateService $service
22
     */
23 1
    public function __construct(FetchAndIterateService $service)
24
    {
25 1
        $this->service = $service;
26 1
    }
27
28
    /**
29
     * @param MyOrganizationsCommand $command
30
     * @return PromiseInterface
31
     */
32 1
    public function handle(LicensesCommand $command): PromiseInterface
0 ignored issues
show
Unused Code introduced by
The parameter $command is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
33
    {
34 1
        return resolve(
35 1
            $this->service->iterate(
36 1
                'licenses',
37 1
                '',
38 1
                LicenseInterface::HYDRATE_CLASS
39
            )
40
        );
41
    }
42
}
43