Passed
Pull Request — master (#2)
by Sergey
03:11
created

RpcResultObject   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getResult() 0 3 1
A __construct() 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: 22:00
9
 */
10
11
declare(strict_types=1);
12
13
namespace Onnov\JsonRpcServer\Model;
14
15
use stdClass;
16
17
/**
18
 * Class RpcResultObject
19
 * @package Onnov\JsonRpcServer\Model
20
 */
21
class RpcResultObject extends RpcResultAbstract
22
{
23
    /**
24
     * RpcResultArray constructor.
25
     * @param stdClass $result
26
     */
27
    public function __construct(stdClass $result)
28
    {
29
        $this->result = $result;
30
    }
31
32
    /**
33
     * @return stdClass
34
     */
35
    public function getResult(): stdClass
36
    {
37
        return $this->result;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->result could return the type null which is incompatible with the type-hinted return stdClass. Consider adding an additional type-check to rule them out.
Loading history...
38
    }
39
}
40