RpcResultString   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 3
c 0
b 0
f 0
dl 0
loc 18
ccs 0
cts 4
cp 0
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getResult() 0 3 1
1
<?php
2
3
/**
4
 * Created by PhpStorm.
5
 * Project: json-rpc-server
6
 * User: sv
7
 * Date: 03.07.2020
8
 * Time: 15:32
9
 */
10
11
declare(strict_types=1);
12
13
namespace Onnov\JsonRpcServer\Result;
14
15
/**
16
 * Class RpcResultString
17
 *
18
 * @package Onnov\JsonRpcServer\Result
19
 */
20
class RpcResultString extends RpcResultAbstract
21
{
22
    /**
23
     * RpcResultString constructor.
24
     *
25
     * @param string $result
26
     */
27
    public function __construct(string $result)
28
    {
29
        $this->result = $result;
30
    }
31
32
    /**
33
     * @return string
34
     */
35
    public function getResult(): string
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 string. Consider adding an additional type-check to rule them out.
Loading history...
38
    }
39
}
40