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

ProxyController::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 1
crap 2
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