RpcProcedureAbstract   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 27
ccs 0
cts 5
cp 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setRpcRequest() 0 5 1
A getRpcRequest() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Onnov\JsonRpcServer;
6
7
use Onnov\JsonRpcServer\Model\RpcRequest;
8
use Onnov\JsonRpcServer\Traits\JsonHelperTrait;
9
10
/**
11
 * Class RpcProcedureAbstract
12
 *
13
 * @package Onnov\JsonRpcServer
14
 */
15
abstract class RpcProcedureAbstract implements RpcProcedureInterface
16
{
17
    use JsonHelperTrait;
18
19
    /**
20
     * @var RpcRequest
21
     */
22
    protected $rpcRequest;
23
24
    /**
25
     * @return RpcRequest
26
     */
27
    public function getRpcRequest(): RpcRequest
28
    {
29
        return $this->rpcRequest;
30
    }
31
32
    /**
33
     * @param RpcRequest $rpcRequest
34
     *
35
     * @return self
36
     */
37
    public function setRpcRequest(RpcRequest $rpcRequest): self
38
    {
39
        $this->rpcRequest = $rpcRequest;
40
41
        return $this;
42
    }
43
}
44