Passed
Pull Request — master (#9)
by Pavel
11:27
created

ProxyController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
dl 0
loc 20
c 0
b 0
f 0
wmc 2
lcom 1
cbo 2
ccs 0
cts 8
cp 0
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A handle() 0 4 1
1
<?php
2
3
namespace Bankiru\Api\Rpc\Rpc;
4
5
use ScayTrase\Api\Rpc\RpcClientInterface;
6
use ScayTrase\Api\Rpc\RpcRequestInterface;
7
8
final class ProxyController
9
{
10
    /** @var RpcClientInterface */
11
    private $client;
12
13
    /**
14
     * ProxyController constructor.
15
     *
16
     * @param RpcClientInterface $client
17
     */
18
    public function __construct(RpcClientInterface $client)
19
    {
20
        $this->client = $client;
21
    }
22
23
    public function handle(RpcRequestInterface $request)
24
    {
25
        return $this->client->invoke($request)->getResponse($request);
26
    }
27
}
28