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
Push — master ( 36e639...e2a32c )
by Cees-Jan
07:31 queued 04:17
created

RequestHandler::handle()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 7
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 7
loc 7
ccs 0
cts 4
cp 0
rs 9.4285
cc 1
eloc 4
nc 1
nop 1
crap 2
1
<?php declare(strict_types=1);
2
3
namespace ApiClients\Foundation\Transport\CommandBus\Handler;
4
5
use ApiClients\Foundation\Transport\CommandBus\Command\RequestCommandInterface;
6
use ApiClients\Foundation\Transport\Service\RequestService;
7
use React\Promise\PromiseInterface;
8
use function React\Promise\resolve;
9
10 View Code Duplication
final class RequestHandler
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
11
{
12
    /**
13
     * @var RequestService
14
     */
15
    private $service;
16
17
    /**
18
     * @param RequestService $service
19
     */
20
    public function __construct(RequestService $service)
21
    {
22
        $this->service = $service;
23
    }
24
25
    public function handle(RequestCommandInterface $command): PromiseInterface
26
    {
27
        return $this->service->handle(
0 ignored issues
show
Bug introduced by
The method handle() does not seem to exist on object<ApiClients\Founda...Service\RequestService>.

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
28
            $command->getRequest(),
29
            $command->getOptions()
30
        );
31
    }
32
}
33