ErrorObject::getCode()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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