RpcModel   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 84
Duplicated Lines 0 %

Test Coverage

Coverage 75%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 13
c 1
b 0
f 0
dl 0
loc 84
ccs 12
cts 16
cp 0.75
rs 10
wmc 8

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getMethod() 0 3 1
A setJsonrpc() 0 3 1
A getParams() 0 3 1
A getId() 0 3 1
A getJsonrpc() 0 3 1
A setParams() 0 3 1
A setId() 0 3 1
A setMethod() 0 3 1
1
<?php
2
3
/**
4
 * Created by PhpStorm.
5
 * Project: json-rpc-server
6
 * User: sv
7
 * Date: 06.01.2021
8
 * Time: 13:33
9
 */
10
11
declare(strict_types=1);
12
13
namespace Onnov\JsonRpcServer\Model;
14
15
/**
16
 * Class RpcModel
17
 *
18
 * @package Onnov\JsonRpcServer\Model
19
 */
20
class RpcModel
21
{
22
    /**
23
     * @var string
24
     */
25
    private $jsonrpc;
26
27
    /**
28
     * @var string
29
     */
30
    private $method;
31
32
    /**
33
     * @var mixed|null
34
     */
35
    private $params;
36
37
    /**
38
     * @var mixed|null
39
     */
40
    private $id;
41
42
    /**
43
     * @return string
44
     */
45
    public function getJsonrpc(): string
46
    {
47
        return $this->jsonrpc;
48
    }
49
50
    /**
51
     * @param string $jsonrpc
52
     */
53 7
    public function setJsonrpc(string $jsonrpc): void
54
    {
55 7
        $this->jsonrpc = $jsonrpc;
56
    }
57
58
    /**
59
     * @return string
60
     */
61 7
    public function getMethod(): string
62
    {
63 7
        return $this->method;
64
    }
65
66
    /**
67
     * @param string $method
68
     */
69 7
    public function setMethod(string $method): void
70
    {
71 7
        $this->method = $method;
72
    }
73
74
    /**
75
     * @return mixed|null
76
     */
77 5
    public function getParams()
78
    {
79 5
        return $this->params;
80
    }
81
82
    /**
83
     * @param mixed|null $params
84
     */
85
    public function setParams($params): void
86
    {
87
        $this->params = $params;
88
    }
89
90
    /**
91
     * @return mixed|null
92
     */
93 5
    public function getId()
94
    {
95 5
        return $this->id;
96
    }
97
98
    /**
99
     * @param mixed|null $id
100
     */
101 7
    public function setId($id): void
102
    {
103 7
        $this->id = $id;
104
    }
105
}
106