ErrorObject   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 10
c 1
b 0
f 0
dl 0
loc 29
ccs 10
cts 10
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getCode() 0 3 1
A getMessage() 0 3 1
A __construct() 0 5 1
A getData() 0 3 1
1
<?php
2
/*
3
 * This file is part of JSON RPC Client.
4
 *
5
 * (c) Igor Lazarev <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Strider2038\JsonRpcClient\Response;
12
13
/**
14
 * @author Igor Lazarev <[email protected]>
15
 */
16
class ErrorObject
17
{
18
    private int $code;
19
20
    private string $message;
21
22
    /** @var mixed */
23
    private $data;
24
25
    public function __construct(int $code, string $message, $data)
26
    {
27 20
        $this->code = $code;
28
        $this->message = $message;
29 20
        $this->data = $data;
30 20
    }
31 20
32 20
    public function getCode(): int
33
    {
34 20
        return $this->code;
35
    }
36 20
37
    public function getMessage(): string
38
    {
39 20
        return $this->message;
40
    }
41 20
42
    public function getData()
43
    {
44 20
        return $this->data;
45
    }
46
}
47